widenarrow-ui 1.1.19 → 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.
- package/lib/assets/svg/searchLexical.d.ts +6 -0
- package/lib/components/MultiActionButton/MultiActionButton.types.d.ts +2 -1
- package/lib/constants.d.ts +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +339 -328
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +339 -328
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/svg/newsletterTemplate-200.tsx +1 -1
- package/src/assets/svg/newsletterTemplate-300.tsx +1 -1
- package/src/assets/svg/searchLexical.tsx +13 -0
- package/src/components/DropDownItem/DropDownItem.module.scss +1 -0
- package/src/components/Icon/getIconFromConstant.tsx +3 -0
- package/src/components/InlineButton/InlineButton.module.scss +1 -0
- package/src/components/MultiActionButton/MultiActionButton.module.scss +37 -0
- package/src/components/MultiActionButton/MultiActionButton.tsx +4 -2
- package/src/components/MultiActionButton/MultiActionButton.types.ts +4 -3
- package/src/constants.ts +1 -0
- package/src/styles/mixins.scss +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
const Icon: FC<Props> = ({ className }) => (
|
|
8
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="-2.5 -2.5 24 24" className={className}>
|
|
9
9
|
<path d="M6 2.5C6 2.22386 6.22386 2 6.5 2H11.5C11.7761 2 12 2.22386 12 2.5C12 2.77614 11.7761 3 11.5 3H6.5C6.22386 3 6 2.77614 6 2.5Z" />
|
|
10
10
|
<path d="M6 5C6 4.72386 6.22386 4.5 6.5 4.5H11.5C11.7761 4.5 12 4.72386 12 5C12 5.27614 11.7761 5.5 11.5 5.5H6.5C6.22386 5.5 6 5.27614 6 5Z" />
|
|
11
11
|
<path d="M6.5 7C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H11.5C11.7761 8 12 7.77614 12 7.5C12 7.22386 11.7761 7 11.5 7H6.5Z" />
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
const Icon: FC<Props> = ({ className }) => (
|
|
8
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="-2.5 -2.5 24 24" className={className}>
|
|
9
9
|
<path d="M14.62 5.22H9.97C9.61 5.22 9.32 5.51 9.32 5.87C9.32 6.23 9.61 6.52 9.97 6.52H14.62C14.98 6.52 15.27 6.23 15.27 5.87C15.27 5.51 14.98 5.22 14.62 5.22Z" />
|
|
10
10
|
<path d="M14.62 7.55H9.97C9.61 7.55 9.32 7.84 9.32 8.2C9.32 8.56 9.61 8.85 9.97 8.85H14.62C14.98 8.85 15.27 8.56 15.27 8.2C15.27 7.84 14.98 7.55 14.62 7.55Z" />
|
|
11
11
|
<path d="M14.62 9.87H9.97C9.61 9.87 9.32 10.16 9.32 10.52C9.32 10.88 9.61 11.17 9.97 11.17H14.62C14.98 11.17 15.27 10.88 15.27 10.52C15.27 10.16 14.98 9.87 14.62 9.87Z" />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const Icon: FC<Props> = ({ className }) => (
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" className={className}>
|
|
9
|
+
<path d="M130-220.77q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37 8.62-8.62 21.37-8.62h331.16q12.75 0 21.37 8.63 8.62 8.63 8.62 21.38 0 12.76-8.62 21.37-8.62 8.62-21.37 8.62H130Zm0-195.77q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37 8.62-8.62 21.37-8.62h129.23q12.75 0 21.38 8.63 8.62 8.63 8.62 21.38 0 12.76-8.62 21.38-8.63 8.61-21.38 8.61H130Zm0-195.77q-12.75 0-21.37-8.63-8.63-8.63-8.63-21.38 0-12.76 8.63-21.37 8.62-8.62 21.37-8.62h129.23q12.75 0 21.38 8.63 8.62 8.63 8.62 21.39 0 12.75-8.62 21.37-8.63 8.61-21.38 8.61H130Zm428.46 272.69q-75.18 0-128.16-52.53-52.99-52.54-52.99-127.66 0-75.11 53.01-127.65Q483.34-700 558.55-700q75.22 0 128.14 52.54 52.92 52.54 52.92 127.46 0 27.85-8.69 54.81t-25.69 49.42l133.69 132.54q8.69 8.18 8.69 20.82t-8.69 21.33q-8.18 8.31-20.82 8.31t-21.33-8.31L663.08-373.62q-22.85 16.62-49.81 25.31-26.96 8.69-54.81 8.69Zm0-60q50.48 0 85.82-35 35.34-35 35.34-85.19T644.28-605q-35.34-35-85.82-35-50.48 0-85.82 35-35.33 35-35.33 85.19t35.33 85.19q35.34 35 85.82 35Z" />
|
|
10
|
+
</svg>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default Icon;
|
|
@@ -159,6 +159,7 @@ import SavedSearchIcon300 from 'src/assets/svg/savedSearch-300';
|
|
|
159
159
|
import ScheduleIcon from 'src/assets/svg/schedule';
|
|
160
160
|
import SearchIcon200 from 'src/assets/svg/search-200';
|
|
161
161
|
import SearchIcon300 from 'src/assets/svg/search-300';
|
|
162
|
+
import SearchLexicalIcon from 'src/assets/svg/searchLexical';
|
|
162
163
|
import SearchPersonIcon from 'src/assets/svg/searchPerson';
|
|
163
164
|
import SendIcon from 'src/assets/svg/send';
|
|
164
165
|
import SendListIcon from 'src/assets/svg/sendList';
|
|
@@ -534,6 +535,8 @@ const getIconFromConstant = (icon: Partial<IconTypes>, getIconClassName: (additi
|
|
|
534
535
|
return <SearchIcon200 className={getIconClassName()} />;
|
|
535
536
|
case IconTypes.SEARCH_300:
|
|
536
537
|
return <SearchIcon300 className={getIconClassName()} />;
|
|
538
|
+
case IconTypes.SEARCH_LEXICAL:
|
|
539
|
+
return <SearchLexicalIcon className={getIconClassName()} />;
|
|
537
540
|
case IconTypes.SEARCH_USER:
|
|
538
541
|
return <SearchPersonIcon className={getIconClassName()} />;
|
|
539
542
|
case IconTypes.SEND:
|
|
@@ -41,6 +41,15 @@ $button-l-min-width: 100px;
|
|
|
41
41
|
position: relative;
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
|
|
44
|
+
.button_right {
|
|
45
|
+
margin-left: auto;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button_left {
|
|
49
|
+
flex-grow: 1;
|
|
50
|
+
justify-content: left;
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
&_primary {
|
|
45
54
|
background-color: $main-purple;
|
|
46
55
|
|
|
@@ -62,6 +71,11 @@ $button-l-min-width: 100px;
|
|
|
62
71
|
|
|
63
72
|
.button {
|
|
64
73
|
@include secondaryButton(0);
|
|
74
|
+
&_disabled {
|
|
75
|
+
+ .button_right {
|
|
76
|
+
border-left: 1px solid $grey-2;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
65
79
|
}
|
|
66
80
|
.button_right {
|
|
67
81
|
border-left: 1px solid $border-grey;
|
|
@@ -90,8 +104,30 @@ $button-l-min-width: 100px;
|
|
|
90
104
|
}
|
|
91
105
|
}
|
|
92
106
|
|
|
107
|
+
&_quaternary {
|
|
108
|
+
@include buttonColors($mint-1, $mint-1, $main-grey);
|
|
109
|
+
|
|
110
|
+
.button {
|
|
111
|
+
&:hover {
|
|
112
|
+
@include buttonColors($mint-2, $mint-2, $main-grey);
|
|
113
|
+
}
|
|
114
|
+
&:active {
|
|
115
|
+
@include buttonColors($mint-3, $mint-3, $main-grey);
|
|
116
|
+
}
|
|
117
|
+
&.loading,
|
|
118
|
+
&.disabled,
|
|
119
|
+
&_disabled {
|
|
120
|
+
@include buttonColors($grey-3, $grey-3, $white);
|
|
121
|
+
svg {
|
|
122
|
+
fill: $grey-5 !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
93
128
|
&_disabled {
|
|
94
129
|
pointer-events: none;
|
|
130
|
+
border-color: $grey-2;
|
|
95
131
|
}
|
|
96
132
|
|
|
97
133
|
// Sizes
|
|
@@ -169,6 +205,7 @@ $button-l-min-width: 100px;
|
|
|
169
205
|
|
|
170
206
|
.text {
|
|
171
207
|
display: block;
|
|
208
|
+
margin-right: auto;
|
|
172
209
|
|
|
173
210
|
&_withEllipsis {
|
|
174
211
|
padding: 2px 0;
|
|
@@ -15,6 +15,7 @@ const s = classNames.bind(styles);
|
|
|
15
15
|
const MultiActionButton: FC<MultiActionButtonProps> = ({
|
|
16
16
|
className,
|
|
17
17
|
iconClassName,
|
|
18
|
+
innerClassName,
|
|
18
19
|
id,
|
|
19
20
|
type = HierarchyTypes.PRIMARY,
|
|
20
21
|
size = SizeTypes.MEDIUM,
|
|
@@ -48,7 +49,6 @@ const MultiActionButton: FC<MultiActionButtonProps> = ({
|
|
|
48
49
|
className={s('spinner')}
|
|
49
50
|
type={type === HierarchyTypes.PRIMARY ? HierarchyTypes.QUATERNARY : HierarchyTypes.SECONDARY}
|
|
50
51
|
size={SizeTypes.SMALL}
|
|
51
|
-
disabled
|
|
52
52
|
/>
|
|
53
53
|
) : null}
|
|
54
54
|
<div
|
|
@@ -56,10 +56,12 @@ const MultiActionButton: FC<MultiActionButtonProps> = ({
|
|
|
56
56
|
innerContainer_primary: type === HierarchyTypes.PRIMARY,
|
|
57
57
|
innerContainer_secondary: type === HierarchyTypes.SECONDARY,
|
|
58
58
|
innerContainer_tertiary: type === HierarchyTypes.TERTIARY,
|
|
59
|
+
innerContainer_quaternary: type === HierarchyTypes.QUATERNARY,
|
|
59
60
|
innerContainer_small: size === SizeTypes.SMALL,
|
|
60
61
|
innerContainer_medium: size === SizeTypes.MEDIUM,
|
|
61
62
|
innerContainer_large: size === SizeTypes.LARGE,
|
|
62
|
-
innerContainer_disabled: loading || disabled
|
|
63
|
+
innerContainer_disabled: loading || disabled,
|
|
64
|
+
[innerClassName as string]: innerClassName
|
|
63
65
|
})}
|
|
64
66
|
>
|
|
65
67
|
<button
|
|
@@ -5,7 +5,7 @@ export interface MultiActionButtonProps {
|
|
|
5
5
|
text?: string;
|
|
6
6
|
onLeftClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
onRightClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
-
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY | HierarchyTypes.TERTIARY;
|
|
8
|
+
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY | HierarchyTypes.TERTIARY | HierarchyTypes.QUATERNARY;
|
|
9
9
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
10
|
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
11
11
|
leftIcon?: Partial<IconTypes>;
|
|
@@ -15,8 +15,9 @@ export interface MultiActionButtonProps {
|
|
|
15
15
|
rotateMiddleIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
16
16
|
rotateRightIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
|
|
18
|
+
className?: string; // applied to the container
|
|
19
|
+
innerClassName?: string; // applied to the inner container, styling the actual button, such as its width
|
|
20
|
+
iconClassName?: string; // applied to the icons
|
|
20
21
|
toolTip?: string;
|
|
21
22
|
id?: string | number;
|
|
22
23
|
loading?: boolean;
|
package/src/constants.ts
CHANGED
|
@@ -157,6 +157,7 @@ export enum IconTypes {
|
|
|
157
157
|
SEARCH_200 = 'iconSearch200',
|
|
158
158
|
SEARCH_300 = 'iconSearch300',
|
|
159
159
|
SEARCH_USER = 'iconSearchUser',
|
|
160
|
+
SEARCH_LEXICAL = 'iconSearchLexical',
|
|
160
161
|
SEND = 'iconSend',
|
|
161
162
|
SEND_LIST = 'iconSendList',
|
|
162
163
|
SETTINGS_200 = 'iconSettings200',
|