@7shifts/sous-chef 1.5.0 → 1.5.4
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/CHANGELOG.md +28 -0
- package/dist/core/ResourceTable/types.js.flow +4 -3
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js.flow +28 -18
- package/dist/forms/DatePickerField/DatePickerField.d.ts +23 -0
- package/dist/forms/DatePickerField/DatePickerField.js.flow +35 -0
- package/dist/forms/DatePickerField/index.d.ts +1 -0
- package/dist/forms/DatePickerField/index.js.flow +8 -0
- package/dist/forms/MultiSelectField/MultiSelectField.d.ts +2 -1
- package/dist/forms/WeekPickerField/WeekPickerField.d.ts +25 -0
- package/dist/forms/WeekPickerField/WeekPickerField.js.flow +35 -0
- package/dist/forms/WeekPickerField/index.d.ts +1 -0
- package/dist/forms/WeekPickerField/index.js.flow +8 -0
- package/dist/icons/{components/IconCheck.d.ts → IconCheck.d.ts} +4 -3
- package/dist/icons/IconCheck.js.flow +17 -0
- package/dist/icons/{components/IconUser.js.flow → IconUser.flow} +3 -2
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js.flow +2 -0
- package/dist/index.css +3 -3
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +27 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/nophoto~DrLDqLZE.png +0 -0
- package/dist/profile/LetterProfile/LetterProfile.d.ts +9 -0
- package/dist/profile/LetterProfile/index.d.ts +1 -0
- package/dist/profile/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/.DS_Store +0 -0
- package/dist/icons/.DS_Store +0 -0
- package/dist/icons/components/.DS_Store +0 -0
- package/dist/icons/components/IconAlert.js.flow +0 -16
- package/dist/icons/components/IconAnalytics.d.ts +0 -8
- package/dist/icons/components/IconAnalytics.js.flow +0 -16
- package/dist/icons/components/IconArrowDown.d.ts +0 -8
- package/dist/icons/components/IconArrowDown.js.flow +0 -16
- package/dist/icons/components/IconArrowLeft.d.ts +0 -8
- package/dist/icons/components/IconArrowLeft.js.flow +0 -16
- package/dist/icons/components/IconArrowRight.d.ts +0 -8
- package/dist/icons/components/IconArrowRight.js.flow +0 -16
- package/dist/icons/components/IconArrowToTop.d.ts +0 -8
- package/dist/icons/components/IconArrowUp.d.ts +0 -8
- package/dist/icons/components/IconArrowUp.js.flow +0 -16
- package/dist/icons/components/IconAttachment.js.flow +0 -16
- package/dist/icons/components/IconAvailability.js.flow +0 -16
- package/dist/icons/components/IconAward.d.ts +0 -8
- package/dist/icons/components/IconAward.js.flow +0 -16
- package/dist/icons/components/IconBalanceScale.d.ts +0 -8
- package/dist/icons/components/IconBalanceScaleLeft.d.ts +0 -8
- package/dist/icons/components/IconBan.d.ts +0 -8
- package/dist/icons/components/IconBan.js.flow +0 -16
- package/dist/icons/components/IconBarsH.d.ts +0 -8
- package/dist/icons/components/IconBarsV.d.ts +0 -8
- package/dist/icons/components/IconBell.d.ts +0 -8
- package/dist/icons/components/IconBold.d.ts +0 -8
- package/dist/icons/components/IconBolt.d.ts +0 -8
- package/dist/icons/components/IconBook.d.ts +0 -8
- package/dist/icons/components/IconBook.js.flow +0 -16
- package/dist/icons/components/IconBookDemo.js.flow +0 -16
- package/dist/icons/components/IconBriefcase.d.ts +0 -8
- package/dist/icons/components/IconBriefcase.js.flow +0 -16
- package/dist/icons/components/IconBullseyeArrow.d.ts +0 -8
- package/dist/icons/components/IconCalculator.d.ts +0 -8
- package/dist/icons/components/IconCalculator.js.flow +0 -16
- package/dist/icons/components/IconCalendar.d.ts +0 -8
- package/dist/icons/components/IconCalendar.js.flow +0 -16
- package/dist/icons/components/IconCalendarAlt.d.ts +0 -8
- package/dist/icons/components/IconCalendarCheck.d.ts +0 -8
- package/dist/icons/components/IconCalendarDay.d.ts +0 -8
- package/dist/icons/components/IconCalendarDay.js.flow +0 -16
- package/dist/icons/components/IconCalendarExclamation.d.ts +0 -8
- package/dist/icons/components/IconCalendarExclamation.js.flow +0 -16
- package/dist/icons/components/IconCalendarRange.js.flow +0 -16
- package/dist/icons/components/IconCalendarTomorrow.d.ts +0 -8
- package/dist/icons/components/IconCalendarTomorrow.js.flow +0 -16
- package/dist/icons/components/IconCamera.d.ts +0 -8
- package/dist/icons/components/IconCamera.js.flow +0 -16
- package/dist/icons/components/IconCameraSlash.d.ts +0 -8
- package/dist/icons/components/IconCameraSlash.js.flow +0 -16
- package/dist/icons/components/IconCashRegister.d.ts +0 -8
- package/dist/icons/components/IconChartBar.d.ts +0 -8
- package/dist/icons/components/IconChartBar.js.flow +0 -16
- package/dist/icons/components/IconCheck.js.flow +0 -16
- package/dist/icons/components/IconChevronDown.d.ts +0 -8
- package/dist/icons/components/IconChevronDown.js.flow +0 -15
- package/dist/icons/components/IconChevronLeft.d.ts +0 -8
- package/dist/icons/components/IconChevronLeft.js.flow +0 -15
- package/dist/icons/components/IconChevronRight.d.ts +0 -8
- package/dist/icons/components/IconChevronRight.js.flow +0 -15
- package/dist/icons/components/IconChevronUp.d.ts +0 -8
- package/dist/icons/components/IconChevronUp.js.flow +0 -15
- package/dist/icons/components/IconClipboard.js.flow +0 -15
- package/dist/icons/components/IconClipboardList.d.ts +0 -8
- package/dist/icons/components/IconClock.d.ts +0 -8
- package/dist/icons/components/IconClock.js.flow +0 -15
- package/dist/icons/components/IconClose.js.flow +0 -15
- package/dist/icons/components/IconCog.d.ts +0 -8
- package/dist/icons/components/IconCog.js.flow +0 -15
- package/dist/icons/components/IconComment.d.ts +0 -8
- package/dist/icons/components/IconComment.js.flow +0 -15
- package/dist/icons/components/IconCommentLines.d.ts +0 -8
- package/dist/icons/components/IconCommentMade.js.flow +0 -15
- package/dist/icons/components/IconCopy.d.ts +0 -8
- package/dist/icons/components/IconCreditCard.d.ts +0 -8
- package/dist/icons/components/IconCreditCardPlus.d.ts +0 -8
- package/dist/icons/components/IconDashboard.js.flow +0 -15
- package/dist/icons/components/IconDelete.js.flow +0 -16
- package/dist/icons/components/IconDepartment.js.flow +0 -16
- package/dist/icons/components/IconDownload.d.ts +0 -8
- package/dist/icons/components/IconDownload.js.flow +0 -16
- package/dist/icons/components/IconDragHandler.js.flow +0 -16
- package/dist/icons/components/IconEdit.d.ts +0 -8
- package/dist/icons/components/IconEllipsisV.d.ts +0 -8
- package/dist/icons/components/IconEngage.js.flow +0 -16
- package/dist/icons/components/IconEnterprise.js.flow +0 -16
- package/dist/icons/components/IconEnvelope.d.ts +0 -8
- package/dist/icons/components/IconExclaim.flow +0 -16
- package/dist/icons/components/IconExclaimation.d.ts +0 -8
- package/dist/icons/components/IconExclaimationTriangle.d.ts +0 -8
- package/dist/icons/components/IconExpand.d.ts +0 -8
- package/dist/icons/components/IconExternalLink.d.ts +0 -8
- package/dist/icons/components/IconExternalLink.js.flow +0 -16
- package/dist/icons/components/IconEye.d.ts +0 -8
- package/dist/icons/components/IconEye.js.flow +0 -16
- package/dist/icons/components/IconEyeSlash.d.ts +0 -8
- package/dist/icons/components/IconEyeSlash.js.flow +0 -16
- package/dist/icons/components/IconFile.d.ts +0 -8
- package/dist/icons/components/IconFilePdf.d.ts +0 -8
- package/dist/icons/components/IconFlag.d.ts +0 -8
- package/dist/icons/components/IconFlag.js.flow +0 -16
- package/dist/icons/components/IconFourDotsCircle.d.ts +0 -8
- package/dist/icons/components/IconFourSquares.d.ts +0 -8
- package/dist/icons/components/IconGift.d.ts +0 -8
- package/dist/icons/components/IconGift.js.flow +0 -16
- package/dist/icons/components/IconGrinBeam.d.ts +0 -8
- package/dist/icons/components/IconGripVertical.d.ts +0 -8
- package/dist/icons/components/IconHandshake.d.ts +0 -8
- package/dist/icons/components/IconHiring.js.flow +0 -16
- package/dist/icons/components/IconImage.d.ts +0 -8
- package/dist/icons/components/IconInfoCircle.d.ts +0 -8
- package/dist/icons/components/IconInformation.js.flow +0 -16
- package/dist/icons/components/IconIslandTropical.d.ts +0 -8
- package/dist/icons/components/IconItalic.d.ts +0 -8
- package/dist/icons/components/IconKebab.js.flow +0 -16
- package/dist/icons/components/IconLaptopSearch.d.ts +0 -8
- package/dist/icons/components/IconLayout.js.flow +0 -16
- package/dist/icons/components/IconLink.d.ts +0 -8
- package/dist/icons/components/IconLink.js.flow +0 -16
- package/dist/icons/components/IconList.d.ts +0 -8
- package/dist/icons/components/IconListOI.d.ts +0 -8
- package/dist/icons/components/IconLocation.js.flow +0 -15
- package/dist/icons/components/IconLock.d.ts +0 -8
- package/dist/icons/components/IconMagicSolid.d.ts +0 -8
- package/dist/icons/components/IconMagicwand.js.flow +0 -15
- package/dist/icons/components/IconMail.js.flow +0 -15
- package/dist/icons/components/IconMapMarker.d.ts +0 -8
- package/dist/icons/components/IconMegaphone.d.ts +0 -8
- package/dist/icons/components/IconMegaphone.js.flow +0 -15
- package/dist/icons/components/IconMinus.d.ts +0 -8
- package/dist/icons/components/IconMinusCircle.d.ts +0 -8
- package/dist/icons/components/IconMoney.js.flow +0 -15
- package/dist/icons/components/IconMoneyBill.d.ts +0 -8
- package/dist/icons/components/IconMore.js.flow +0 -16
- package/dist/icons/components/IconNonUser.js.flow +0 -16
- package/dist/icons/components/IconNote.js.flow +0 -16
- package/dist/icons/components/IconNotesMedical.d.ts +0 -8
- package/dist/icons/components/IconOvertime.d.ts +0 -8
- package/dist/icons/components/IconOvertime.js.flow +0 -16
- package/dist/icons/components/IconPaperPlane.d.ts +0 -8
- package/dist/icons/components/IconPaperPlane.js.flow +0 -16
- package/dist/icons/components/IconPaperPlaneClock.d.ts +0 -8
- package/dist/icons/components/IconPaperPlaneClock.js.flow +0 -16
- package/dist/icons/components/IconPaperclip.d.ts +0 -8
- package/dist/icons/components/IconPencil.d.ts +0 -8
- package/dist/icons/components/IconPencil.js.flow +0 -16
- package/dist/icons/components/IconPercentage.d.ts +0 -8
- package/dist/icons/components/IconPhone.d.ts +0 -8
- package/dist/icons/components/IconPhone.js.flow +0 -16
- package/dist/icons/components/IconPlug.d.ts +0 -8
- package/dist/icons/components/IconPlug.js.flow +0 -16
- package/dist/icons/components/IconPlus.d.ts +0 -8
- package/dist/icons/components/IconPlus.js.flow +0 -16
- package/dist/icons/components/IconPrint.d.ts +0 -8
- package/dist/icons/components/IconPrint.js.flow +0 -16
- package/dist/icons/components/IconQuestion.js.flow +0 -16
- package/dist/icons/components/IconQuestionCircle.d.ts +0 -8
- package/dist/icons/components/IconRecurrence.js.flow +0 -16
- package/dist/icons/components/IconRepeat.d.ts +0 -8
- package/dist/icons/components/IconResync.js.flow +0 -16
- package/dist/icons/components/IconSearch.d.ts +0 -8
- package/dist/icons/components/IconSearch.js.flow +0 -16
- package/dist/icons/components/IconShare.js.flow +0 -16
- package/dist/icons/components/IconShiftPool.js.flow +0 -16
- package/dist/icons/components/IconSignOut.d.ts +0 -8
- package/dist/icons/components/IconSignOut.js.flow +0 -16
- package/dist/icons/components/IconSitemap.d.ts +0 -8
- package/dist/icons/components/IconSlidersH.d.ts +0 -8
- package/dist/icons/components/IconSort.d.ts +0 -8
- package/dist/icons/components/IconStar.d.ts +0 -8
- package/dist/icons/components/IconStar.js.flow +0 -16
- package/dist/icons/components/IconStatus.js.flow +0 -16
- package/dist/icons/components/IconStickyNoteLines.d.ts +0 -8
- package/dist/icons/components/IconStopwatch.d.ts +0 -8
- package/dist/icons/components/IconStopwatch.js.flow +0 -16
- package/dist/icons/components/IconStrikethrough.d.ts +0 -8
- package/dist/icons/components/IconSync.d.ts +0 -8
- package/dist/icons/components/IconSync.js.flow +0 -16
- package/dist/icons/components/IconSyncExclaimation.d.ts +0 -8
- package/dist/icons/components/IconTachometer.d.ts +0 -8
- package/dist/icons/components/IconTarget.js.flow +0 -16
- package/dist/icons/components/IconTimes.d.ts +0 -8
- package/dist/icons/components/IconTimesOctagon.d.ts +0 -8
- package/dist/icons/components/IconTools.js.flow +0 -16
- package/dist/icons/components/IconTrash.d.ts +0 -8
- package/dist/icons/components/IconTrash.js.flow +0 -16
- package/dist/icons/components/IconTreePalm.js.flow +0 -16
- package/dist/icons/components/IconUnderline.d.ts +0 -8
- package/dist/icons/components/IconUndo.d.ts +0 -8
- package/dist/icons/components/IconUserComputer.d.ts +0 -8
- package/dist/icons/components/IconUserFilled.js.flow +0 -16
- package/dist/icons/components/IconUserLight.d.ts +0 -8
- package/dist/icons/components/IconUserPlus.d.ts +0 -8
- package/dist/icons/components/IconUserPlus.js.flow +0 -16
- package/dist/icons/components/IconUserSlash.d.ts +0 -8
- package/dist/icons/components/IconUserSolid.d.ts +0 -8
- package/dist/icons/components/IconUserTag.d.ts +0 -8
- package/dist/icons/components/IconUserTag.js.flow +0 -16
- package/dist/icons/components/IconUserTie.d.ts +0 -8
- package/dist/icons/components/IconUsers.d.ts +0 -8
- package/dist/icons/components/IconVideo.d.ts +0 -8
- package/dist/icons/components/IconVolume.d.ts +0 -8
- package/dist/icons/components/IconVolumeMute.d.ts +0 -8
- package/dist/icons/components/IconWarning.js.flow +0 -16
- package/dist/icons/components/IconWrench.d.ts +0 -8
- package/dist/icons/components/index.d.ts +0 -118
- package/dist/icons/components/index.js.flow +0 -94
- package/dist/icons/icon-typescript-template.d.ts +0 -12
- package/dist/index.tsx.css +0 -2345
- package/dist/index.tsx.js +0 -2514
- package/dist/index.tsx.js.map +0 -1
- package/dist/index.tsx.modern.js +0 -2395
- package/dist/index.tsx.modern.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## 1.5.4 (January 10th, 2021)
|
|
2
|
+
|
|
3
|
+
### Enhancements
|
|
4
|
+
|
|
5
|
+
- MultiSelectField: Added new prop closeOnSelect which is set to false by default in order for the dropdown to stay open while selecting options. ([#71](https://github.com/7shifts/sous-chef/pull/71))
|
|
6
|
+
|
|
7
|
+
## 1.5.3 (December 13th, 2021)
|
|
8
|
+
|
|
9
|
+
### Enhancements
|
|
10
|
+
|
|
11
|
+
- Button: Updated link button themes to have proper one shade darker color (excluding contrast, icon, and toolbar theme) on hover. ([#70](https://github.com/7shifts/sous-chef/pull/70))
|
|
12
|
+
|
|
13
|
+
## 1.5.2 (November 10th, 2021)
|
|
14
|
+
|
|
15
|
+
### Enhancements
|
|
16
|
+
|
|
17
|
+
- PasswordField: Updated met criteria bullet to IconCheck to be consistent with mobile ([#69](https://github.com/7shifts/sous-chef/pull/69))
|
|
18
|
+
|
|
19
|
+
### New Components
|
|
20
|
+
|
|
21
|
+
- IconCheck: added for now to use in PasswordCriteria. ([#69](https://github.com/7shifts/sous-chef/pull/69))
|
|
22
|
+
|
|
23
|
+
## 1.5.1 (October 20th, 2021)
|
|
24
|
+
|
|
25
|
+
### Bug fixes
|
|
26
|
+
|
|
27
|
+
- DataTable: Exported `DataTableCustomComponent` type ([#67](https://github.com/7shifts/sous-chef/pull/67))
|
|
28
|
+
|
|
1
29
|
## 1.5.0 (October 19th, 2021)
|
|
2
30
|
|
|
3
31
|
### New components
|
|
@@ -12,20 +12,21 @@ export type Column = {
|
|
|
12
12
|
size?: number,
|
|
13
13
|
isSortable?: boolean,
|
|
14
14
|
currentSort?: SortDirection,
|
|
15
|
+
isRightAligned?: boolean
|
|
15
16
|
};
|
|
16
17
|
export type SortDirection = 'asc' | 'desc' | null;
|
|
17
18
|
export type Sort = {
|
|
18
19
|
columnName: string,
|
|
19
|
-
direction: SortDirection
|
|
20
|
+
direction: SortDirection
|
|
20
21
|
};
|
|
21
22
|
export type Item<T> = T | (T & { actions?: Action[] });
|
|
22
23
|
export type CustomComponent<T> = {
|
|
23
24
|
item: Item<T>,
|
|
24
25
|
index: number,
|
|
25
26
|
columnSizes?: number[],
|
|
26
|
-
columns?: Column[]
|
|
27
|
+
columns?: Column[]
|
|
27
28
|
};
|
|
28
29
|
export type Action = {
|
|
29
30
|
label: React$Node,
|
|
30
|
-
onAction: () => void
|
|
31
|
+
onAction: () => void
|
|
31
32
|
};
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ import DataTableEditableCell from './DataTableEditableCell';
|
|
|
9
9
|
export { ResourceTable, ResourceTableRow, Inline, Stack, DataTable, DataTableRow, DataTableCell, DataTableEditableCell };
|
|
10
10
|
export type { AlignItems, FlexWrap, JustifyContent } from './Flex/types';
|
|
11
11
|
export type { CustomComponent, Column, SortDirection, Sort, Action } from './ResourceTable/types';
|
|
12
|
-
export type { Column as DataTableColumn } from './DataTable/types';
|
|
12
|
+
export type { Column as DataTableColumn, CustomComponent as DataTableCustomComponent } from './DataTable/types';
|
package/dist/core/index.js.flow
CHANGED
|
@@ -5,25 +5,35 @@
|
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import ResourceTable from
|
|
9
|
-
import ResourceTableRow from
|
|
10
|
-
import Inline from
|
|
11
|
-
import Stack from
|
|
12
|
-
import DataTable from
|
|
13
|
-
import DataTableRow from
|
|
14
|
-
import DataTableCell from
|
|
15
|
-
import DataTableEditableCell from
|
|
8
|
+
import ResourceTable from './ResourceTable';
|
|
9
|
+
import ResourceTableRow from './ResourceTableRow';
|
|
10
|
+
import Inline from './Inline';
|
|
11
|
+
import Stack from './Stack';
|
|
12
|
+
import DataTable from './DataTable';
|
|
13
|
+
import DataTableRow from './DataTableRow';
|
|
14
|
+
import DataTableCell from './DataTableCell';
|
|
15
|
+
import DataTableEditableCell from './DataTableEditableCell';
|
|
16
16
|
|
|
17
|
-
declare export {
|
|
18
|
-
|
|
17
|
+
declare export {
|
|
18
|
+
ResourceTable,
|
|
19
|
+
ResourceTableRow,
|
|
20
|
+
Inline,
|
|
21
|
+
Stack,
|
|
22
|
+
DataTable,
|
|
23
|
+
DataTableRow,
|
|
24
|
+
DataTableCell,
|
|
25
|
+
DataTableEditableCell
|
|
26
|
+
};
|
|
27
|
+
export type { AlignItems, FlexWrap, JustifyContent } from './Flex/types';
|
|
19
28
|
export type {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} from
|
|
29
|
+
CustomComponent,
|
|
30
|
+
Column,
|
|
31
|
+
SortDirection,
|
|
32
|
+
Sort,
|
|
33
|
+
Action
|
|
34
|
+
} from './ResourceTable/types';
|
|
26
35
|
|
|
27
36
|
export type {
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
Column as DataTableColumn,
|
|
38
|
+
CustomComponent as DataTableCustomComponent
|
|
39
|
+
} from './DataTable/types';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
name: string;
|
|
4
|
+
/** If not provided it will generate a random id so the label links properly with the text input */
|
|
5
|
+
id?: string;
|
|
6
|
+
value?: Date;
|
|
7
|
+
disabledDays?: (day: Date) => boolean;
|
|
8
|
+
/** Reference this for valid formats: https://date-fns.org/v2.18.0/docs/format */
|
|
9
|
+
format?: string;
|
|
10
|
+
initialMonth?: Date;
|
|
11
|
+
onChange?: (e: Date) => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
caption?: React.ReactNode;
|
|
15
|
+
error?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
defaultValue?: Date;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** DatePickerField form element. */
|
|
22
|
+
declare const DatePickerField: React.FC<Props>;
|
|
23
|
+
export default DatePickerField;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for DatePickerField
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.14.1
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
name: string,
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* If not provided it will generate a random id so the label links properly with the text input
|
|
14
|
+
*/
|
|
15
|
+
id?: string,
|
|
16
|
+
value?: Date,
|
|
17
|
+
disabledDays?: (day: Date) => boolean,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reference this for valid formats: https://date-fns.org/v2.18.0/docs/format
|
|
21
|
+
*/
|
|
22
|
+
format?: string,
|
|
23
|
+
initialMonth?: Date,
|
|
24
|
+
onChange?: (e: Date) => void,
|
|
25
|
+
onBlur?: () => void,
|
|
26
|
+
label?: React$Node,
|
|
27
|
+
caption?: React$Node,
|
|
28
|
+
error?: string,
|
|
29
|
+
placeholder?: string,
|
|
30
|
+
disabled?: boolean,
|
|
31
|
+
defaultValue?: Date,
|
|
32
|
+
readOnly?: boolean,
|
|
33
|
+
};
|
|
34
|
+
declare var DatePickerField: (props: Props) => React$Node;
|
|
35
|
+
declare export default typeof DatePickerField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DatePickerField';
|
|
@@ -14,7 +14,8 @@ declare type Props<T> = {
|
|
|
14
14
|
error?: string;
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
closeOnSelect?: boolean;
|
|
17
18
|
};
|
|
18
19
|
/** Component to make possible choose from a predefined options. */
|
|
19
|
-
declare const MultiSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, onBlur, CustomOption: UserCustomOption, label, caption, error, placeholder, disabled }: Props<T>) => JSX.Element;
|
|
20
|
+
declare const MultiSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, onBlur, CustomOption: UserCustomOption, label, caption, error, placeholder, disabled, closeOnSelect }: Props<T>) => JSX.Element;
|
|
20
21
|
export default MultiSelectField;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WeekStart } from '../../utils/date';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
name: string;
|
|
5
|
+
/** If not provided it will generate a random id so the label links properly with the text input */
|
|
6
|
+
id?: string;
|
|
7
|
+
value?: Date;
|
|
8
|
+
disabledDays?: (day: Date) => boolean;
|
|
9
|
+
/** Reference this for valid formats: https://date-fns.org/v2.18.0/docs/format */
|
|
10
|
+
format?: string;
|
|
11
|
+
initialMonth?: Date;
|
|
12
|
+
onChange?: (e: Date) => void;
|
|
13
|
+
onBlur?: () => void;
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
caption?: React.ReactNode;
|
|
16
|
+
error?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
defaultValue?: Date;
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
weekStart?: WeekStart;
|
|
22
|
+
};
|
|
23
|
+
/** WeekPickerField form element. */
|
|
24
|
+
declare const WeekPickerField: React.FC<Props>;
|
|
25
|
+
export default WeekPickerField;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for DatePickerField
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.14.1
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
name: string,
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* If not provided it will generate a random id so the label links properly with the text input
|
|
14
|
+
*/
|
|
15
|
+
id?: string,
|
|
16
|
+
value?: Date,
|
|
17
|
+
disabledDays?: (day: Date) => boolean,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reference this for valid formats: https://date-fns.org/v2.18.0/docs/format
|
|
21
|
+
*/
|
|
22
|
+
format?: string,
|
|
23
|
+
initialMonth?: Date,
|
|
24
|
+
onChange?: (e: Date) => void,
|
|
25
|
+
onBlur?: () => void,
|
|
26
|
+
label?: React$Node,
|
|
27
|
+
caption?: React$Node,
|
|
28
|
+
error?: string,
|
|
29
|
+
placeholder?: string,
|
|
30
|
+
disabled?: boolean,
|
|
31
|
+
defaultValue?: Date,
|
|
32
|
+
readOnly?: boolean,
|
|
33
|
+
};
|
|
34
|
+
declare var WeekPickerField: (props: Props) => React$Node;
|
|
35
|
+
declare export default typeof WeekPickerField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './WeekPickerField';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Color } from '../foundation/colors';
|
|
3
|
+
import { IconSize } from './types';
|
|
3
4
|
declare type Props = {
|
|
4
5
|
size?: IconSize;
|
|
5
|
-
color?:
|
|
6
|
-
}
|
|
6
|
+
color?: Color;
|
|
7
|
+
};
|
|
7
8
|
declare const IconCheck: React.FC<Props>;
|
|
8
9
|
export default IconCheck;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for Button
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.14.1
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import type { Color } from '../foundation/colors';
|
|
10
|
+
import type { IconSize } from '../types';
|
|
11
|
+
|
|
12
|
+
declare type Props = {
|
|
13
|
+
size?: IconSize,
|
|
14
|
+
color?: Color,
|
|
15
|
+
};
|
|
16
|
+
declare var IconCheck: (props: Props) => React$Node;
|
|
17
|
+
declare export default typeof IconCheck;
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import * as React from 'react';
|
|
9
|
+
import type { Color } from '../foundation/colors';
|
|
9
10
|
import type { IconSize } from '../types';
|
|
10
11
|
|
|
11
12
|
declare type Props = {
|
|
12
13
|
size?: IconSize,
|
|
13
|
-
color?:
|
|
14
|
+
color?: Color
|
|
14
15
|
};
|
|
15
16
|
declare var IconUser: (props: Props) => React$Node;
|
|
16
|
-
declare export default typeof
|
|
17
|
+
declare export default typeof IconEdit;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import IconArrowLeft from './IconArrowLeft';
|
|
|
3
3
|
import IconArrowRight from './IconArrowRight';
|
|
4
4
|
import IconArrowUp from './IconArrowUp';
|
|
5
5
|
import IconCalendar from './IconCalendar';
|
|
6
|
+
import IconCheck from './IconCheck';
|
|
6
7
|
import IconChevronDown from './IconChevronDown';
|
|
7
8
|
import IconChevronUp from './IconChevronUp';
|
|
8
9
|
import IconClose from './IconClose';
|
|
@@ -18,4 +19,4 @@ import IconMore from './IconMore';
|
|
|
18
19
|
import IconRemove from './IconRemove';
|
|
19
20
|
import IconUser from './IconUser';
|
|
20
21
|
import IconUserPlus from './IconUserPlus';
|
|
21
|
-
export { IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconCalendar, IconChevronDown, IconChevronUp, IconClose, IconComment, IconDelete, IconEdit, IconEye, IconEyeSlash, IconExclaim, IconLocation, IconMinusCircle, IconMore, IconRemove, IconUser, IconUserPlus };
|
|
22
|
+
export { IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconCalendar, IconCheck, IconChevronDown, IconChevronUp, IconClose, IconComment, IconDelete, IconEdit, IconEye, IconEyeSlash, IconExclaim, IconLocation, IconMinusCircle, IconMore, IconRemove, IconUser, IconUserPlus };
|
package/dist/icons/index.js.flow
CHANGED
|
@@ -10,6 +10,7 @@ import IconArrowLeft from './IconArrowLeft';
|
|
|
10
10
|
import IconArrowRight from './IconArrowRight';
|
|
11
11
|
import IconArrowUp from './IconArrowUp';
|
|
12
12
|
import IconCalendar from './IconCalendar';
|
|
13
|
+
import IconCheck from './IconCheck';
|
|
13
14
|
import IconChevronDown from './IconChevronDown';
|
|
14
15
|
import IconChevronUp from './IconChevronUp';
|
|
15
16
|
import IconComment from './IconComment';
|
|
@@ -31,6 +32,7 @@ declare export {
|
|
|
31
32
|
IconArrowRight,
|
|
32
33
|
IconArrowUp,
|
|
33
34
|
IconCalendar,
|
|
35
|
+
IconCheck,
|
|
34
36
|
IconChevronDown,
|
|
35
37
|
IconChevronUp,
|
|
36
38
|
IconComment,
|
package/dist/index.css
CHANGED
|
@@ -417,7 +417,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
417
417
|
._23S36:hover {
|
|
418
418
|
background: rgba(0, 0, 0, 0.03);
|
|
419
419
|
border-color: #f8f8f8;
|
|
420
|
-
color: #
|
|
420
|
+
color: #51acc7; }
|
|
421
421
|
._23S36:disabled {
|
|
422
422
|
background: transparent;
|
|
423
423
|
border-color: transparent;
|
|
@@ -434,7 +434,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
434
434
|
._2CzxI:hover {
|
|
435
435
|
background: rgba(0, 0, 0, 0.03);
|
|
436
436
|
border-color: #f8f8f8;
|
|
437
|
-
color: #
|
|
437
|
+
color: #cf5c5c; }
|
|
438
438
|
._2CzxI:disabled {
|
|
439
439
|
background: transparent;
|
|
440
440
|
border-color: transparent;
|
|
@@ -451,7 +451,7 @@ Please ask a designer if you have questions about which colours to use.
|
|
|
451
451
|
._21e4m:hover {
|
|
452
452
|
background: rgba(0, 0, 0, 0.03);
|
|
453
453
|
border-color: #f8f8f8;
|
|
454
|
-
color: #
|
|
454
|
+
color: #6179c6; }
|
|
455
455
|
._21e4m:disabled {
|
|
456
456
|
background: transparent;
|
|
457
457
|
border-color: transparent;
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,22 @@ var IconCalendar = function IconCalendar(_ref) {
|
|
|
88
88
|
})));
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
var IconCheck = function IconCheck(_ref) {
|
|
92
|
+
var _ref$size = _ref.size,
|
|
93
|
+
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
94
|
+
color = _ref.color;
|
|
95
|
+
return React__default.createElement("svg", {
|
|
96
|
+
viewBox: "0 0 20 20",
|
|
97
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
98
|
+
style: getIconStyles(size),
|
|
99
|
+
"data-testid": "icon-check",
|
|
100
|
+
className: styles['icon']
|
|
101
|
+
}, React__default.createElement("g", null, React__default.createElement("path", {
|
|
102
|
+
fill: color != null ? color : '',
|
|
103
|
+
d: "M7.32398 16.832C6.99989 17.1535 6.47654 17.1514 6.15507 16.8273L0.239745 10.8642C-0.0817202 10.5401 -0.0796538 10.0168 0.244429 9.69531L0.831292 9.1132C1.15538 8.79173 1.67873 8.7938 2.0002 9.11788L6.7513 13.9074L18.0092 2.73975C18.3333 2.41828 18.8567 2.42035 19.1781 2.74443L19.7602 3.33129C20.0818 3.65538 20.0796 4.17873 19.7555 4.5002L7.32398 16.832Z"
|
|
104
|
+
})));
|
|
105
|
+
};
|
|
106
|
+
|
|
91
107
|
var IconChevronDown = function IconChevronDown(_ref) {
|
|
92
108
|
var _ref$size = _ref.size,
|
|
93
109
|
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
@@ -2493,7 +2509,12 @@ var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
|
2493
2509
|
children = _ref.children;
|
|
2494
2510
|
return React__default.createElement("span", {
|
|
2495
2511
|
className: classnames(styles$q['password-criteria'], (_classnames = {}, _classnames[styles$q['password-criteria--invalid']] = !met, _classnames))
|
|
2496
|
-
},
|
|
2512
|
+
}, React__default.createElement(Inline, {
|
|
2513
|
+
space: met ? 4 : 8
|
|
2514
|
+
}, met ? React__default.createElement(IconCheck, {
|
|
2515
|
+
size: "small",
|
|
2516
|
+
color: GREY200
|
|
2517
|
+
}) : "\u25CF", children));
|
|
2497
2518
|
};
|
|
2498
2519
|
|
|
2499
2520
|
var usePasswordCriteria = function usePasswordCriteria(criterias) {
|
|
@@ -2736,7 +2757,9 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
2736
2757
|
caption = _ref.caption,
|
|
2737
2758
|
error = _ref.error,
|
|
2738
2759
|
placeholder = _ref.placeholder,
|
|
2739
|
-
disabled = _ref.disabled
|
|
2760
|
+
disabled = _ref.disabled,
|
|
2761
|
+
_ref$closeOnSelect = _ref.closeOnSelect,
|
|
2762
|
+
closeOnSelect = _ref$closeOnSelect === void 0 ? false : _ref$closeOnSelect;
|
|
2740
2763
|
var controllers = useMultiSelectFieldControllers({
|
|
2741
2764
|
name: name,
|
|
2742
2765
|
id: inputId,
|
|
@@ -2767,6 +2790,7 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
2767
2790
|
onChange: controllers.onChange,
|
|
2768
2791
|
onBlur: controllers.onBlur,
|
|
2769
2792
|
isMulti: true,
|
|
2793
|
+
closeMenuOnSelect: closeOnSelect,
|
|
2770
2794
|
components: {
|
|
2771
2795
|
Option: UserCustomOption ? function (props) {
|
|
2772
2796
|
return React__default.createElement(CustomOption, Object.assign({
|
|
@@ -3844,6 +3868,7 @@ exports.IconArrowLeft = IconArrowLeft;
|
|
|
3844
3868
|
exports.IconArrowRight = IconArrowRight;
|
|
3845
3869
|
exports.IconArrowUp = IconArrowUp;
|
|
3846
3870
|
exports.IconCalendar = IconCalendar;
|
|
3871
|
+
exports.IconCheck = IconCheck;
|
|
3847
3872
|
exports.IconChevronDown = IconChevronDown;
|
|
3848
3873
|
exports.IconChevronUp = IconChevronUp;
|
|
3849
3874
|
exports.IconClose = IconClose;
|