@pushwoosh/dumb-components 1.1.149 → 1.1.151

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/Alert/maps.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import type { FC } from 'react';
1
2
  import { Color } from '@pushwoosh/kit-constants';
2
3
  import { type DangerTriangleIconProps, type InfoRoundIconProps, type WarningRoundIconProps } from '@pushwoosh/kit-icons';
3
4
  import { type AlertType } from './types';
4
5
  type AlertData = {
5
- icon: React.FC<InfoRoundIconProps | WarningRoundIconProps | DangerTriangleIconProps>;
6
+ icon: FC<InfoRoundIconProps | WarningRoundIconProps | DangerTriangleIconProps>;
6
7
  iconColor: Color;
7
8
  bgColor: Color;
8
9
  };
@@ -63,7 +63,7 @@ export function Drawer({
63
63
  onMouseDown: handleClickOutside,
64
64
  "$padding": padding,
65
65
  children: _jsx(DrawerContainer, {
66
- "$width": drawerSizes[size],
66
+ "$width": size in drawerSizes ? drawerSizes[size] : size,
67
67
  onClick: handleClose,
68
68
  children: children
69
69
  })
@@ -9,8 +9,8 @@ export type ContentPadding = {
9
9
  };
10
10
  /** Props of {@link Drawer}. */
11
11
  export type DrawerProps = PropsWithChildren<{
12
- /** Width preset (one of the predefined drawer sizes). */
13
- readonly size: keyof typeof drawerSizes;
12
+ /** Width: a predefined preset, or an explicit CSS length (`${number}px` / `${number}%`). */
13
+ readonly size: keyof typeof drawerSizes | `${number}px` | `${number}%`;
14
14
  /** Whether the drawer is open. */
15
15
  readonly isOpen: boolean;
16
16
  /** Stacking z-index; auto-layered when omitted. */
package/Tabs/context.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { TabContextType } from './types';
3
- export declare const TabContext: React.Context<TabContextType>;
2
+ export declare const TabContext: import("react").Context<TabContextType>;
4
3
  export declare function useTabsContext(): TabContextType;
package/Tabs/context.js CHANGED
@@ -1,5 +1,5 @@
1
- import React, { useContext } from 'react';
2
- export const TabContext = React.createContext(null);
1
+ import { useContext, createContext } from 'react';
2
+ export const TabContext = createContext(null);
3
3
  export function useTabsContext() {
4
4
  const context = useContext(TabContext);
5
5
  if (!context) {
package/Tooltip/maps.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { FC } from 'react';
1
2
  import { Color } from '@pushwoosh/kit-constants';
2
3
  import { type TooltipTriggerView } from './TooltipTrigger';
3
4
  import type { TooltipPosition } from './types';
@@ -38,7 +39,7 @@ export declare function getLeftPosition(position: TooltipPosition, offset: strin
38
39
  export declare const TooltipTriggerViewMap: Record<TooltipTriggerView, {
39
40
  color: Color;
40
41
  hoverColor: Color;
41
- icon: React.FC<{
42
+ icon: FC<{
42
43
  size: 'small' | 'medium';
43
44
  view: 'lined' | 'filled' | 'shaded';
44
45
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.149",
3
+ "version": "1.1.151",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -21,7 +21,7 @@
21
21
  "npm": ">= 7"
22
22
  },
23
23
  "devDependencies": {
24
- "@pushwoosh/frontend-builder-engine": "^2.1.0",
24
+ "@pushwoosh/frontend-builder-engine": "^2.1.1",
25
25
  "@svgr/webpack": "^8.1.0",
26
26
  "@testing-library/jest-dom": "^6.9.1",
27
27
  "@testing-library/react": "^16.3.0",