@galaxy-ds/core 2.0.5 → 2.0.7
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/DateRangePicker/DateRangePicker.types.d.ts +2 -1
- package/dist/RibbonButtonGroup/RibbonButtonGroup.types.d.ts +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +108 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +187 -33
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/src/DatePicker/DatePicker.stories.mdx +11 -10
- package/src/DatePicker/support/DatePickerExample.tsx +14 -0
- package/src/DateRangePicker/DateRangePicker.stories.mdx +28 -16
- package/src/DateRangePicker/DateRangePicker.test.tsx +6 -1
- package/src/DateRangePicker/DateRangePicker.types.ts +11 -1
- package/src/DateRangePicker/support/DateRangePickerExample.tsx +31 -0
- package/src/RibbonButton/RibbonButton.stories.mdx +27 -3
- package/src/RibbonButton/RibbonButton.styled.tsx +4 -5
- package/src/RibbonButton/RibbonButton.tsx +2 -1
- package/src/RibbonButtonGroup/RibbonButtonGroup.stories.mdx +27 -2
- package/src/RibbonButtonGroup/RibbonButtonGroup.tsx +2 -2
- package/src/RibbonButtonGroup/RibbonButtonGroup.types.ts +11 -12
- package/src/Theme/leap/desktop/design-tokens/typography.ts +17 -18
- package/src/index.ts +2 -0
- package/src/DatePicker/support/DatePickerExample.js +0 -15
- package/src/DateRangePicker/support/DateRangePickerExample.js +0 -22
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
|
|
2
2
|
import DatePicker from './DatePicker';
|
|
3
|
-
import DatePickerExample from './support/DatePickerExample
|
|
3
|
+
import DatePickerExample from './support/DatePickerExample';
|
|
4
4
|
|
|
5
5
|
<Meta title="Form Elements/Calendars/DatePicker" component={DatePicker} />
|
|
6
6
|
|
|
@@ -12,15 +12,16 @@ import DatePickerExample from './support/DatePickerExample.js';
|
|
|
12
12
|
docs: {
|
|
13
13
|
source: {
|
|
14
14
|
code: `
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
15
|
+
import React, { useState } from 'react';
|
|
16
|
+
import { DatePicker } from '@galaxy-ds/core';
|
|
17
|
+
const DatePickerExample: React.FC = () => {
|
|
18
|
+
const [date, setDate] = useState<Date>(new Date());
|
|
19
|
+
const handleChange = (item: Date) => {
|
|
20
|
+
console.log(item);
|
|
21
|
+
setDate(item);
|
|
22
|
+
};
|
|
23
|
+
return <DatePicker onChange={handleChange} date={date}></DatePicker>;
|
|
24
|
+
};
|
|
24
25
|
`
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { DatePicker } from '../';
|
|
3
|
+
|
|
4
|
+
const DatePickerExample: React.FC = () => {
|
|
5
|
+
const [date, setDate] = useState<Date>(new Date());
|
|
6
|
+
const handleChange = (item: Date) => {
|
|
7
|
+
console.log(item);
|
|
8
|
+
setDate(item);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return <DatePicker onChange={handleChange} date={date} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default DatePickerExample;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
|
|
2
2
|
import DateRangePicker from './DateRangePicker';
|
|
3
|
-
import DateRangePickerExample from './support/DateRangePickerExample
|
|
3
|
+
import DateRangePickerExample from './support/DateRangePickerExample';
|
|
4
4
|
|
|
5
5
|
<Meta title="Form Elements/Calendars/DateRangePicker" component={DateRangePicker} />
|
|
6
6
|
|
|
@@ -16,22 +16,28 @@ Date range picker with default 2 months side by side.
|
|
|
16
16
|
code: `
|
|
17
17
|
import React, { useState } from 'react';
|
|
18
18
|
import { DateRangePicker } from '@galaxy-ds/core';
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import type { DateRangePickerProps, Range, RangeKeyDict } from '@galaxy-ds/core';
|
|
20
|
+
const DateRangePickerExample: React.FC<DateRangePickerProps> = () => {
|
|
21
|
+
const [selectionRange, setSelectionRange] = useState<Range>(
|
|
21
22
|
{
|
|
22
23
|
startDate: new Date(),
|
|
24
|
+
endDate: new Date(),
|
|
23
25
|
key: 'selection',
|
|
24
26
|
},
|
|
25
|
-
|
|
27
|
+
);
|
|
28
|
+
const handleSelect = (ranges: RangeKeyDict) => {
|
|
29
|
+
console.table(ranges);
|
|
30
|
+
setSelectionRange(ranges['selection'])
|
|
31
|
+
}
|
|
26
32
|
return (
|
|
27
33
|
<DateRangePicker
|
|
28
|
-
onChange={
|
|
29
|
-
ranges={
|
|
34
|
+
onChange={handleSelect}
|
|
35
|
+
ranges={[selectionRange]}
|
|
30
36
|
months={2}
|
|
31
37
|
dateDisplayFormat='dd MMMM yyyy'
|
|
32
|
-
|
|
38
|
+
/>
|
|
33
39
|
);
|
|
34
|
-
}
|
|
40
|
+
};
|
|
35
41
|
`
|
|
36
42
|
}
|
|
37
43
|
}
|
|
@@ -69,24 +75,30 @@ Show just a single month with `months={1}`.
|
|
|
69
75
|
docs: {
|
|
70
76
|
source: {
|
|
71
77
|
code: `
|
|
72
|
-
import React, {useState} from 'react';
|
|
78
|
+
import React, { useState } from 'react';
|
|
73
79
|
import { DateRangePicker } from '@galaxy-ds/core';
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
import type { DateRangePickerProps, Range, RangeKeyDict } from '@galaxy-ds/core';
|
|
81
|
+
const DateRangePickerExample: React.FC<DateRangePickerProps> = () => {
|
|
82
|
+
const [selectionRange, setSelectionRange] = useState<Range>(
|
|
76
83
|
{
|
|
77
84
|
startDate: new Date(),
|
|
85
|
+
endDate: new Date(),
|
|
78
86
|
key: 'selection',
|
|
79
87
|
},
|
|
80
|
-
|
|
88
|
+
);
|
|
89
|
+
const handleSelect = (ranges: RangeKeyDict) => {
|
|
90
|
+
console.table(ranges);
|
|
91
|
+
setSelectionRange(ranges['selection'])
|
|
92
|
+
}
|
|
81
93
|
return (
|
|
82
94
|
<DateRangePicker
|
|
83
|
-
onChange={
|
|
84
|
-
ranges={
|
|
95
|
+
onChange={handleSelect}
|
|
96
|
+
ranges={[selectionRange]}
|
|
85
97
|
months={1}
|
|
86
98
|
dateDisplayFormat='dd MMMM yyyy'
|
|
87
|
-
|
|
99
|
+
/>
|
|
88
100
|
);
|
|
89
|
-
}
|
|
101
|
+
};
|
|
90
102
|
`
|
|
91
103
|
}
|
|
92
104
|
}
|
|
@@ -3,5 +3,10 @@ import { render } from '@testing-library/react';
|
|
|
3
3
|
import DateRangePicker from './DateRangePicker';
|
|
4
4
|
|
|
5
5
|
test('DateRangePicker', () => {
|
|
6
|
-
|
|
6
|
+
const ranges = {
|
|
7
|
+
startDate: new Date(),
|
|
8
|
+
endDate: new Date(),
|
|
9
|
+
key: 'selection',
|
|
10
|
+
};
|
|
11
|
+
render(<DateRangePicker ranges={[ranges]} />);
|
|
7
12
|
});
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
|
+
DateRangePickerProps as ReactDateRangePickerProps,
|
|
3
|
+
Range,
|
|
4
|
+
RangeFocus,
|
|
5
|
+
RangeKeyDict,
|
|
6
|
+
Preview,
|
|
7
|
+
StaticRange,
|
|
8
|
+
InputRange,
|
|
9
|
+
} from 'react-date-range';
|
|
2
10
|
|
|
3
11
|
export interface DateRangePickerProps extends ReactDateRangePickerProps {}
|
|
12
|
+
|
|
13
|
+
export { Range, RangeFocus, RangeKeyDict, Preview, StaticRange, InputRange };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { DateRangePicker } from '../';
|
|
3
|
+
import type {
|
|
4
|
+
DateRangePickerProps,
|
|
5
|
+
Range,
|
|
6
|
+
RangeKeyDict,
|
|
7
|
+
} from '../DateRangePicker.types';
|
|
8
|
+
|
|
9
|
+
const DateRangePickerExample: React.FC<DateRangePickerProps> = ({ months }) => {
|
|
10
|
+
const [selectionRange, setSelectionRange] = useState<Range>({
|
|
11
|
+
startDate: new Date(),
|
|
12
|
+
endDate: new Date(),
|
|
13
|
+
key: 'selection',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const handleSelect = (ranges: RangeKeyDict) => {
|
|
17
|
+
console.table(ranges);
|
|
18
|
+
setSelectionRange(ranges['selection']);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<DateRangePicker
|
|
23
|
+
onChange={handleSelect}
|
|
24
|
+
ranges={[selectionRange]}
|
|
25
|
+
months={months}
|
|
26
|
+
dateDisplayFormat="dd MMMM yyyy"
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default DateRangePickerExample;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs"
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs";
|
|
2
|
+
import {
|
|
3
|
+
NewEntryRibbonIcon,
|
|
4
|
+
CalendarRibbonIcon,
|
|
5
|
+
DeleteRibbonIcon,
|
|
6
|
+
MatterFolderRibbonIcon
|
|
7
|
+
} from "../Icons/leap";
|
|
8
|
+
import { Divider } from "../Divider";
|
|
9
|
+
import { RibbonButton } from "./RibbonButton";
|
|
4
10
|
|
|
5
11
|
<Meta title="components/Buttons/RibbonButton" component={RibbonButton} />
|
|
6
12
|
|
|
@@ -36,4 +42,22 @@ import { RibbonButton } from "./RibbonButton"
|
|
|
36
42
|
</Story>
|
|
37
43
|
</Canvas>
|
|
38
44
|
|
|
45
|
+
<Canvas withToolbar>
|
|
46
|
+
<Story
|
|
47
|
+
name="Toolbar"
|
|
48
|
+
>
|
|
49
|
+
{() => (
|
|
50
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
51
|
+
<RibbonButton icon={<NewEntryRibbonIcon />} label="New Entry" isWrapped />
|
|
52
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
53
|
+
<RibbonButton icon={<CalendarRibbonIcon />} label="11th October" isWrapped />
|
|
54
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
55
|
+
<RibbonButton icon={<DeleteRibbonIcon />} label="Delete" />
|
|
56
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
57
|
+
<RibbonButton icon={<MatterFolderRibbonIcon />} label="Open Matter" isWrapped />
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
</Story>
|
|
61
|
+
</Canvas>
|
|
62
|
+
|
|
39
63
|
<ArgsTable story="Default" />
|
|
@@ -49,12 +49,11 @@ export const RibbonLabelStyled = styled(Typography)({
|
|
|
49
49
|
export const RibbonContentStyled = styled('div', {
|
|
50
50
|
shouldForwardProp: (prop) => prop !== 'isWrapped',
|
|
51
51
|
})<{ isWrapped?: boolean }>(({ isWrapped }) => ({
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
height: '100%',
|
|
52
56
|
...(isWrapped && {
|
|
53
|
-
height: '80px',
|
|
54
57
|
width: '54px',
|
|
55
|
-
p: {
|
|
56
|
-
position: 'relative',
|
|
57
|
-
bottom: '8px',
|
|
58
|
-
},
|
|
59
58
|
}),
|
|
60
59
|
}));
|
|
@@ -8,8 +8,9 @@ import { RibbonButtonProps, RibbonButtonRef } from './RibbonButton.types';
|
|
|
8
8
|
|
|
9
9
|
export const RibbonButton = forwardRef<RibbonButtonRef, RibbonButtonProps>(
|
|
10
10
|
function RibbonMenuListButton(props, ref) {
|
|
11
|
+
const { isWrapped, icon, label, ...rest } = props;
|
|
11
12
|
return (
|
|
12
|
-
<RibbonButtonStyled ref={ref} variant="outlined" {...
|
|
13
|
+
<RibbonButtonStyled ref={ref} variant="outlined" {...rest}>
|
|
13
14
|
<RibbonContentStyled isWrapped={props.isWrapped}>
|
|
14
15
|
{props.icon}
|
|
15
16
|
<RibbonLabelStyled variant="body2">{props.label}</RibbonLabelStyled>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
NewEntryRibbonIcon,
|
|
4
|
+
CalendarRibbonIcon,
|
|
5
|
+
DeleteRibbonIcon,
|
|
6
|
+
MatterFolderRibbonIcon
|
|
7
|
+
} from "../Icons/leap";
|
|
8
|
+
import { Divider } from "../Divider";
|
|
9
|
+
import { RibbonButton } from "../RibbonButton";
|
|
3
10
|
import { RibbonButtonGroup } from "./RibbonButtonGroup"
|
|
4
11
|
import { RibbonButtonGroupMenuExample } from "./RibbonButtonGroupMenuExample"
|
|
5
12
|
|
|
@@ -22,7 +29,25 @@ import { RibbonButtonGroupMenuExample } from "./RibbonButtonGroupMenuExample"
|
|
|
22
29
|
name="Wrapped"
|
|
23
30
|
>
|
|
24
31
|
{() => (
|
|
25
|
-
<RibbonButtonGroup icon={<MatterFolderRibbonIcon />} label="Open Matter" isWrapped/>
|
|
32
|
+
<RibbonButtonGroup icon={<MatterFolderRibbonIcon />} label="Open Matter" isWrapped />
|
|
33
|
+
)}
|
|
34
|
+
</Story>
|
|
35
|
+
</Canvas>
|
|
36
|
+
|
|
37
|
+
<Canvas withToolbar>
|
|
38
|
+
<Story
|
|
39
|
+
name="Toolbar"
|
|
40
|
+
>
|
|
41
|
+
{() => (
|
|
42
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
43
|
+
<RibbonButtonGroup icon={<NewEntryRibbonIcon />} label="New Entry" isWrapped />
|
|
44
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
45
|
+
<RibbonButton icon={<CalendarRibbonIcon />} label="11th October" isWrapped />
|
|
46
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
47
|
+
<RibbonButton icon={<DeleteRibbonIcon />} label="Delete" />
|
|
48
|
+
<Divider orientation="vertical" sx={{ '&.MuiDivider-root': { height: '70px' }}} />
|
|
49
|
+
<RibbonButton icon={<MatterFolderRibbonIcon />} label="Open Matter" isWrapped />
|
|
50
|
+
</div>
|
|
26
51
|
)}
|
|
27
52
|
</Story>
|
|
28
53
|
</Canvas>
|
|
@@ -14,14 +14,14 @@ export const RibbonButtonGroup = forwardRef<
|
|
|
14
14
|
RibbonButtonGroupRef,
|
|
15
15
|
RibbonButtonGroupProps
|
|
16
16
|
>(function RibbonButtonGroup(props, ref) {
|
|
17
|
-
const { icon, label, isWrapped, onToggle, onClick } = props;
|
|
17
|
+
const { icon, label, isWrapped, onToggle, onClick, ...rest } = props;
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<RibbonButtonGroupStyled
|
|
21
21
|
variant="outlined"
|
|
22
22
|
disableRipple
|
|
23
23
|
ref={ref}
|
|
24
|
-
{...
|
|
24
|
+
{...rest}
|
|
25
25
|
>
|
|
26
26
|
<RibbonButtonStyled
|
|
27
27
|
variant="outlined"
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { ButtonGroupProps as MuiButtonGroupProps } from '@mui/material';
|
|
2
2
|
import { RibbonButtonProps } from '../RibbonButton/RibbonButton.types';
|
|
3
3
|
|
|
4
|
-
type ButtonGroupProps = MuiButtonGroupProps;
|
|
4
|
+
type ButtonGroupProps = MuiButtonGroupProps & RibbonButtonProps;
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
6
|
+
export interface RibbonButtonGroupProps extends ButtonGroupProps {
|
|
7
|
+
/**
|
|
8
|
+
* Primary Action
|
|
9
|
+
* */
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Secondary Action
|
|
13
|
+
* */
|
|
14
|
+
onToggle?: () => void;
|
|
15
|
+
}
|
|
17
16
|
|
|
18
17
|
export type RibbonButtonGroupRef = HTMLDivElement;
|
|
@@ -1,73 +1,69 @@
|
|
|
1
1
|
import { TypographyOptions } from "@mui/material/styles/createTypography"
|
|
2
2
|
|
|
3
|
+
const FONT_FAMILY = [
|
|
4
|
+
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
5
|
+
].join(",");
|
|
6
|
+
|
|
3
7
|
const typography: TypographyOptions = {
|
|
4
|
-
fontFamily:
|
|
5
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
6
|
-
].join(","),
|
|
8
|
+
fontFamily: FONT_FAMILY,
|
|
7
9
|
h1: {
|
|
8
|
-
fontFamily:
|
|
9
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
10
|
-
].join(","),
|
|
10
|
+
fontFamily: FONT_FAMILY,
|
|
11
11
|
fontWeight: 400,
|
|
12
12
|
fontSize: 24,
|
|
13
13
|
lineHeight: 1.25,
|
|
14
14
|
letterSpacing: "-0.5px",
|
|
15
15
|
},
|
|
16
16
|
h2: {
|
|
17
|
-
fontFamily:
|
|
18
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
19
|
-
].join(","),
|
|
17
|
+
fontFamily: FONT_FAMILY,
|
|
20
18
|
fontWeight: 400,
|
|
21
19
|
fontSize: 16,
|
|
22
20
|
lineHeight: 1.1667,
|
|
23
21
|
letterSpacing: "-0.5px",
|
|
24
22
|
},
|
|
25
23
|
h3: {
|
|
26
|
-
fontFamily:
|
|
27
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
28
|
-
].join(","),
|
|
24
|
+
fontFamily: FONT_FAMILY,
|
|
29
25
|
fontWeight: 400,
|
|
30
26
|
fontSize: 12,
|
|
31
27
|
lineHeight: 1.2,
|
|
32
28
|
letterSpacing: "-0.5px",
|
|
33
29
|
},
|
|
34
30
|
h4: {
|
|
35
|
-
fontFamily:
|
|
36
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
37
|
-
].join(","),
|
|
31
|
+
fontFamily: FONT_FAMILY,
|
|
38
32
|
fontWeight: 500,
|
|
39
33
|
fontSize: 14,
|
|
40
34
|
lineHeight: "1.5rem",
|
|
41
35
|
letterSpacing: "0",
|
|
42
36
|
},
|
|
43
37
|
h5: {
|
|
38
|
+
fontFamily: FONT_FAMILY,
|
|
44
39
|
fontWeight: 400,
|
|
45
40
|
fontSize: 13,
|
|
46
41
|
lineHeight: "2rem",
|
|
47
42
|
letterSpacing: "0",
|
|
48
43
|
},
|
|
49
44
|
h6: {
|
|
50
|
-
fontFamily:
|
|
51
|
-
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",
|
|
52
|
-
].join(","),
|
|
45
|
+
fontFamily: FONT_FAMILY,
|
|
53
46
|
fontWeight: 400,
|
|
54
47
|
fontSize: 16,
|
|
55
48
|
lineHeight: 1.1667,
|
|
56
49
|
letterSpacing: "-0.5px",
|
|
57
50
|
},
|
|
58
51
|
body1: {
|
|
52
|
+
fontFamily: FONT_FAMILY,
|
|
59
53
|
fontWeight: 400,
|
|
60
54
|
fontSize: 14,
|
|
61
55
|
lineHeight: "1.5rem",
|
|
62
56
|
letterSpacing: "0",
|
|
63
57
|
},
|
|
64
58
|
body2: {
|
|
59
|
+
fontFamily: FONT_FAMILY,
|
|
65
60
|
fontWeight: 400,
|
|
66
61
|
fontSize: 12,
|
|
67
62
|
lineHeight: "1.25rem", // Use rem here for accurate height calculation
|
|
68
63
|
letterSpacing: "0",
|
|
69
64
|
},
|
|
70
65
|
button: {
|
|
66
|
+
fontFamily: FONT_FAMILY,
|
|
71
67
|
fontWeight: 400,
|
|
72
68
|
fontSize: 14,
|
|
73
69
|
lineHeight: "1.371",
|
|
@@ -75,18 +71,21 @@ const typography: TypographyOptions = {
|
|
|
75
71
|
textTransform: 'capitalize'
|
|
76
72
|
},
|
|
77
73
|
caption: {
|
|
74
|
+
fontFamily: FONT_FAMILY,
|
|
78
75
|
fontWeight: 500,
|
|
79
76
|
fontSize: 12,
|
|
80
77
|
lineHeight: '0.875rem',
|
|
81
78
|
letterSpacing: '0.07px'
|
|
82
79
|
},
|
|
83
80
|
subtitle1: {
|
|
81
|
+
fontFamily: FONT_FAMILY,
|
|
84
82
|
fontWeight: 500,
|
|
85
83
|
fontSize: 14,
|
|
86
84
|
lineHeight: "1.5rem",
|
|
87
85
|
letterSpacing: "0",
|
|
88
86
|
},
|
|
89
87
|
subtitle2: {
|
|
88
|
+
fontFamily: FONT_FAMILY,
|
|
90
89
|
fontWeight: 500,
|
|
91
90
|
fontSize: 12,
|
|
92
91
|
lineHeight: "1.25rem", // Use rem here for accurate height calculation
|
package/src/index.ts
CHANGED
|
@@ -91,5 +91,7 @@ export * from './AttachmentIcon';
|
|
|
91
91
|
export * from './Icons/leap';
|
|
92
92
|
export * from './Icons/common/Forms';
|
|
93
93
|
export * from './Logos/Leap';
|
|
94
|
+
export * from './Icons/doctypes/Doctype';
|
|
95
|
+
export * from './Icons/doctypes/Doctype16';
|
|
94
96
|
|
|
95
97
|
export const IconsPath = '../Icons/lawconnect/';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react';
|
|
2
|
-
import DatePicker from '../DatePicker';
|
|
3
|
-
|
|
4
|
-
function DatePickerExample() {
|
|
5
|
-
const [date, setDate] = useState(null);
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<DatePicker
|
|
9
|
-
onChange={(item) => setDate(item)}
|
|
10
|
-
date={date}
|
|
11
|
-
></DatePicker>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default DatePickerExample;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react';
|
|
2
|
-
import DateRangePicker from '../DateRangePicker';
|
|
3
|
-
|
|
4
|
-
function DateRangePickerExample({months}) {
|
|
5
|
-
const [state, setState] = useState([
|
|
6
|
-
{
|
|
7
|
-
startDate: new Date(),
|
|
8
|
-
key: 'selection',
|
|
9
|
-
},
|
|
10
|
-
]);
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<DateRangePicker
|
|
14
|
-
onChange={(item) => setState([item.selection])}
|
|
15
|
-
ranges={state}
|
|
16
|
-
months={months}
|
|
17
|
-
dateDisplayFormat='dd MMMM yyyy'
|
|
18
|
-
></DateRangePicker>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default DateRangePickerExample;
|