@homecode/ui 5.15.1 → 5.15.2

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/esm/index.js CHANGED
@@ -111,7 +111,7 @@ export { queryParams };
111
111
  export { useAwake } from './src/hooks/useAwake.js';
112
112
  export { useThrottle, useThrottleCallback } from './src/hooks/useThrottle.js';
113
113
  export { useDebounce, useDebounceCallback } from './src/hooks/useDebounce.js';
114
- import 'react';
114
+ export { useEvent } from './src/hooks/useEvent.js';
115
115
  export { useIsMounted } from './src/hooks/useIsMounted.js';
116
116
  export { useListKeyboardControl } from './src/hooks/useListKeyboardControl.js';
117
117
  export { useResizeObserver } from './src/hooks/useResizeObserver.js';
@@ -53,7 +53,7 @@ function FoldedLine({ trigger, children, defaultFolded = true, className, folded
53
53
  return (jsxs("div", { className: cn(S.root, isFolded && S.folded, Boolean(children) && S.hasChildren, isClear && S.clear, className), onClick: handleClick, children: [jsxs("div", { ref: triggerRef, className: cn(Boolean(children) && S.triggerInteractive), children: [typeof trigger === 'function' ? trigger(isFolded) : trigger, showChevron && jsx(Icon, { type: "chevronDown", className: S.chevron })] }), !isFolded && children && (jsx("div", { className: S.content, children: jsxs(FoldedLineActionsProvider, { registerAction: registerAction, children: [contentScrolling ? (jsx(Scroll, { y: true, size: "s", autoHide: true, className: S.scroll, innerClassName: S.scrollInner, offset: { y: { before: 4, after: 14 } }, onInnerRef: onScrollInnerRef, onScroll: onScrollInner, children: children })) : (jsx("div", { className: S.scrollInner, children: children })), jsxs("div", { className: S.actions, children: [Array.from(actions.values()), !hideFoldButton && (jsxs(Button, { size: "xs", onClick: e => {
54
54
  e.stopPropagation();
55
55
  setFolded(true);
56
- }, children: [jsx(Icon, { type: "chevronUp", size: "s" }), "Fold"] }))] })] }) }))] }));
56
+ }, children: [jsx(Icon, { type: "chevronUp", size: "xs" }), "\u00A0Fold"] }))] })] }) }))] }));
57
57
  }
58
58
 
59
59
  export { FoldedLine };
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import cn from 'classnames';
3
2
  import { useState, useEffect } from 'react';
4
3
  import { Icon } from '../Icon/Icon.js';
5
4
  import { Popup } from '../Popup/Popup.js';
6
5
  import S from './NestedMenu.styl.js';
6
+ import cn from 'classnames';
7
7
 
8
8
  const MOBILE_MQ = '(max-width: 720px)';
9
9
  const HOVER_MQ = '(hover: hover) and (pointer: fine)';
@@ -5,7 +5,7 @@ import Time from 'timen';
5
5
  import { isTouch } from '../../tools/dom.js';
6
6
  import { observe, unobserve } from '../../tools/resizeObserver.js';
7
7
  import S from './Scroll.styl.js';
8
- import useEvent from '../../hooks/useEvent.js';
8
+ import { useEvent } from '../../hooks/useEvent.js';
9
9
  import { useDebounce } from '../../hooks/useDebounce.js';
10
10
 
11
11
  const getEventCoords = e => ({
@@ -1,5 +1,5 @@
1
1
  import { useState, useRef, useCallback, useMemo, useEffect } from 'react';
2
- import useEvent from '../../hooks/useEvent.js';
2
+ import { useEvent } from '../../hooks/useEvent.js';
3
3
  import { idsKey, matchesSearch, isSelectable, mapById, toIds } from './Select.helpers.js';
4
4
 
5
5
  /**
@@ -14,7 +14,7 @@ import { Popup } from '../Popup/Popup.js';
14
14
  import { RequiredStar } from '../RequiredStar/RequiredStar.js';
15
15
  import { Scroll } from '../Scroll/Scroll.js';
16
16
  import { useThrottle } from '../../hooks/useThrottle.js';
17
- import useEvent from '../../hooks/useEvent.js';
17
+ import { useEvent } from '../../hooks/useEvent.js';
18
18
  import { generateUID } from '../../tools/uid.js';
19
19
  import { useSelectedIds, useSelectOptions, useSelectOpenState, useKeyboardNav } from './Select.hooks.js';
20
20
  import S from './Select.styl.js';
@@ -6,7 +6,7 @@ import { Icon } from '../Icon/Icon.js';
6
6
  import { Popup } from '../Popup/Popup.js';
7
7
  import { ProgressCircular } from '../ProgressCircular/ProgressCircular.js';
8
8
  import { Slider } from '../Slider/Slider.js';
9
- import useEvent from '../../hooks/useEvent.js';
9
+ import { useEvent } from '../../hooks/useEvent.js';
10
10
  import debounce from '../../tools/debounce.js';
11
11
  import S from './VideoPlayer.styl.js';
12
12
  import { TIME_PERSIST_DEBOUNCE_MS, saveStorage, formatTime, VOLUME_POPUP_HIDE_MS, clamp, leadingDebounce, isEditableTarget, loadStorage, getBufferedPercent, DOUBLE_TAP_MS, getStorageKey, timeToProgressPct, KEYBOARD_DEBOUNCE_MS, getSeekDelta, VOLUME_STEP } from './VideoPlayer.helpers.js';
@@ -24,4 +24,4 @@ function useEvent({ elem, event, callback, isActive = true, isCapture = false, }
24
24
  }, [isActive, elem, callback]);
25
25
  }
26
26
 
27
- export { useEvent as default };
27
+ export { useEvent as default, useEvent };
@@ -1,5 +1,5 @@
1
1
  import { useState, useCallback, useEffect } from 'react';
2
- import useEvent from './useEvent.js';
2
+ import { useEvent } from './useEvent.js';
3
3
 
4
4
  const useListKeyboardControl = ({ isActive, itemsCount, onSelect, }) => {
5
5
  const [focusedIndex, setFocusedIndex] = useState(-1);
@@ -6,4 +6,5 @@ export type UseEventParams = {
6
6
  isActive?: boolean;
7
7
  isCapture?: boolean;
8
8
  };
9
- export default function useEvent({ elem, event, callback, isActive, isCapture, }: UseEventParams): void;
9
+ export declare function useEvent({ elem, event, callback, isActive, isCapture, }: UseEventParams): void;
10
+ export default useEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "5.15.1",
3
+ "version": "5.15.2",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",