@soul-refiner/design-system 1.7.13 → 1.7.15
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/dist/components/card/audio/audio.d.ts +2 -1
- package/dist/components/card/audio/audio.js +20 -3
- package/dist/components/card/card.d.ts +1 -0
- package/dist/components/card/card.js +10 -0
- package/dist/components/card/video/video.d.ts +2 -1
- package/dist/components/card/video/video.js +20 -4
- package/dist/components/card/written/written.d.ts +2 -1
- package/dist/components/card/written/written.js +23 -7
- package/dist/components/input/filter/filter.d.ts +6 -2
- package/dist/components/input/filter/filter.js +11 -6
- package/package.json +1 -1
|
@@ -8,10 +8,11 @@ export interface AudioEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const AudioEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: AudioEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const AudioEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: AudioEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const AudioEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
|
-
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
10
|
+
return (React.createElement(Wrapper, { "$sx": sx, href: href, "$hasPurchaseText": !!purchaseText },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
!!purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24 }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 228, quality: 100, src: image, width: 228 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -39,6 +44,13 @@ const Wrapper = styled.a `
|
|
|
39
44
|
figure {
|
|
40
45
|
transition: width 0.3s;
|
|
41
46
|
width: 213px;
|
|
47
|
+
${({ $hasPurchaseText }) => $hasPurchaseText
|
|
48
|
+
? 'background: linear-gradient(180deg, rgba(0, 0, 0, 0.70) 25.1px, rgba(0, 0, 0, 0.00) 56px);'
|
|
49
|
+
: ''}
|
|
50
|
+
|
|
51
|
+
img {
|
|
52
|
+
box-shadow: var(--elevation-3);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
.hidden {
|
|
@@ -77,6 +89,10 @@ const Wrapper = styled.a `
|
|
|
77
89
|
rgba(255, 255, 255, 0.85) 55%,
|
|
78
90
|
rgba(255, 255, 255, 0.1) 80%
|
|
79
91
|
);
|
|
92
|
+
|
|
93
|
+
img {
|
|
94
|
+
box-shadow: none;
|
|
95
|
+
}
|
|
80
96
|
}
|
|
81
97
|
|
|
82
98
|
figcaption {
|
|
@@ -97,6 +113,7 @@ const Figure = styled.figure `
|
|
|
97
113
|
position: relative;
|
|
98
114
|
z-index: -1;
|
|
99
115
|
width: 100%;
|
|
116
|
+
height: 225px;
|
|
100
117
|
aspect-ratio: 228 / 228;
|
|
101
118
|
}
|
|
102
119
|
`;
|
|
@@ -13,4 +13,5 @@ export type CardProps = (ActionCardProps | AudioEpisodeCardProps | FeatureCardPr
|
|
|
13
13
|
type: CardType;
|
|
14
14
|
};
|
|
15
15
|
export declare const Card: ({ type, ...rest }: CardProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
export declare const PurchaseTextWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("../atoms/box").BoxProps, never>> & Omit<({ $display, sx, ...args }: import("../atoms/box").BoxProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
|
|
16
17
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Box } from '../atoms/box';
|
|
3
5
|
import { ActionCard } from './action';
|
|
4
6
|
import { AudioEpisodeCard } from './audio';
|
|
5
7
|
import { FeatureCard } from './feature';
|
|
@@ -23,3 +25,11 @@ export const Card = ({ type = 'regular', ...rest }) => {
|
|
|
23
25
|
};
|
|
24
26
|
return lookup[type];
|
|
25
27
|
};
|
|
28
|
+
export const PurchaseTextWrapper = styled(Box) `
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 16px;
|
|
31
|
+
left: 16px;
|
|
32
|
+
width: calc(100% - 32px);
|
|
33
|
+
gap: 8px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
`;
|
|
@@ -8,10 +8,11 @@ export interface VideoEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const VideoEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: VideoEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const VideoEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: VideoEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const VideoEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
|
-
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
10
|
+
return (React.createElement(Wrapper, { "$sx": sx, href: href, "$hasPurchaseText": !!purchaseText },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
!!purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24 }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 213, quality: 100, src: image, width: 379 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -40,6 +45,13 @@ const Wrapper = styled.a `
|
|
|
40
45
|
figure {
|
|
41
46
|
transition: width 0.3s;
|
|
42
47
|
width: 379px;
|
|
48
|
+
${({ $hasPurchaseText }) => $hasPurchaseText
|
|
49
|
+
? 'background: linear-gradient(180deg, rgba(0, 0, 0, 0.70) 25.1px, rgba(0, 0, 0, 0.00) 56px);'
|
|
50
|
+
: ''}
|
|
51
|
+
|
|
52
|
+
img {
|
|
53
|
+
box-shadow: var(--elevation-3);
|
|
54
|
+
}
|
|
43
55
|
}
|
|
44
56
|
|
|
45
57
|
.hidden {
|
|
@@ -72,6 +84,10 @@ const Wrapper = styled.a `
|
|
|
72
84
|
rgba(255, 255, 255, 0.85) 55%,
|
|
73
85
|
rgba(255, 255, 255, 0.1) 80%
|
|
74
86
|
);
|
|
87
|
+
|
|
88
|
+
img {
|
|
89
|
+
box-shadow: none;
|
|
90
|
+
}
|
|
75
91
|
}
|
|
76
92
|
|
|
77
93
|
figcaption {
|
|
@@ -94,7 +110,7 @@ const Figure = styled.figure `
|
|
|
94
110
|
z-index: -1;
|
|
95
111
|
width: 100%;
|
|
96
112
|
aspect-ratio: 379 / 213;
|
|
97
|
-
height:
|
|
113
|
+
height: 225px;
|
|
98
114
|
border-radius: 16px;
|
|
99
115
|
}
|
|
100
116
|
`;
|
|
@@ -8,10 +8,11 @@ export interface WrittenEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const WrittenEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: WrittenEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const WrittenEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: WrittenEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const WrittenEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
|
-
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
10
|
+
return (React.createElement(Wrapper, { "$sx": sx, href: href, "$hasPurchaseText": !!purchaseText },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
!!purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24, sx: "flex-shrink: 0;" }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 228, quality: 100, src: image, width: 176 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -32,13 +37,20 @@ const Wrapper = styled.a `
|
|
|
32
37
|
position: relative;
|
|
33
38
|
z-index: 1;
|
|
34
39
|
user-select: none;
|
|
35
|
-
|
|
40
|
+
aspect-ratio: 149 / 275;
|
|
36
41
|
height: 288px;
|
|
37
42
|
transition: transform 0.3s;
|
|
38
43
|
|
|
39
44
|
figure {
|
|
40
45
|
transition: width 0.3s;
|
|
41
|
-
width:
|
|
46
|
+
width: 100%;
|
|
47
|
+
${({ $hasPurchaseText }) => $hasPurchaseText
|
|
48
|
+
? 'background: linear-gradient(180deg, rgba(0, 0, 0, 0.70) 25.1px, rgba(0, 0, 0, 0.00) 56px);'
|
|
49
|
+
: ''}
|
|
50
|
+
|
|
51
|
+
img {
|
|
52
|
+
box-shadow: var(--elevation-3);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
.hidden {
|
|
@@ -77,6 +89,10 @@ const Wrapper = styled.a `
|
|
|
77
89
|
rgba(255, 255, 255, 0.85) 55%,
|
|
78
90
|
rgba(255, 255, 255, 0.1) 80%
|
|
79
91
|
);
|
|
92
|
+
|
|
93
|
+
img {
|
|
94
|
+
box-shadow: none;
|
|
95
|
+
}
|
|
80
96
|
}
|
|
81
97
|
|
|
82
98
|
figcaption {
|
|
@@ -97,8 +113,8 @@ const Figure = styled.figure `
|
|
|
97
113
|
position: relative;
|
|
98
114
|
z-index: -1;
|
|
99
115
|
width: 100%;
|
|
100
|
-
height:
|
|
101
|
-
aspect-ratio:
|
|
116
|
+
height: 225px;
|
|
117
|
+
aspect-ratio: 149 / 213;
|
|
102
118
|
}
|
|
103
119
|
`;
|
|
104
120
|
const Figcaption = styled.figcaption `
|
|
@@ -9,26 +9,30 @@ export interface FilterProps {
|
|
|
9
9
|
defaultValue?: string | string[];
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
graphic?: React.ReactElement;
|
|
12
|
+
graphicAlignment?: 'left' | 'right';
|
|
12
13
|
label?: string;
|
|
13
14
|
sx?: string;
|
|
14
15
|
triggerType: FilterTriggerTypes;
|
|
15
16
|
options: (Omit<FilterOptionProps, 'selected' | 'onClick'> | 'break')[];
|
|
16
17
|
closeOnChange?: boolean;
|
|
17
18
|
optionOnChange?: (event: React.MouseEvent) => void;
|
|
19
|
+
optionShowClose?: boolean;
|
|
18
20
|
checkbox?: boolean;
|
|
19
21
|
applyOnClick?: (event: React.MouseEvent) => void;
|
|
20
22
|
resetOnClick?: (event: React.MouseEvent) => void;
|
|
23
|
+
applyResetActions?: boolean;
|
|
21
24
|
}
|
|
22
25
|
declare const Filter: {
|
|
23
|
-
({ closeOnBlur, disabled, graphic, label, sx, triggerType, options, defaultValue, closeOnChange, optionOnChange, checkbox, applyOnClick, resetOnClick, }: FilterProps): React.JSX.Element;
|
|
26
|
+
({ closeOnBlur, disabled, graphic, graphicAlignment, label, sx, triggerType, options, defaultValue, closeOnChange, optionOnChange, optionShowClose, checkbox, applyOnClick, resetOnClick, applyResetActions, }: FilterProps): React.JSX.Element;
|
|
24
27
|
Trigger: {
|
|
25
|
-
({ disabled, graphic, label, onClick, open, type, value, }: FilterTriggerProps): React.JSX.Element;
|
|
28
|
+
({ disabled, graphic, graphicAlignment, label, onClick, open, type, value, }: FilterTriggerProps): React.JSX.Element;
|
|
26
29
|
displayName: string;
|
|
27
30
|
};
|
|
28
31
|
};
|
|
29
32
|
export interface FilterTriggerProps {
|
|
30
33
|
disabled?: boolean;
|
|
31
34
|
graphic?: React.ReactElement;
|
|
35
|
+
graphicAlignment?: 'left' | 'right';
|
|
32
36
|
label?: string;
|
|
33
37
|
onClick?: (event: React.MouseEvent) => void;
|
|
34
38
|
open: boolean;
|
|
@@ -5,7 +5,7 @@ import { Box, Button, P } from '../../';
|
|
|
5
5
|
import { ChevronDown, ChevronUp } from '../../../icons';
|
|
6
6
|
import { Styles } from '../../../common';
|
|
7
7
|
import { Spacer, Option } from './filter_option';
|
|
8
|
-
const Filter = ({ closeOnBlur = true, disabled, graphic, label = '', sx, triggerType, options, defaultValue = '', closeOnChange = true, optionOnChange, checkbox, applyOnClick, resetOnClick, }) => {
|
|
8
|
+
const Filter = ({ closeOnBlur = true, disabled, graphic, graphicAlignment = 'left', label = '', sx, triggerType, options, defaultValue = '', closeOnChange = true, optionOnChange, optionShowClose, checkbox, applyOnClick, resetOnClick, applyResetActions, }) => {
|
|
9
9
|
const multiple = !!checkbox;
|
|
10
10
|
const wrapperRef = React.useRef(null);
|
|
11
11
|
const optionsRef = React.useRef(null);
|
|
@@ -92,16 +92,18 @@ const Filter = ({ closeOnBlur = true, disabled, graphic, label = '', sx, trigger
|
|
|
92
92
|
if (typeof option === 'string' && option === 'break') {
|
|
93
93
|
return React.createElement(Spacer, { key: `${React.useId()}-spacer-${index}` });
|
|
94
94
|
}
|
|
95
|
-
return (React.createElement(Option, { key: option.value, onClick: handleChange, selected: isSelected(option.value), checkbox: checkbox, radio: !multiple && triggerType === 'pill', showClose:
|
|
95
|
+
return (React.createElement(Option, { key: option.value, onClick: handleChange, selected: isSelected(option.value), checkbox: checkbox, radio: !multiple && triggerType === 'pill', showClose: optionShowClose === undefined
|
|
96
|
+
? index === 0 && triggerType === 'pill'
|
|
97
|
+
: optionShowClose, onClose: () => setOpen(false), ...option }));
|
|
96
98
|
}),
|
|
97
99
|
triggerType === 'pill' && React.createElement(Spacer, { key: `spacer-${options.length}` }),
|
|
98
100
|
];
|
|
99
101
|
return (React.createElement(Wrapper, { "$sx": sx, tabIndex: 0, ref: wrapperRef, onBlurCapture: handleBlur },
|
|
100
|
-
React.createElement(FilterTrigger, { disabled: disabled, graphic: graphic, label: label, onClick: handleOpen, open: open, type: triggerType, value: filterLabel }),
|
|
102
|
+
React.createElement(FilterTrigger, { disabled: disabled, graphic: graphic, graphicAlignment: graphicAlignment, label: label, onClick: handleOpen, open: open, type: triggerType, value: filterLabel }),
|
|
101
103
|
open && (React.createElement(Container, { ref: optionsRef },
|
|
102
104
|
React.createElement(React.Fragment, null,
|
|
103
105
|
dropdownOptions,
|
|
104
|
-
triggerType === 'pill' && (React.createElement(Box, { "$display": "flex", "$dir": "row", "$align": "center", "$justify": "flex-end", "$gap": 8, sx: "margin-top: 8px; padding-right: 8px; padding-bottom: 8px" },
|
|
106
|
+
triggerType === 'pill' && applyResetActions && (React.createElement(Box, { "$display": "flex", "$dir": "row", "$align": "center", "$justify": "flex-end", "$gap": 8, sx: "margin-top: 8px; padding-right: 8px; padding-bottom: 8px" },
|
|
105
107
|
React.createElement(Button, { onClick: (event) => {
|
|
106
108
|
resetOnClick && resetOnClick(event);
|
|
107
109
|
setSelected(multiple ? [] : '');
|
|
@@ -149,11 +151,12 @@ const wrapperProps = {
|
|
|
149
151
|
$dir: 'row',
|
|
150
152
|
$gap: 16,
|
|
151
153
|
};
|
|
152
|
-
const FilterTrigger = ({ disabled, graphic, label, onClick, open, type, value, }) => {
|
|
154
|
+
const FilterTrigger = ({ disabled, graphic, graphicAlignment, label, onClick, open, type, value, }) => {
|
|
153
155
|
if (type === 'pill') {
|
|
154
156
|
return (React.createElement(Pill, { disabled: disabled, onClick: onClick, "$labelIsDefault": value === label, ...wrapperProps },
|
|
155
|
-
graphic,
|
|
157
|
+
graphicAlignment === 'left' ? graphic : null,
|
|
156
158
|
React.createElement(P, { ...textProps }, value),
|
|
159
|
+
graphicAlignment === 'right' ? graphic : null,
|
|
157
160
|
!graphic && (open ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))));
|
|
158
161
|
}
|
|
159
162
|
if (type === 'labeled') {
|
|
@@ -177,8 +180,10 @@ const FilterTrigger = ({ disabled, graphic, label, onClick, open, type, value, }
|
|
|
177
180
|
open ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)));
|
|
178
181
|
}
|
|
179
182
|
return (React.createElement(Outlined, { disabled: disabled, onClick: onClick, ...wrapperProps },
|
|
183
|
+
graphicAlignment === 'left' ? graphic : null,
|
|
180
184
|
graphic,
|
|
181
185
|
React.createElement(P, { ...textProps }, value),
|
|
186
|
+
graphicAlignment === 'right' ? graphic : null,
|
|
182
187
|
!graphic && (open ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))));
|
|
183
188
|
};
|
|
184
189
|
Filter.Trigger = FilterTrigger;
|