@soul-refiner/design-system 0.1.20 → 0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soul-refiner/design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"react-dnd-html5-backend": "^16.0.1",
|
|
55
55
|
"react-dom": "^18.2.0",
|
|
56
56
|
"react-is": "^18.2.0",
|
|
57
|
+
"react-tooltip": "^5.18.0",
|
|
57
58
|
"scheduler": "^0.23.0",
|
|
58
59
|
"slate": "^0.94.1",
|
|
59
60
|
"slate-history": "^0.93.0",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip as ReactTooltip, PlacesType } from 'react-tooltip';
|
|
3
|
+
|
|
4
|
+
export interface TooltipProps extends React.PropsWithChildren {
|
|
5
|
+
content: string;
|
|
6
|
+
place: PlacesType;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const Tooltip = ({ children, content, place = 'top' }: TooltipProps) => {
|
|
10
|
+
const id = React.useId();
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<ReactTooltip
|
|
14
|
+
id={id}
|
|
15
|
+
place={place}
|
|
16
|
+
style={{
|
|
17
|
+
fontFamily: 'Inter',
|
|
18
|
+
fontSize: '12px',
|
|
19
|
+
fontWeight: 400,
|
|
20
|
+
lineHeight: '150%',
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
padding: '8px',
|
|
23
|
+
maxWidth: '280px',
|
|
24
|
+
backgroundColor: 'var(--color-grey-3)',
|
|
25
|
+
boxShadow: 'var(--elevation-2)',
|
|
26
|
+
borderRadius: '4px',
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
{React.Children.map(children, (child) => {
|
|
30
|
+
return (
|
|
31
|
+
React.isValidElement(child) &&
|
|
32
|
+
React.cloneElement(child, {
|
|
33
|
+
'data-tooltip-id': id,
|
|
34
|
+
'data-tooltip-content': content,
|
|
35
|
+
} as any)
|
|
36
|
+
);
|
|
37
|
+
})}
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { Button, P } from 'components';
|
|
4
|
-
import { ChevronLeft, ChevronRight } from 'icons';
|
|
5
3
|
import { MONTHS, WEEKDAYS } from 'common';
|
|
4
|
+
import { Button, P } from 'components';
|
|
5
|
+
import { ChevronLeft, ChevronRight, ArrowRight } from 'icons';
|
|
6
6
|
import { buildCalendar, getMonthDays, zeroPad } from 'utils';
|
|
7
7
|
|
|
8
8
|
export interface DatePickerProps {
|
|
@@ -238,9 +238,9 @@ export const DatePicker = ({
|
|
|
238
238
|
<span>
|
|
239
239
|
{startDate.toLocaleDateString('en-US').replaceAll('/', '-')}
|
|
240
240
|
</span>
|
|
241
|
-
{!!endDate &&
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
{!!endDate && startDate.toDateString() !== endDate?.toDateString() && (
|
|
242
|
+
<ArrowRight sx="padding: 0px 8px; margin-bottom: -2px;" />
|
|
243
|
+
)}
|
|
244
244
|
{startDate.toDateString() !== endDate?.toDateString() && (
|
|
245
245
|
<span>
|
|
246
246
|
{endDate?.toLocaleDateString('en-US').replaceAll('/', '-')}
|
|
@@ -388,9 +388,12 @@ const Trigger = styled.button`
|
|
|
388
388
|
outline: none;
|
|
389
389
|
line-height: 100%;
|
|
390
390
|
font-family: Inter;
|
|
391
|
+
font-size: 14px;
|
|
392
|
+
line-height: 20px;
|
|
391
393
|
cursor: pointer;
|
|
392
394
|
|
|
393
395
|
span {
|
|
396
|
+
line-height: 20px;
|
|
394
397
|
color: var(--color-blue-5);
|
|
395
398
|
}
|
|
396
399
|
|