@pushwoosh/dumb-components 1.1.20 → 1.1.21

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,2 +1 @@
1
1
  export { DropdownMenu } from './DropdownMenu';
2
- export { DropdownMenuSection } from './styles';
@@ -1,2 +1 @@
1
- export { DropdownMenu } from './DropdownMenu';
2
- export { DropdownMenuSection } from './styles';
1
+ export { DropdownMenu } from './DropdownMenu';
@@ -59,59 +59,3 @@ export declare const Place: import("styled-components").StyledComponent<"div", a
59
59
  $zIndex?: number;
60
60
  $scrollable?: boolean;
61
61
  }, "$gridAutoFlow">;
62
- export declare const DropdownMenuSection: import("styled-components").StyledComponent<"div", any, {
63
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
64
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
65
- $bgColor?: string | undefined;
66
- $border?: string | ({
67
- top?: string | undefined;
68
- right?: string | undefined;
69
- bottom?: string | undefined;
70
- left?: string | undefined;
71
- } | {
72
- horizontal: string;
73
- top?: string | undefined;
74
- bottom?: string | undefined;
75
- } | {
76
- vertical: string;
77
- right?: string | undefined;
78
- left?: string | undefined;
79
- }) | undefined;
80
- $borderRadius?: (string | number) | undefined;
81
- $boxShadow?: string | undefined;
82
- $gap?: (string | number) | undefined;
83
- $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
84
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
85
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
86
- $margin?: (string | number) | ({
87
- top?: (string | number) | undefined;
88
- right?: (string | number) | undefined;
89
- bottom?: (string | number) | undefined;
90
- left?: (string | number) | undefined;
91
- } | {
92
- horizontal: string | number;
93
- top?: (string | number) | undefined;
94
- bottom?: (string | number) | undefined;
95
- } | {
96
- vertical: string | number;
97
- right?: (string | number) | undefined;
98
- left?: (string | number) | undefined;
99
- }) | undefined;
100
- $padding?: (string | number) | ({
101
- top?: (string | number) | undefined;
102
- right?: (string | number) | undefined;
103
- bottom?: (string | number) | undefined;
104
- left?: (string | number) | undefined;
105
- } | {
106
- horizontal: string | number;
107
- top?: (string | number) | undefined;
108
- bottom?: (string | number) | undefined;
109
- } | {
110
- vertical: string | number;
111
- right?: (string | number) | undefined;
112
- left?: (string | number) | undefined;
113
- }) | undefined;
114
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
115
- } & {
116
- $gridAutoFlow: string;
117
- }, "$gridAutoFlow">;
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { Color, Shadow, ShapeRadius, Spacing } from '@pushwoosh/kit-constants';
2
+ import { Color, Shadow, ShapeRadius } from '@pushwoosh/kit-constants';
3
3
  import { Vertical } from '@pushwoosh/kit-helpers';
4
4
  const scrollableCss = css(["max-height:248px;overflow-y:auto;"]);
5
5
  export const Place = styled(Vertical).withConfig({
@@ -13,8 +13,4 @@ export const Place = styled(Vertical).withConfig({
13
13
  $scrollable
14
14
  }) => $scrollable && scrollableCss, ShapeRadius.CONTROL, Shadow.REGULAR, ({
15
15
  $zIndex
16
- }) => $zIndex || 10);
17
- export const DropdownMenuSection = styled(Vertical).withConfig({
18
- displayName: "DropdownMenuSection",
19
- componentId: "sc-ij8wqc-1"
20
- })(["padding:", " 0;&:not(:first-child){border-top:1px solid ", ";}"], Spacing.S3, Color.FORM);
16
+ }) => $zIndex || 10);
@@ -1,9 +1,9 @@
1
1
  import styled from 'styled-components';
2
- import { Color, Spacing, UnitSize } from '@pushwoosh/kit-constants';
2
+ import { Color, UnitSize } from '@pushwoosh/kit-constants';
3
3
  export const DropdownMenuItemStyled = styled.button.withConfig({
4
4
  displayName: "DropdownMenuItemStyled",
5
5
  componentId: "sc-1wmyvxp-0"
6
- })(["appearance:none;display:flex;align-items:center;white-space:nowrap;padding:0 ", ";min-height:", ";border:none;color:", ";background:none;cursor:pointer;&:hover{background:", ";color:", ";}&:disabled{color:", ";cursor:not-allowed;}"], Spacing.S4, UnitSize.FIELD_HEIGHT, ({
6
+ })(["appearance:none;display:flex;align-items:center;white-space:nowrap;padding:0 12px;min-height:", ";border:none;color:", ";background:none;cursor:pointer;&:hover{background:", ";color:", ";}&:disabled{color:", ";cursor:not-allowed;}"], UnitSize.FIELD_HEIGHT, ({
7
7
  $active,
8
8
  $danger
9
9
  }) => {
@@ -0,0 +1,3 @@
1
+ import { type FC } from 'react';
2
+ import { type DropdownMenuSectionProps } from './types';
3
+ export declare const DropdownMenuSection: FC<DropdownMenuSectionProps>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Color } from '@pushwoosh/kit-constants';
3
+ import { Horizontal } from '@pushwoosh/kit-helpers';
4
+ import { Text } from '@pushwoosh/kit-typography';
5
+ import { DropdownMenuSectionRoot } from './styles';
6
+ export const DropdownMenuSection = ({
7
+ title,
8
+ children
9
+ }) => {
10
+ return React.createElement(DropdownMenuSectionRoot, null, title && React.createElement(Horizontal, {
11
+ "$padding": "8px 12px"
12
+ }, React.createElement(Text, {
13
+ "$variant": "h5",
14
+ "$color": Color.LOCKED,
15
+ "$uppercase": true
16
+ }, title)), children);
17
+ };
@@ -0,0 +1 @@
1
+ export { DropdownMenuSection } from './DropdownMenuSection';
@@ -0,0 +1 @@
1
+ export { DropdownMenuSection } from './DropdownMenuSection';
@@ -0,0 +1,56 @@
1
+ export declare const DropdownMenuSectionRoot: import("styled-components").StyledComponent<"div", any, {
2
+ $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
3
+ $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
4
+ $bgColor?: string | undefined;
5
+ $border?: string | ({
6
+ top?: string | undefined;
7
+ right?: string | undefined;
8
+ bottom?: string | undefined;
9
+ left?: string | undefined;
10
+ } | {
11
+ horizontal: string;
12
+ top?: string | undefined;
13
+ bottom?: string | undefined;
14
+ } | {
15
+ vertical: string;
16
+ right?: string | undefined;
17
+ left?: string | undefined;
18
+ }) | undefined;
19
+ $borderRadius?: (string | number) | undefined;
20
+ $boxShadow?: string | undefined;
21
+ $gap?: (string | number) | undefined;
22
+ $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
23
+ $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
24
+ $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
25
+ $margin?: (string | number) | ({
26
+ top?: (string | number) | undefined;
27
+ right?: (string | number) | undefined;
28
+ bottom?: (string | number) | undefined;
29
+ left?: (string | number) | undefined;
30
+ } | {
31
+ horizontal: string | number;
32
+ top?: (string | number) | undefined;
33
+ bottom?: (string | number) | undefined;
34
+ } | {
35
+ vertical: string | number;
36
+ right?: (string | number) | undefined;
37
+ left?: (string | number) | undefined;
38
+ }) | undefined;
39
+ $padding?: (string | number) | ({
40
+ top?: (string | number) | undefined;
41
+ right?: (string | number) | undefined;
42
+ bottom?: (string | number) | undefined;
43
+ left?: (string | number) | undefined;
44
+ } | {
45
+ horizontal: string | number;
46
+ top?: (string | number) | undefined;
47
+ bottom?: (string | number) | undefined;
48
+ } | {
49
+ vertical: string | number;
50
+ right?: (string | number) | undefined;
51
+ left?: (string | number) | undefined;
52
+ }) | undefined;
53
+ $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
54
+ } & {
55
+ $gridAutoFlow: string;
56
+ }, "$gridAutoFlow">;
@@ -0,0 +1,7 @@
1
+ import styled from 'styled-components';
2
+ import { Color } from '@pushwoosh/kit-constants';
3
+ import { Vertical } from '@pushwoosh/kit-helpers';
4
+ export const DropdownMenuSectionRoot = styled(Vertical).withConfig({
5
+ displayName: "DropdownMenuSectionRoot",
6
+ componentId: "sc-xi4vra-0"
7
+ })(["padding:8px 0;&:not(:first-child){border-top:1px solid ", ";}"], Color.FORM);
@@ -0,0 +1,4 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ export type DropdownMenuSectionProps = PropsWithChildren<{
3
+ title?: string;
4
+ }>;
@@ -1,3 +1,4 @@
1
- export { DropdownMenu, DropdownMenuSection } from './components/DropdownMenu';
1
+ export { DropdownMenu } from './components/DropdownMenu';
2
2
  export { DropdownMenuButton } from './components/DropdownMenuButton';
3
3
  export { DropdownMenuItem } from './components/DropdownMenuItem';
4
+ export { DropdownMenuSection } from './components/DropdownMenuSection';
@@ -1,3 +1,4 @@
1
- export { DropdownMenu, DropdownMenuSection } from './components/DropdownMenu';
1
+ export { DropdownMenu } from './components/DropdownMenu';
2
2
  export { DropdownMenuButton } from './components/DropdownMenuButton';
3
- export { DropdownMenuItem } from './components/DropdownMenuItem';
3
+ export { DropdownMenuItem } from './components/DropdownMenuItem';
4
+ export { DropdownMenuSection } from './components/DropdownMenuSection';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",