@pushwoosh/dumb-components 1.1.24 → 1.1.25

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.
@@ -55,8 +55,7 @@ export function Checkbox(props) {
55
55
  }, checkboxMarkup, React.createElement(TooltipTrigger, {
56
56
  content: tooltip,
57
57
  padding: "4px 0",
58
- view: "question",
59
- color: Color.PHANTOM
58
+ view: "question"
60
59
  }));
61
60
  }
62
61
  return checkboxMarkup;
package/Radio/Radio.js CHANGED
@@ -53,8 +53,7 @@ export function Radio(props) {
53
53
  content: tooltip,
54
54
  padding: size === 'compact' ? '0' : '4px 0',
55
55
  position: "top-middle",
56
- view: "question",
57
- color: Color.PHANTOM
56
+ view: "question"
58
57
  }));
59
58
  }
60
59
  return radioMarkup;
@@ -1,19 +1,10 @@
1
1
  import { type ReactElement } from 'react';
2
- import { type Color } from '@pushwoosh/kit-constants';
3
2
  import type { TooltipProps } from './types';
4
3
  export type TooltipTriggerView = 'question' | 'info' | 'warning' | 'error';
5
- type TooltipBaseProps = TooltipProps & {
4
+ export type TooltipTriggerProps = TooltipProps & {
6
5
  padding?: string | number;
7
6
  size?: 'small' | 'medium';
8
7
  hover?: boolean;
8
+ view: TooltipTriggerView;
9
9
  };
10
- type TooltipTriggerWithColor = TooltipBaseProps & {
11
- view: 'question' | 'info';
12
- color: Color.MAIN | Color.PHANTOM;
13
- };
14
- type TooltipTriggerWithoutColor = TooltipBaseProps & {
15
- view: 'warning' | 'error';
16
- };
17
- export type TooltipTriggerProps = TooltipTriggerWithColor | TooltipTriggerWithoutColor;
18
10
  export declare function TooltipTrigger({ padding, view, size, hover, ...tooltipProps }: TooltipTriggerProps): ReactElement;
19
- export {};
@@ -9,7 +9,6 @@ export function TooltipTrigger({
9
9
  hover = true,
10
10
  ...tooltipProps
11
11
  }) {
12
- const color = view === 'error' || view === 'warning' ? TooltipTriggerViewMap[view].color : tooltipProps.color;
13
12
  const hoverColor = hover ? TooltipTriggerViewMap[view].hoverColor : undefined;
14
13
  const {
15
14
  icon: Icon
@@ -18,7 +17,7 @@ export function TooltipTrigger({
18
17
  ...tooltipProps
19
18
  }, React.createElement(HelpIconWrapper, {
20
19
  "$padding": padding,
21
- "$color": color,
20
+ "$color": TooltipTriggerViewMap[view].color,
22
21
  "$hoverColor": hoverColor
23
22
  }, React.createElement(Icon, {
24
23
  size: size,
package/Tooltip/maps.js CHANGED
@@ -163,12 +163,12 @@ export function getLeftPosition(position, offset) {
163
163
  }
164
164
  export const TooltipTriggerViewMap = {
165
165
  info: {
166
- color: Color.MAIN,
166
+ color: Color.PHANTOM,
167
167
  hoverColor: Color.PRIMARY_HOVER,
168
168
  icon: InfoRoundIcon
169
169
  },
170
170
  question: {
171
- color: Color.MAIN,
171
+ color: Color.PHANTOM,
172
172
  hoverColor: Color.PRIMARY_HOVER,
173
173
  icon: HelpRoundIcon
174
174
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",