@pushwoosh/dumb-components 1.1.137 → 1.1.139

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.
@@ -1,6 +1,7 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useContext } from 'react';
3
- import { DropdownMenuItemStyled } from './styles';
3
+ import { CheckIcon } from '@pushwoosh/kit-icons';
4
+ import { DropdownMenuItemStyled, DropdownMenuIconStyled } from './styles';
4
5
  import { DropdownContext } from '../../context';
5
6
  export const DropdownMenuItem = ({
6
7
  children,
@@ -16,7 +17,7 @@ export const DropdownMenuItem = ({
16
17
  console.error('DropdownMenuItem must be inside DropdownMenu');
17
18
  }
18
19
  }
19
- return _jsx(DropdownMenuItemStyled, {
20
+ return _jsxs(DropdownMenuItemStyled, {
20
21
  "$active": isActive,
21
22
  "$danger": isDanger,
22
23
  onClick: () => {
@@ -27,6 +28,10 @@ export const DropdownMenuItem = ({
27
28
  },
28
29
  disabled: disabled,
29
30
  "data-active": isActive || undefined,
30
- children: children
31
+ children: [children, isActive && _jsx(DropdownMenuIconStyled, {
32
+ children: _jsx(CheckIcon, {
33
+ size: "small"
34
+ })
35
+ })]
31
36
  });
32
37
  };
@@ -1 +1 @@
1
- export { DropdownMenuItemStyled } from '../../shared/styles';
1
+ export { DropdownMenuItemStyled, DropdownMenuIconStyled } from '../../shared/styles';
@@ -1 +1 @@
1
- export { DropdownMenuItemStyled } from '../../shared/styles';
1
+ export { DropdownMenuItemStyled, DropdownMenuIconStyled } from '../../shared/styles';
@@ -20,3 +20,4 @@ export declare const DropdownMenuItemStyled: import("styled-components").StyledC
20
20
  $active?: boolean;
21
21
  $danger?: boolean;
22
22
  }, never>;
23
+ export declare const DropdownMenuIconStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -23,10 +23,14 @@ export const Place = styled(Vertical).withConfig({
23
23
  export const DropdownMenuItemStyled = styled.button.withConfig({
24
24
  displayName: "DropdownMenuItemStyled",
25
25
  componentId: "sc-hlq2pz-1"
26
- })(["appearance:none;display:flex;align-items:center;white-space:nowrap;padding:0 12px;min-height:", ";border:none;overflow:hidden;color:", ";background:none;cursor:pointer;&:hover{background:", ";color:", ";}&:disabled{color:", ";cursor:not-allowed;}"], UnitSize.FIELD_HEIGHT, ({
26
+ })(["appearance:none;display:flex;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap;padding:0 12px;min-height:", ";border:none;overflow:hidden;color:", ";background:none;cursor:pointer;&:hover{background:", ";color:", ";}&:disabled{color:", ";cursor:not-allowed;}"], UnitSize.FIELD_HEIGHT, ({
27
27
  $active,
28
28
  $danger
29
29
  }) => {
30
30
  if ($danger) return Color.DANGER;
31
31
  return $active ? Color.PRIMARY : Color.MAIN;
32
- }, Color.SOFT_LIGHT, Color.MAIN, Color.LOCKED);
32
+ }, Color.SOFT_LIGHT, Color.MAIN, Color.LOCKED);
33
+ export const DropdownMenuIconStyled = styled.span.withConfig({
34
+ displayName: "DropdownMenuIconStyled",
35
+ componentId: "sc-hlq2pz-2"
36
+ })(["margin:-2px 0 0;line-height:0;"]);
@@ -21,7 +21,7 @@ export function TooltipTrigger({
21
21
  "$hoverColor": hoverColor,
22
22
  children: _jsx(Icon, {
23
23
  size: size,
24
- view: "lined"
24
+ view: "shaded"
25
25
  })
26
26
  })
27
27
  });
package/Tooltip/maps.d.ts CHANGED
@@ -40,6 +40,6 @@ export declare const TooltipTriggerViewMap: Record<TooltipTriggerView, {
40
40
  hoverColor: Color;
41
41
  icon: React.FC<{
42
42
  size: 'small' | 'medium';
43
- view: 'lined' | 'filled';
43
+ view: 'lined' | 'filled' | 'shaded';
44
44
  }>;
45
45
  }>;
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.PHANTOM,
166
+ color: Color.LOCKED,
167
167
  hoverColor: Color.PRIMARY_HOVER,
168
168
  icon: InfoRoundIcon
169
169
  },
170
170
  question: {
171
- color: Color.PHANTOM,
171
+ color: Color.LOCKED,
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.137",
3
+ "version": "1.1.139",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -49,7 +49,7 @@
49
49
  "@lezer/highlight": "^1.2.1",
50
50
  "@pushwoosh/kit-constants": "^1.6.14",
51
51
  "@pushwoosh/kit-helpers": "^4.11.0",
52
- "@pushwoosh/kit-icons": "^2.1.9",
52
+ "@pushwoosh/kit-icons": "^2.1.16",
53
53
  "@pushwoosh/kit-typography": "^1.7.5",
54
54
  "@tippyjs/react": "^4.2.6",
55
55
  "@uiw/codemirror-themes": "^4.23.8",