@galaxy-ds/core 2.0.4 → 2.0.6
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 +3 -0
- package/dist/index.esm.js +471 -327
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +474 -326
- 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/index.ts +4 -1
- package/dist/Accordion/AccordionProps.types.d.ts +0 -10
- package/dist/AccordionDetails/AccordionDetails.styled.d.ts +0 -2
- package/dist/AccordionDetails/AccordionDetailsProps.types.d.ts +0 -3
- package/dist/AccordionPanel/AccordionPanel.styled.d.ts +0 -17
- package/dist/AccordionPanel/AccordionPanelProps.types.d.ts +0 -3
- package/dist/AccordionSummary/AccordionSummary.styled.d.ts +0 -7
- package/dist/AccordionSummary/AccordionSummaryProps.types.d.ts +0 -4
- package/dist/AppointmentCalendar/AppointmentCalendar.d.ts +0 -4
- package/dist/AppointmentCalendar/AppointmentCalendarProps.types.d.ts +0 -89
- package/dist/Autocomplete/AutocompleteProps.types.d.ts +0 -80
- package/dist/AvatarGroup/AvatarGroupProps.types.d.ts +0 -8
- package/dist/AvatarsGroup/AvatarsGroup.d.ts +0 -4
- package/dist/AvatarsGroup/AvatarsGroup.types.d.ts +0 -9
- package/dist/Badge/Badge.d.ts +0 -4
- package/dist/Badge/Badge.styled.d.ts +0 -4
- package/dist/Badge/Badge.types.d.ts +0 -3
- package/dist/Badge/index.d.ts +0 -2
- package/dist/BottomListButton/BottomListButtonProps.types.d.ts +0 -4
- package/dist/Box/BoxProps.types.d.ts +0 -3
- package/dist/Breadcrumbs/BreadcrumbsProps.types.d.ts +0 -4
- package/dist/Button/ButtonProps.types.d.ts +0 -5
- package/dist/Card/CardProps.types.d.ts +0 -6
- package/dist/Chip/ChipProps.types.d.ts +0 -10
- package/dist/DatePicker/DatePickerProps.types.d.ts +0 -10
- package/dist/DateRangePicker/DateRangePickerProps.types.d.ts +0 -3
- package/dist/Dialog/Dialog.types.d.ts +0 -11
- package/dist/Divider/DividerProps.types.d.ts +0 -5
- package/dist/Drawer/DrawerProps.types.d.ts +0 -10
- package/dist/DrawerMenu/DrawerMenuProps.types.d.ts +0 -29
- package/dist/EmptyState/EmptyStateProps.types.d.ts +0 -7
- package/dist/FooterActions/FooterActionsProps.types.d.ts +0 -5
- package/dist/FormGroup/FormGroupProps.types.d.ts +0 -23
- package/dist/Grid/GridProps.types.d.ts +0 -3
- package/dist/HeaderToolbar/HeaderToolbarProps.types.d.ts +0 -25
- package/dist/Icon/IconProps.types.d.ts +0 -4
- package/dist/Icons/Access.d.ts +0 -3
- package/dist/Icons/AccountingIcon.d.ts +0 -3
- package/dist/Icons/AssignCurvedIcon.d.ts +0 -3
- package/dist/Icons/AvatarBusiness.d.ts +0 -3
- package/dist/Icons/AvatarCompany.d.ts +0 -3
- package/dist/Icons/AvatarGovernment.d.ts +0 -3
- package/dist/Icons/AvatarPeople.d.ts +0 -3
- package/dist/Icons/AvatarPerson.d.ts +0 -3
- package/dist/Icons/AvatarTrust.d.ts +0 -3
- package/dist/Icons/Browse.d.ts +0 -3
- package/dist/Icons/Browse2.d.ts +0 -3
- package/dist/Icons/ButtonCaret.d.ts +0 -3
- package/dist/Icons/ButtonFilter.d.ts +0 -3
- package/dist/Icons/Calendar.d.ts +0 -3
- package/dist/Icons/ChevronDown.d.ts +0 -3
- package/dist/Icons/ChevronLeft.d.ts +0 -3
- package/dist/Icons/ChevronRight.d.ts +0 -3
- package/dist/Icons/CoinEuroIcon.d.ts +0 -3
- package/dist/Icons/CoinIcon.d.ts +0 -3
- package/dist/Icons/CoinPoundIcon.d.ts +0 -3
- package/dist/Icons/Cross.d.ts +0 -3
- package/dist/Icons/CrossIcon16.d.ts +0 -3
- package/dist/Icons/CurrencyEuroIcon.d.ts +0 -3
- package/dist/Icons/CurrencyIcon.d.ts +0 -3
- package/dist/Icons/CurrencyPoundIcon.d.ts +0 -3
- package/dist/Icons/Dialog/Alert.d.ts +0 -3
- package/dist/Icons/Dialog/Info.d.ts +0 -3
- package/dist/Icons/Dialog/InfoCircle.d.ts +0 -3
- package/dist/Icons/Dialog/LeapLogo.d.ts +0 -3
- package/dist/Icons/Dialog/Warning.d.ts +0 -3
- package/dist/Icons/Doctype/ActivityTypeDefault.d.ts +0 -3
- package/dist/Icons/Doctype/ActivityTypePhoneCall.d.ts +0 -3
- package/dist/Icons/Doctype/ActivityTypeScannedDoc.d.ts +0 -3
- package/dist/Icons/Doctype/ActivityTypeVideoCall.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeAppointment.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeAppointmentCriticalDate.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeAudio.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeClausePrecedent.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeComment.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeCriticalDate.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeDeadline.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeDefault.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeEmail.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeEmailDraft.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeEmailReceived.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeEmailRecieved.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeEmailSent.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeExcel.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeFax.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeFileNote.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeFolder.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeImage.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeInfotrack.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeInvoiceRequest.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeInvoiceRequests.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeLetter.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeMemo.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypePdf.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypePowerpoint.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeSMS.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeSignatureDeclined.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeSignaturePending.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeSignatureRequest.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeSignatureSigned.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeTasks.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeTrust.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeVideo.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeWord.d.ts +0 -3
- package/dist/Icons/Doctype/DocTypeZip.d.ts +0 -3
- package/dist/Icons/Doctype/index.d.ts +0 -39
- package/dist/Icons/Doctype16/ActivityTypeDefault16.d.ts +0 -3
- package/dist/Icons/Doctype16/ActivityTypePhoneCall16.d.ts +0 -3
- package/dist/Icons/Doctype16/ActivityTypeScannedDoc16.d.ts +0 -3
- package/dist/Icons/Doctype16/ActivityTypeVideoCall16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeAppointment16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeAppointmentCriticalDate16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeAudio16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeClausePrecedent16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeComment16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeCriticalDate16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeDeadline16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeDefault16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeEmail16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeEmailDraft16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeEmailReceived16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeEmailSent16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeExcel16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeFax16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeFileNote16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeFolder16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeImage16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeInfotrack16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeInvoiceRequest16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeInvoiceRequests16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeLetter16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeMemo16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypePdf16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypePowerpoint16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeSMS16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeSignatureDeclined16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeSignaturePending16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeSignatureRequest16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeSignatureSigned16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeTasks16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeTrust16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeVideo16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeWord16.d.ts +0 -3
- package/dist/Icons/Doctype16/DocTypeZip16.d.ts +0 -3
- package/dist/Icons/Doctype16/index.d.ts +0 -38
- package/dist/Icons/EmailSentIcon.d.ts +0 -3
- package/dist/Icons/EnvelopeIcon.d.ts +0 -3
- package/dist/Icons/HomeIcon.d.ts +0 -3
- package/dist/Icons/InsertLink.d.ts +0 -3
- package/dist/Icons/LinkMatter.d.ts +0 -3
- package/dist/Icons/LinkMatterIcon.d.ts +0 -3
- package/dist/Icons/Loader.d.ts +0 -3
- package/dist/Icons/Logos/LawconnectIcon.d.ts +0 -2
- package/dist/Icons/Logos/LeapLogo.d.ts +0 -2
- package/dist/Icons/Logos/poweredByLawconnect.d.ts +0 -2
- package/dist/Icons/MenuIcon.d.ts +0 -3
- package/dist/Icons/MoreVerticalIcon.d.ts +0 -3
- package/dist/Icons/NewAppointment.d.ts +0 -3
- package/dist/Icons/Power.d.ts +0 -3
- package/dist/Icons/Preview.d.ts +0 -3
- package/dist/Icons/Receipt.d.ts +0 -3
- package/dist/Icons/ReportingIcon.d.ts +0 -3
- package/dist/Icons/ResponseIcon.d.ts +0 -3
- package/dist/Icons/RevokeAccess.d.ts +0 -3
- package/dist/Icons/Search.d.ts +0 -3
- package/dist/Icons/SelectFilterEmpty.d.ts +0 -3
- package/dist/Icons/SelectFilterFilled.d.ts +0 -3
- package/dist/Icons/Spinner.d.ts +0 -3
- package/dist/Icons/Tick.d.ts +0 -3
- package/dist/Icons/UserLink.d.ts +0 -3
- package/dist/Icons/UserLock.d.ts +0 -3
- package/dist/Icons/Users.d.ts +0 -3
- package/dist/Icons/ViewAsUser.d.ts +0 -3
- package/dist/Icons/ViewAsUserIcon.d.ts +0 -3
- package/dist/Icons/activities/activities16/ActivityTypeDefault16.d.ts +0 -3
- package/dist/Icons/activities/activities16/ActivityTypePhoneCall16.d.ts +0 -3
- package/dist/Icons/activities/activities16/ActivityTypeScannedDoc16.d.ts +0 -3
- package/dist/Icons/activities/activities16/ActivityTypeVideoCall16.d.ts +0 -3
- package/dist/Icons/index.d.ts +0 -50
- package/dist/Icons/leap/activities/Activities16/ActivityTypeDefault16.d.ts +0 -3
- package/dist/Icons/leap/activities/Activities16/ActivityTypePhoneCall16.d.ts +0 -3
- package/dist/Icons/leap/activities/Activities16/ActivityTypeScannedDoc16.d.ts +0 -3
- package/dist/Icons/leap/activities/Activities16/ActivityTypeVideoCall16.d.ts +0 -3
- package/dist/Icons/leap/ribbon/Calendar32.d.ts +0 -3
- package/dist/Icons/leap/ribbon/CalendarDark32.d.ts +0 -3
- package/dist/Icons/leap/ribbon/Delete32.d.ts +0 -3
- package/dist/Icons/leap/ribbon/DeleteDark32.d.ts +0 -3
- package/dist/Icons/leap/ribbon/MatterFolder32.d.ts +0 -3
- package/dist/Icons/leap/ribbon/MatterFolderDark32.d.ts +0 -3
- package/dist/ImageUpload/ImageUploadProps.types.d.ts +0 -7
- package/dist/Input/InputProps.types.d.ts +0 -26
- package/dist/MenuContext/MenuContext.d.ts +0 -4
- package/dist/MenuContext/MenuContext.types.d.ts +0 -18
- package/dist/MenuHeader/MenuHeaderProps.types.d.ts +0 -3
- package/dist/MenuItemSystem/MenuItemSystem.d.ts +0 -4
- package/dist/MenuItemSystem/MenuItemSystem.types.d.ts +0 -25
- package/dist/Modal/ModalProps.types.d.ts +0 -5
- package/dist/ModalActions/ModalActionsProps.types.d.ts +0 -3
- package/dist/ModalContent/ModalContentProps.types.d.ts +0 -7
- package/dist/ModalTitle/ModalTitleProps.types.d.ts +0 -4
- package/dist/RadioGroup/RadioGroupProps.types.d.ts +0 -4
- package/dist/SidebarLayout/SidebarLayoutProps.types.d.ts +0 -15
- package/dist/Switch/SwitchProps.types.d.ts +0 -3
- package/dist/Table/TableProps.types.d.ts +0 -11
- package/dist/TableBody/TableBodyProps.types.d.ts +0 -8
- package/dist/TableCell/TableCellProps.types.d.ts +0 -14
- package/dist/TableCellIcon/TableCellIconProps.types.d.ts +0 -5
- package/dist/TableContainer/TableContainerProps.types.d.ts +0 -3
- package/dist/TableFooter/TableFooterProps.types.d.ts +0 -8
- package/dist/TableHead/TableHeadProps.types.d.ts +0 -12
- package/dist/TableRow/TableRowProps.types.d.ts +0 -20
- package/dist/Tag/TagProps.types.d.ts +0 -18
- package/dist/ThemeProvider/ThemeProviderProps.types.d.ts +0 -5
- package/dist/Themes/Core/baseline.d.ts +0 -35
- package/dist/Themes/Core/common.d.ts +0 -289
- package/dist/Themes/Core/props.d.ts +0 -31
- package/dist/Themes/Desktop/index.d.ts +0 -1
- package/dist/Themes/Desktop/pallette.d.ts +0 -234
- package/dist/Themes/Desktop/theme.d.ts +0 -1
- package/dist/Themes/Desktop/typography.d.ts +0 -84
- package/dist/Themes/Web/index.d.ts +0 -1
- package/dist/Themes/Web/pallette.d.ts +0 -234
- package/dist/Themes/Web/theme.d.ts +0 -1
- package/dist/Themes/Web/typography.d.ts +0 -93
- package/dist/Themes/index.d.ts +0 -7
- package/dist/ToolbarButton/ToolbarButtonProps.types.d.ts +0 -8
- package/dist/Tooltip/TooltipProps.types.d.ts +0 -3
- package/dist/TwoColumnLayout/TwoColumnLayoutProps.types.d.ts +0 -11
- package/src/DatePicker/support/DatePickerExample.js +0 -15
- package/src/DateRangePicker/support/DateRangePickerExample.js +0 -22
- /package/dist/Icons/doctypes/Doctype16/{DocTypeExcel16ShortCut.d.ts → DocTypeExcel16Shortcut.d.ts} +0 -0
- /package/dist/Logos/Leap/{poweredByLawconnect.d.ts → PoweredByLawconnect.d.ts} +0 -0
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;
|
package/src/index.ts
CHANGED
|
@@ -58,7 +58,10 @@ export * from './ModalContent';
|
|
|
58
58
|
export * from './ModalTitle';
|
|
59
59
|
export * from './Pagination';
|
|
60
60
|
export * from './ProgressBar';
|
|
61
|
+
export * from './Popover';
|
|
61
62
|
export * from './Radio';
|
|
63
|
+
export * from './RibbonButton';
|
|
64
|
+
export * from './RibbonButtonGroup';
|
|
62
65
|
export * from './RadioGroup';
|
|
63
66
|
export * from './Select';
|
|
64
67
|
export * from './SidebarLayout';
|
|
@@ -70,7 +73,7 @@ export * from './Table';
|
|
|
70
73
|
export * from './TableBody';
|
|
71
74
|
export * from './TableCell';
|
|
72
75
|
export * from './TableCellIcon';
|
|
73
|
-
export * from './TableContainer'
|
|
76
|
+
export * from './TableContainer';
|
|
74
77
|
export * from './TableFooter';
|
|
75
78
|
export * from './TableHead';
|
|
76
79
|
export * from './TableRow';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const MuiAccordion: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
children: NonNullable<import("react").ReactNode>;
|
|
4
|
-
classes?: Partial<import("@mui/material").AccordionClasses>;
|
|
5
|
-
defaultExpanded?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
disableGutters?: boolean;
|
|
8
|
-
expanded?: boolean;
|
|
9
|
-
onChange?: (event: import("react").SyntheticEvent<Element, Event>, expanded: boolean) => void;
|
|
10
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
11
|
-
TransitionComponent?: import("react").JSXElementConstructor<import("@mui/material/transitions").TransitionProps & {
|
|
12
|
-
children?: import("react").ReactElement<any, any>;
|
|
13
|
-
}>;
|
|
14
|
-
TransitionProps?: import("@mui/material/transitions").TransitionProps;
|
|
15
|
-
} & Omit<import("@mui/material").PaperOwnProps, "classes" | "onChange"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
-
ref?: import("react").Ref<HTMLDivElement>;
|
|
17
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "onChange" | "children" | "elevation" | "square" | "sx" | "variant" | "defaultExpanded" | "disabled" | "disableGutters" | "expanded" | "TransitionComponent" | "TransitionProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Icon } from "../Icon";
|
|
3
|
-
import { Typography } from "../Typography";
|
|
4
|
-
declare const MuiAccordionSummary: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionSummaryOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
-
ref?: import("react").Ref<HTMLDivElement>;
|
|
6
|
-
}, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
|
-
export { MuiAccordionSummary, Typography, Icon, };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
declare type IdentifierType = string | number;
|
|
2
|
-
interface AddedAppointmentInterface {
|
|
3
|
-
day: string;
|
|
4
|
-
number: IdentifierType;
|
|
5
|
-
time: string;
|
|
6
|
-
id?: IdentifierType;
|
|
7
|
-
}
|
|
8
|
-
declare type AddCallbackType = (day: string, number: IdentifierType, time: string, id?: IdentifierType) => void;
|
|
9
|
-
declare type RemoveCallbackType = (day: string, number: IdentifierType) => void;
|
|
10
|
-
interface SimpleAddCaseInterface {
|
|
11
|
-
addedAppointment: AddedAppointmentInterface;
|
|
12
|
-
addCb: AddCallbackType;
|
|
13
|
-
}
|
|
14
|
-
interface ContinuousAddCaseInterface extends SimpleAddCaseInterface {
|
|
15
|
-
removedAppointment: AddedAppointmentInterface;
|
|
16
|
-
removeCb: RemoveCallbackType;
|
|
17
|
-
}
|
|
18
|
-
declare type AddAppointmentType = (args: ContinuousAddCaseInterface | SimpleAddCaseInterface) => void;
|
|
19
|
-
declare type RemoveAppointmentType = (appointment: AddedAppointmentInterface, removeCb: RemoveCallbackType) => void;
|
|
20
|
-
declare type AppointmentAttributesType = {
|
|
21
|
-
id?: IdentifierType;
|
|
22
|
-
number: IdentifierType;
|
|
23
|
-
isReserved?: boolean;
|
|
24
|
-
isSelected?: boolean;
|
|
25
|
-
periods?: number;
|
|
26
|
-
} | null;
|
|
27
|
-
interface AppointmentCalendarProps {
|
|
28
|
-
/**
|
|
29
|
-
* Should be customized as you need.
|
|
30
|
-
* Remember to use addCb(day,number,time,id) for accepting the selection, otherwise omit it.
|
|
31
|
-
* For continuous case see the example where should use removeCb(day,number) for previously selected appointment.
|
|
32
|
-
*/
|
|
33
|
-
addAppointmentCallback?: AddAppointmentType;
|
|
34
|
-
/**
|
|
35
|
-
* Should be customized as you need. Remember to use removeCb(day,number) for accepting the deselection, otherwise omit it.
|
|
36
|
-
* ({day, number, time, id}, removeCb) => {console.log( Removed appointment ${number}, day ${day}, time ${time}, id ${id}); removeCb(day,number);}
|
|
37
|
-
*/
|
|
38
|
-
removeAppointmentCallback?: RemoveAppointmentType;
|
|
39
|
-
/**
|
|
40
|
-
* Displays the name of the day of the week (true), otherwise in dd-mm-yyyy format.
|
|
41
|
-
*/
|
|
42
|
-
alpha?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Allows to continue select appointments while remove previous ones if you already have max reservable appointments.
|
|
45
|
-
*/
|
|
46
|
-
continuous?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Allow to have already selected appointments (true), otherwise (false) they aren't going to be checked by their isSelected property.
|
|
49
|
-
*/
|
|
50
|
-
selectedByDefault?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Limits the number of selectable appointments.
|
|
53
|
-
*/
|
|
54
|
-
maxReservableAppointments?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Sets the initial day for your days.
|
|
57
|
-
*/
|
|
58
|
-
initialDay?: Date;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the minimal period of time (ms) between appointments. Default is 15 minutes.
|
|
61
|
-
*/
|
|
62
|
-
unitTime?: number;
|
|
63
|
-
/**
|
|
64
|
-
* Sets the locale param for Dates variables.
|
|
65
|
-
*/
|
|
66
|
-
local?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Shows the day (true), otherwise they are hidden (false).
|
|
69
|
-
*/
|
|
70
|
-
visible?: boolean;
|
|
71
|
-
loading?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* An array of appointments.
|
|
74
|
-
*/
|
|
75
|
-
days: AppointmentAttributesType[][];
|
|
76
|
-
/**
|
|
77
|
-
* Number of days in view
|
|
78
|
-
*/
|
|
79
|
-
daysInView?: number;
|
|
80
|
-
/**
|
|
81
|
-
* Number of days to scroll by at a time
|
|
82
|
-
*/
|
|
83
|
-
daysScrollBy?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Max height of the container. Can be a string or a number, a valid CSS height value.
|
|
86
|
-
*/
|
|
87
|
-
maxHeight?: number | string;
|
|
88
|
-
}
|
|
89
|
-
export { AppointmentAttributesType, AppointmentCalendarProps };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface AutocompleteProps {
|
|
3
|
-
/**
|
|
4
|
-
* Custom action label to prepend at the bottom of the option list.
|
|
5
|
-
*/
|
|
6
|
-
actionLabel?: string;
|
|
7
|
-
autoComplete?: boolean;
|
|
8
|
-
bottomButtonHeight?: number;
|
|
9
|
-
defaultValue?: any;
|
|
10
|
-
/**
|
|
11
|
-
* A function fires when clicking the custom action button prepended at the bottom of the option list.
|
|
12
|
-
*/
|
|
13
|
-
actionClick?: (e: any) => void;
|
|
14
|
-
/**
|
|
15
|
-
* If true, the input will be disabled.
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* If true, the input can't be cleared.
|
|
20
|
-
*/
|
|
21
|
-
disableClearable?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* A filter function that determines the options that are eligible
|
|
24
|
-
*/
|
|
25
|
-
filterOptions?: (options: any, state: any) => any;
|
|
26
|
-
/**
|
|
27
|
-
* If true, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
|
|
28
|
-
*/
|
|
29
|
-
freeSolo?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided).
|
|
32
|
-
*/
|
|
33
|
-
getOptionLabel?: (option: any) => string;
|
|
34
|
-
/**
|
|
35
|
-
* Input label
|
|
36
|
-
*/
|
|
37
|
-
label?: string;
|
|
38
|
-
ListboxComponent?: any;
|
|
39
|
-
/**
|
|
40
|
-
* If true, value must be an array and the menu will support multiple selections.
|
|
41
|
-
*/
|
|
42
|
-
multiple?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Text to display when there are no options.
|
|
45
|
-
*/
|
|
46
|
-
noOptionsText?: React.ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* Callback fired when the value changes.
|
|
49
|
-
*/
|
|
50
|
-
onChange?: (event: object, value: any | any[], reason: string) => any;
|
|
51
|
-
open?: boolean;
|
|
52
|
-
onKeyDown?: (event: object) => void;
|
|
53
|
-
/**
|
|
54
|
-
* Array of options.
|
|
55
|
-
*/
|
|
56
|
-
options: any[];
|
|
57
|
-
/**
|
|
58
|
-
* Placeholder passed to input
|
|
59
|
-
*/
|
|
60
|
-
placeholder?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Deprecated. Now styles automatically change based on theme.
|
|
63
|
-
*/
|
|
64
|
-
platform?: 'desktop' | 'web';
|
|
65
|
-
/**
|
|
66
|
-
* Render the selected value.
|
|
67
|
-
* (value: T[], getTagProps: function) => ReactNode
|
|
68
|
-
* value: The value provided to the component.
|
|
69
|
-
* getTagProps: A tag props getter.
|
|
70
|
-
*/
|
|
71
|
-
renderTags?: (value: any, getTagProps: any) => React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* Render the option, use getOptionLabel by default.
|
|
74
|
-
*/
|
|
75
|
-
renderOption?: (option: any, state: any) => React.ReactNode;
|
|
76
|
-
filterSelectedOptions?: boolean;
|
|
77
|
-
fullWidth?: boolean;
|
|
78
|
-
onBlur?: (e: any | undefined) => void;
|
|
79
|
-
onFocus?: (e: any | undefined) => void;
|
|
80
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface AvatarGroupProps {
|
|
2
|
-
children?: any;
|
|
3
|
-
size?: "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
4
|
-
color?: "default" | "primary" | "secondary" | string;
|
|
5
|
-
tooltip?: any;
|
|
6
|
-
max?: number;
|
|
7
|
-
tooltipPlacement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface AvatarsGroupProps {
|
|
2
|
-
children: any;
|
|
3
|
-
max?: number;
|
|
4
|
-
spacing?: 'medium' | 'small' | number;
|
|
5
|
-
size?: 'small' | 'medium' | 'large';
|
|
6
|
-
color?: 'default' | 'primary' | 'dark';
|
|
7
|
-
tooltip?: any;
|
|
8
|
-
tooltipPlacement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
9
|
-
}
|