@7shifts/sous-chef 3.10.0 → 3.10.2
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/icons/components/IconAwfulNew.d.ts +9 -0
- package/dist/icons/components/IconCoffeeCup.d.ts +12 -0
- package/dist/icons/src/components/IconArrowLeft.d.ts +9 -0
- package/dist/icons/src/components/IconArrowRight.d.ts +9 -0
- package/dist/icons/src/components/IconAward.d.ts +9 -0
- package/dist/icons/src/components/IconCalendarAlt.d.ts +9 -0
- package/dist/icons/src/components/IconCheck.d.ts +9 -0
- package/dist/icons/src/components/IconChevronDown.d.ts +9 -0
- package/dist/icons/src/components/IconChevronLeft.d.ts +9 -0
- package/dist/icons/src/components/IconChevronRight.d.ts +9 -0
- package/dist/icons/src/components/IconChevronUp.d.ts +9 -0
- package/dist/icons/src/components/IconEllipsisV.d.ts +9 -0
- package/dist/icons/src/components/IconExclaimationTriangle.d.ts +9 -0
- package/dist/icons/src/components/IconEye.d.ts +9 -0
- package/dist/icons/src/components/IconEyeSlash.d.ts +9 -0
- package/dist/icons/src/components/IconInfoCircle.d.ts +9 -0
- package/dist/icons/src/components/IconPlus.d.ts +9 -0
- package/dist/icons/src/components/IconTimes.d.ts +9 -0
- package/dist/icons/src/components/IconTimesOctagon.d.ts +9 -0
- package/dist/icons/src/components/IconUserSolid.d.ts +9 -0
- package/dist/icons/src/constants.d.ts +6 -0
- package/dist/icons/src/iconUtils.d.ts +8 -0
- package/dist/icons.tsx.js +2 -0
- package/dist/icons.tsx.js.map +1 -0
- package/dist/icons.tsx.modern.js +2 -0
- package/dist/icons.tsx.modern.js.map +1 -0
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.tsx.js +2 -0
- package/dist/index.tsx.js.map +1 -0
- package/dist/index.tsx.modern.js +2 -0
- package/dist/index.tsx.modern.js.map +1 -0
- package/dist/lists/ResourceTable/ResourceTable.d.ts +28 -0
- package/dist/lists/ResourceTable/ResourceTableContext.d.ts +8 -0
- package/dist/lists/ResourceTable/ResourceTableHeader.d.ts +12 -0
- package/dist/lists/ResourceTable/index.d.ts +1 -0
- package/dist/lists/ResourceTable/types.d.ts +26 -0
- package/dist/lists/ResourceTableRow/ResourceTableRow.d.ts +13 -0
- package/dist/lists/ResourceTableRow/index.d.ts +1 -0
- package/dist/navigation/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.d.ts +7 -0
- package/dist/navigation/Breadcrumbs/BreadcrumbItem/index.d.ts +1 -0
- package/dist/overlay/Menu/Menu.d.ts +9 -0
- package/dist/overlay/Menu/MenuButton.d.ts +8 -0
- package/dist/overlay/Menu/MenuContext.d.ts +9 -0
- package/dist/overlay/Menu/MenuItem.d.ts +7 -0
- package/dist/overlay/Menu/MenuList.d.ts +6 -0
- package/dist/overlay/Menu/index.d.ts +1 -0
- package/dist/overlay/Menu/types.d.ts +6 -0
- package/dist/src/actions/Button/Button.d.ts +30 -0
- package/dist/src/actions/Button/constants.d.ts +28 -0
- package/dist/src/actions/Button/index.d.ts +1 -0
- package/dist/src/actions/Button/types.d.ts +4 -0
- package/dist/src/actions/Link/Link.d.ts +11 -0
- package/dist/src/actions/Link/constants.d.ts +8 -0
- package/dist/src/actions/Link/index.d.ts +1 -0
- package/dist/src/actions/Link/types.d.ts +2 -0
- package/dist/src/actions/PaginationControls/PaginationControls.d.ts +13 -0
- package/dist/src/actions/PaginationControls/index.d.ts +1 -0
- package/dist/src/actions/Toggle/Toggle.d.ts +18 -0
- package/dist/src/actions/Toggle/index.d.ts +1 -0
- package/dist/src/actions/index.d.ts +5 -0
- package/dist/src/controls/DateFilter/DateFilter.d.ts +12 -0
- package/dist/src/controls/DateFilter/DateFilterDisplay/DateFilterDisplay.d.ts +10 -0
- package/dist/src/controls/DateFilter/DateFilterDisplay/DateFilterText/DateFilterText.d.ts +9 -0
- package/dist/src/controls/DateFilter/DateFilterDisplay/DateFilterText/domain.d.ts +2 -0
- package/dist/src/controls/DateFilter/DateFilterDisplay/index.d.ts +1 -0
- package/dist/src/controls/DateFilter/DateFilterStepper/DateFilterStepper.d.ts +11 -0
- package/dist/src/controls/DateFilter/DateFilterStepper/domain.d.ts +2 -0
- package/dist/src/controls/DateFilter/DateFilterStepper/index.d.ts +1 -0
- package/dist/src/controls/DateFilter/constants.d.ts +9 -0
- package/dist/src/controls/DateFilter/index.d.ts +1 -0
- package/dist/src/controls/DateFilter/types.d.ts +3 -0
- package/dist/src/controls/SegmentedControl/SegmentedControl.d.ts +8 -0
- package/dist/src/controls/SegmentedControl/index.d.ts +1 -0
- package/dist/src/controls/ToolbarSelect/ToolbarSelect.d.ts +17 -0
- package/dist/src/controls/ToolbarSelect/ToolbarSelect.styles.d.ts +5 -0
- package/dist/src/controls/ToolbarSelect/index.d.ts +1 -0
- package/dist/src/controls/index.d.ts +4 -0
- package/dist/src/core/Portal/Portal.d.ts +6 -0
- package/dist/src/core/Portal/index.d.ts +1 -0
- package/dist/src/core/SousChefProvider/SousChefProvider.d.ts +6 -0
- package/dist/src/core/SousChefProvider/index.d.ts +1 -0
- package/dist/src/core/index.d.ts +2 -0
- package/dist/src/feedback/CircularProgress/CircularProgress.d.ts +9 -0
- package/dist/src/feedback/CircularProgress/index.d.ts +1 -0
- package/dist/src/feedback/InlineBanner/ButtonCTA/ButtonCTA.d.ts +10 -0
- package/dist/src/feedback/InlineBanner/ButtonCTA/index.d.ts +1 -0
- package/dist/src/feedback/InlineBanner/InlineBanner.d.ts +14 -0
- package/dist/src/feedback/InlineBanner/InlineBannerCTA/InlineBannerCTA.d.ts +11 -0
- package/dist/src/feedback/InlineBanner/InlineBannerCTA/index.d.ts +1 -0
- package/dist/src/feedback/InlineBanner/InlineBannerIcon/InlineBannerIcon.d.ts +6 -0
- package/dist/src/feedback/InlineBanner/InlineBannerIcon/index.d.ts +1 -0
- package/dist/src/feedback/InlineBanner/constants.d.ts +11 -0
- package/dist/src/feedback/InlineBanner/index.d.ts +1 -0
- package/dist/src/feedback/InlineBanner/types.d.ts +1 -0
- package/dist/src/feedback/PersistentBanner/PersistentBanner.d.ts +13 -0
- package/dist/src/feedback/PersistentBanner/constants.d.ts +5 -0
- package/dist/src/feedback/PersistentBanner/index.d.ts +1 -0
- package/dist/src/feedback/PersistentBanner/types.d.ts +1 -0
- package/dist/src/feedback/Progress/domain.d.ts +11 -0
- package/dist/src/feedback/Progress/useProgress.d.ts +18 -0
- package/dist/src/feedback/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/src/feedback/ProgressBar/index.d.ts +1 -0
- package/dist/src/feedback/Spinner/Spinner.d.ts +9 -0
- package/dist/src/feedback/Spinner/constants.d.ts +6 -0
- package/dist/src/feedback/Spinner/index.d.ts +1 -0
- package/dist/src/feedback/Toast/Toast.d.ts +9 -0
- package/dist/src/feedback/Toast/constants.d.ts +5 -0
- package/dist/src/feedback/Toast/index.d.ts +1 -0
- package/dist/src/feedback/Toast/types.d.ts +1 -0
- package/dist/src/feedback/index.d.ts +7 -0
- package/dist/src/forms/AffixContainer/AffixContainer.d.ts +8 -0
- package/dist/src/forms/AffixContainer/index.d.ts +1 -0
- package/dist/src/forms/AsyncSelectField/AsyncSelectField.d.ts +14 -0
- package/dist/src/forms/AsyncSelectField/CustomList/CustomList.d.ts +8 -0
- package/dist/src/forms/AsyncSelectField/CustomList/index.d.ts +1 -0
- package/dist/src/forms/AsyncSelectField/index.d.ts +1 -0
- package/dist/src/forms/AsyncSelectField/types.d.ts +5 -0
- package/dist/src/forms/Caption/Caption.d.ts +7 -0
- package/dist/src/forms/Caption/index.d.ts +1 -0
- package/dist/src/forms/CheckboxField/CheckboxField.d.ts +18 -0
- package/dist/src/forms/CheckboxField/index.d.ts +1 -0
- package/dist/src/forms/CurrencyField/CurrencyField.d.ts +11 -0
- package/dist/src/forms/CurrencyField/index.d.ts +1 -0
- package/dist/src/forms/DateField/DateField.d.ts +25 -0
- package/dist/src/forms/DateField/index.d.ts +1 -0
- package/dist/src/forms/DatePickerCalendar/DatePickerCalendar.d.ts +15 -0
- package/dist/src/forms/DatePickerCalendar/index.d.ts +1 -0
- package/dist/src/forms/DateRangeField/DateRangeField.d.ts +25 -0
- package/dist/src/forms/DateRangeField/FromDate/FromDate.d.ts +17 -0
- package/dist/src/forms/DateRangeField/FromDate/index.d.ts +1 -0
- package/dist/src/forms/DateRangeField/ToDate/ToDate.d.ts +17 -0
- package/dist/src/forms/DateRangeField/ToDate/index.d.ts +1 -0
- package/dist/src/forms/DateRangeField/index.d.ts +1 -0
- package/dist/src/forms/ErrorMessage/ErrorMessage.d.ts +8 -0
- package/dist/src/forms/ErrorMessage/index.d.ts +1 -0
- package/dist/src/forms/Field/Field.d.ts +11 -0
- package/dist/src/forms/Field/index.d.ts +1 -0
- package/dist/src/forms/Form/Form.d.ts +14 -0
- package/dist/src/forms/Form/FormContext.d.ts +8 -0
- package/dist/src/forms/Form/index.d.ts +1 -0
- package/dist/src/forms/Form/types.d.ts +3 -0
- package/dist/src/forms/FormFeedback/FormFeedback.d.ts +8 -0
- package/dist/src/forms/FormFeedback/index.d.ts +1 -0
- package/dist/src/forms/FormRow/FormRow.d.ts +21 -0
- package/dist/src/forms/FormRow/index.d.ts +1 -0
- package/dist/src/forms/Label/Label.d.ts +8 -0
- package/dist/src/forms/Label/domain.d.ts +1 -0
- package/dist/src/forms/Label/index.d.ts +1 -0
- package/dist/src/forms/Label/useLabelTooltip.d.ts +7 -0
- package/dist/src/forms/MultiSelectField/MultiSelectField.d.ts +28 -0
- package/dist/src/forms/MultiSelectField/index.d.ts +1 -0
- package/dist/src/forms/PasswordCriteria/PasswordCriteria.d.ts +7 -0
- package/dist/src/forms/PasswordCriteria/index.d.ts +1 -0
- package/dist/src/forms/PasswordField/PasswordField.d.ts +20 -0
- package/dist/src/forms/PasswordField/index.d.ts +1 -0
- package/dist/src/forms/PasswordField/types.d.ts +5 -0
- package/dist/src/forms/PercentageField/PercentageField.d.ts +13 -0
- package/dist/src/forms/PercentageField/index.d.ts +1 -0
- package/dist/src/forms/PillSelectField/PillSelectField.d.ts +19 -0
- package/dist/src/forms/PillSelectField/index.d.ts +1 -0
- package/dist/src/forms/RadioGroupBoxOption/RadioGroupBoxOption.d.ts +11 -0
- package/dist/src/forms/RadioGroupBoxOption/index.d.ts +1 -0
- package/dist/src/forms/RadioGroupField/BoxOptions/BoxOptions.d.ts +8 -0
- package/dist/src/forms/RadioGroupField/BoxOptions/index.d.ts +1 -0
- package/dist/src/forms/RadioGroupField/RadioGroupField.d.ts +25 -0
- package/dist/src/forms/RadioGroupField/RadioGroupFieldContext.d.ts +10 -0
- package/dist/src/forms/RadioGroupField/RadioOptions/RadioOptions.d.ts +9 -0
- package/dist/src/forms/RadioGroupField/RadioOptions/index.d.ts +1 -0
- package/dist/src/forms/RadioGroupField/domain.d.ts +6 -0
- package/dist/src/forms/RadioGroupField/index.d.ts +1 -0
- package/dist/src/forms/RadioGroupOption/RadioGroupOption.d.ts +11 -0
- package/dist/src/forms/RadioGroupOption/index.d.ts +1 -0
- package/dist/src/forms/SelectField/CustomContainer/CustomContainer.d.ts +2 -0
- package/dist/src/forms/SelectField/CustomContainer/index.d.ts +1 -0
- package/dist/src/forms/SelectField/CustomControl/CustomControl.d.ts +5 -0
- package/dist/src/forms/SelectField/CustomControl/index.d.ts +1 -0
- package/dist/src/forms/SelectField/CustomMenu/CustomMenu.d.ts +5 -0
- package/dist/src/forms/SelectField/CustomMenu/index.d.ts +1 -0
- package/dist/src/forms/SelectField/CustomOption/CustomOption.d.ts +2 -0
- package/dist/src/forms/SelectField/CustomOption/index.d.ts +1 -0
- package/dist/src/forms/SelectField/SelectField.d.ts +36 -0
- package/dist/src/forms/SelectField/SelectField.styles.d.ts +7 -0
- package/dist/src/forms/SelectField/domain.d.ts +5 -0
- package/dist/src/forms/SelectField/index.d.ts +1 -0
- package/dist/src/forms/SelectField/types.d.ts +22 -0
- package/dist/src/forms/SelectField/useSelectField.d.ts +12 -0
- package/dist/src/forms/TextAreaField/TextAreaField.d.ts +26 -0
- package/dist/src/forms/TextAreaField/index.d.ts +1 -0
- package/dist/src/forms/TextField/TextField.d.ts +28 -0
- package/dist/src/forms/TextField/index.d.ts +1 -0
- package/dist/src/forms/TextField/useTextField.d.ts +38 -0
- package/dist/src/forms/TimeField/TimeField.d.ts +9 -0
- package/dist/src/forms/TimeField/index.d.ts +1 -0
- package/dist/src/forms/WeekField/WeekField.d.ts +26 -0
- package/dist/src/forms/WeekField/index.d.ts +1 -0
- package/dist/src/forms/hooks/useCheckBoxFieldControllers.d.ts +18 -0
- package/dist/src/forms/hooks/useDateFieldControllers.d.ts +18 -0
- package/dist/src/forms/hooks/useFieldControllers.d.ts +24 -0
- package/dist/src/forms/hooks/useFieldId.d.ts +6 -0
- package/dist/src/forms/hooks/useGrowTextAreaRef.d.ts +10 -0
- package/dist/src/forms/hooks/useMultiSelectFieldControllers.d.ts +19 -0
- package/dist/src/forms/hooks/usePasswordCriteria.d.ts +2 -0
- package/dist/src/forms/hooks/useRadioGroupFieldControllers.d.ts +15 -0
- package/dist/src/forms/hooks/useRangeFieldControllers.d.ts +19 -0
- package/dist/src/forms/hooks/useSelectFieldControllers.d.ts +20 -0
- package/dist/src/forms/index.d.ts +24 -0
- package/dist/src/foundation/colors.d.ts +53 -0
- package/dist/src/foundation/constants.d.ts +8 -0
- package/dist/src/hooks/useIsMounted.d.ts +1 -0
- package/dist/src/hooks/usePortalContainer.d.ts +4 -0
- package/dist/src/icons.d.ts +2 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/layout/Card/Card.d.ts +11 -0
- package/dist/src/layout/Card/index.d.ts +1 -0
- package/dist/src/layout/Flex/Flex.d.ts +21 -0
- package/dist/src/layout/Flex/index.d.ts +1 -0
- package/dist/src/layout/Flex/types.d.ts +4 -0
- package/dist/src/layout/Inline/Inline.d.ts +21 -0
- package/dist/src/layout/Inline/index.d.ts +1 -0
- package/dist/src/layout/Stack/Stack.d.ts +20 -0
- package/dist/src/layout/Stack/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts +5 -0
- package/dist/src/lists/DataTable/DataTable.d.ts +31 -0
- package/dist/src/lists/DataTable/DataTableCell/DataTableCell.d.ts +7 -0
- package/dist/src/lists/DataTable/DataTableCell/index.d.ts +1 -0
- package/dist/src/lists/DataTable/DataTableContext.d.ts +11 -0
- package/dist/src/lists/DataTable/DataTableHeader.d.ts +9 -0
- package/dist/src/lists/DataTable/index.d.ts +1 -0
- package/dist/src/lists/DataTable/types.d.ts +34 -0
- package/dist/src/lists/DataTableEditableCell/DataTableEditableCell.d.ts +22 -0
- package/dist/src/lists/DataTableEditableCell/index.d.ts +1 -0
- package/dist/src/lists/DataTableRow/DataTableRow.d.ts +11 -0
- package/dist/src/lists/DataTableRow/DataTableRowActions/DataTableRowActions.d.ts +6 -0
- package/dist/src/lists/DataTableRow/DataTableRowActions/index.d.ts +1 -0
- package/dist/src/lists/DataTableRow/index.d.ts +1 -0
- package/dist/src/lists/index.d.ts +6 -0
- package/dist/src/media/Avatar/Avatar.d.ts +12 -0
- package/dist/src/media/Avatar/AvatarImage/AvatarImage.d.ts +9 -0
- package/dist/src/media/Avatar/AvatarImage/index.d.ts +1 -0
- package/dist/src/media/Avatar/constants.d.ts +4 -0
- package/dist/src/media/Avatar/index.d.ts +1 -0
- package/dist/src/media/Badge/Badge.d.ts +10 -0
- package/dist/src/media/Badge/index.d.ts +1 -0
- package/dist/src/media/Chip/Chip.d.ts +11 -0
- package/dist/src/media/Chip/constants.d.ts +8 -0
- package/dist/src/media/Chip/index.d.ts +1 -0
- package/dist/src/media/Chip/types.d.ts +1 -0
- package/dist/src/media/Pill/Pill.d.ts +10 -0
- package/dist/src/media/Pill/constants.d.ts +7 -0
- package/dist/src/media/Pill/index.d.ts +1 -0
- package/dist/src/media/Pill/types.d.ts +1 -0
- package/dist/src/media/index.d.ts +5 -0
- package/dist/src/overlay/Calendar/Calendar.d.ts +24 -0
- package/dist/src/overlay/Calendar/constants.d.ts +8 -0
- package/dist/src/overlay/Calendar/domain.d.ts +7 -0
- package/dist/src/overlay/Calendar/index.d.ts +1 -0
- package/dist/src/overlay/Calendar/types.d.ts +2 -0
- package/dist/src/overlay/KebabMenu/KebabMenu.d.ts +6 -0
- package/dist/src/overlay/KebabMenu/index.d.ts +1 -0
- package/dist/src/overlay/Menu/Menu.d.ts +10 -0
- package/dist/src/overlay/Menu/MenuButton.d.ts +8 -0
- package/dist/src/overlay/Menu/MenuContext.d.ts +9 -0
- package/dist/src/overlay/Menu/MenuItem.d.ts +7 -0
- package/dist/src/overlay/Menu/MenuList.d.ts +6 -0
- package/dist/src/overlay/Menu/index.d.ts +1 -0
- package/dist/src/overlay/Menu/types.d.ts +6 -0
- package/dist/src/overlay/Modal/Modal.d.ts +20 -0
- package/dist/src/overlay/Modal/ModalBody/ModalBody.d.ts +7 -0
- package/dist/src/overlay/Modal/ModalBody/index.d.ts +1 -0
- package/dist/src/overlay/Modal/ModalBody/useScrollShadow.d.ts +7 -0
- package/dist/src/overlay/Modal/ModalFooter/ModalFooter.d.ts +13 -0
- package/dist/src/overlay/Modal/ModalFooter/index.d.ts +1 -0
- package/dist/src/overlay/Modal/ModalHeader/ModalHeader.d.ts +8 -0
- package/dist/src/overlay/Modal/ModalHeader/index.d.ts +1 -0
- package/dist/src/overlay/Modal/index.d.ts +1 -0
- package/dist/src/overlay/Tooltip/Tooltip.d.ts +22 -0
- package/dist/src/overlay/Tooltip/TooltipOverlay/TooltipOverlay.d.ts +16 -0
- package/dist/src/overlay/Tooltip/TooltipOverlay/domain.d.ts +20 -0
- package/dist/src/overlay/Tooltip/TooltipOverlay/index.d.ts +1 -0
- package/dist/src/overlay/Tooltip/constants.d.ts +15 -0
- package/dist/src/overlay/Tooltip/index.d.ts +1 -0
- package/dist/src/overlay/Tooltip/types.d.ts +6 -0
- package/dist/src/overlay/hooks/useOnClickOutside.d.ts +5 -0
- package/dist/src/overlay/index.d.ts +6 -0
- package/dist/src/utils/date.d.ts +24 -0
- package/dist/src/utils/formik.d.ts +6 -0
- package/dist/src/utils/i18n.d.ts +1 -0
- package/dist/src/utils/string.d.ts +1 -0
- package/dist/src/utils/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AlignItems, FlexWrap, JustifyContent, Space } from '../Flex/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** From `0` to `60` with multiples of `4`, eg. `8`, `12`, `16` and so on. */
|
|
6
|
+
space?: Space;
|
|
7
|
+
/** It sets how each item will grow or shrink to fit the space available in its flex container. The default value is `0 1 auto` but it can be overriden. Check it out this [official doc](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) to see all the possible values. */
|
|
8
|
+
flex?: (string | number)[];
|
|
9
|
+
/** One of: `flex-start`, `flex-end`, `center`, `stretch` */
|
|
10
|
+
alignItems?: AlignItems;
|
|
11
|
+
/** One of: `start`, `end`, `center`, `space-between` */
|
|
12
|
+
justifyContent?: JustifyContent;
|
|
13
|
+
inlineFlex?: boolean;
|
|
14
|
+
flexWrap?: FlexWrap;
|
|
15
|
+
testId?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Layout component to easily line elements up in a row.
|
|
19
|
+
*/
|
|
20
|
+
declare const Inline: React.FC<Props>;
|
|
21
|
+
export default Inline;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Inline';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { JustifyContent, Space, AlignItems } from '../Flex/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** From `0` to `60` with multiples of `4`, eg. `8`, `12`, `16` and so on. */
|
|
6
|
+
space?: Space;
|
|
7
|
+
/** It sets how each item will grow or shrink to fit the space available in its flex container. The default value is `0 1 auto` but it can be overriden. Check it out this [official doc](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) to see all the possible values. */
|
|
8
|
+
flex?: (string | number)[];
|
|
9
|
+
/** One of: `flex-start`, `flex-end`, `center`, `stretch` */
|
|
10
|
+
alignItems?: AlignItems;
|
|
11
|
+
/** One of: `start`, `end`, `center`, `space-between` */
|
|
12
|
+
justifyContent?: JustifyContent;
|
|
13
|
+
flexItems?: boolean;
|
|
14
|
+
testId?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Layout component to easily stack elements up in a column.
|
|
18
|
+
*/
|
|
19
|
+
declare const Stack: React.FC<Props>;
|
|
20
|
+
export default Stack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Stack';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Column, CustomComponent, Item, Sort } from './types';
|
|
3
|
+
declare type Props<T> = {
|
|
4
|
+
/** Each element represents a row and each key of the object represents a column */
|
|
5
|
+
items: Item<T>[];
|
|
6
|
+
/** For each column element, the `name` property should match the key on `items` */
|
|
7
|
+
columns?: Column[];
|
|
8
|
+
/** A custom component for customizing how the each item is rendered. It pass as props: `item`, `index`, `columnSizes` and `columns` */
|
|
9
|
+
itemComponent?: React.ComponentType<CustomComponent<T>>;
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
/** Used for pagination */
|
|
12
|
+
hasPrevious?: boolean;
|
|
13
|
+
/** Used for pagination */
|
|
14
|
+
hasNext?: boolean;
|
|
15
|
+
/** Used for pagination */
|
|
16
|
+
onPreviousClick?: () => void;
|
|
17
|
+
/** Used for pagination */
|
|
18
|
+
onNextClick?: () => void;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
/** It is fired when a sorted column is clicked to be sorted */
|
|
21
|
+
onSort?: (sort: Sort) => void;
|
|
22
|
+
showActionMenu?: boolean;
|
|
23
|
+
/** Will render footer component if not null - expects a custom RowItem component */
|
|
24
|
+
footerComponent?: React.ReactNode;
|
|
25
|
+
/** Will render vertical borders between columns if true */
|
|
26
|
+
hasVerticalBorders?: boolean;
|
|
27
|
+
/** Used to override the default data-testid */
|
|
28
|
+
testId?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const DataTable: <T extends unknown>({ items, columns, itemComponent, maxHeight, hasPrevious, hasNext, onPreviousClick, onNextClick, onSort, isLoading, showActionMenu, footerComponent, hasVerticalBorders, testId }: Props<T>) => JSX.Element;
|
|
31
|
+
export default DataTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DataTableCell';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Column } from './types';
|
|
3
|
+
export declare type DataTableContextType = {
|
|
4
|
+
columns?: Column[];
|
|
5
|
+
showActionMenu?: boolean;
|
|
6
|
+
numberOfRows: number;
|
|
7
|
+
hasVerticalBorders?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const Context: import("react").Context<DataTableContextType>;
|
|
10
|
+
export declare const useDataTableContext: () => DataTableContextType;
|
|
11
|
+
export default Context;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Column, Sort } from './types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
columns: Column[];
|
|
5
|
+
onSort?: (sort: Sort) => void;
|
|
6
|
+
showActionMenu?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const DataTableHeader: React.FC<Props>;
|
|
9
|
+
export default DataTableHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DataTable';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Button from '../../actions/Button/Button';
|
|
3
|
+
import { MenuAction } from '../../overlay/Menu/types';
|
|
4
|
+
export declare type Column = {
|
|
5
|
+
name: string;
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
size?: number;
|
|
8
|
+
isSortable?: boolean;
|
|
9
|
+
currentSort?: SortDirection;
|
|
10
|
+
isRightAligned?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare type SortDirection = 'asc' | 'desc' | null;
|
|
13
|
+
export declare type Sort = {
|
|
14
|
+
columnName: string;
|
|
15
|
+
direction: SortDirection;
|
|
16
|
+
};
|
|
17
|
+
export declare type Item<T> = T | (T & {
|
|
18
|
+
actions?: Action[];
|
|
19
|
+
});
|
|
20
|
+
export declare type CustomComponent<T> = {
|
|
21
|
+
item: Item<T>;
|
|
22
|
+
index: number;
|
|
23
|
+
columnSizes?: number[];
|
|
24
|
+
columns?: Column[];
|
|
25
|
+
};
|
|
26
|
+
declare type KebabAction = {
|
|
27
|
+
showInKebab?: true;
|
|
28
|
+
} & MenuAction;
|
|
29
|
+
declare type ButtonAction = {
|
|
30
|
+
buttonProps?: Pick<React.ComponentPropsWithoutRef<typeof Button>, 'theme' | 'disabled' | 'loading' | 'title'>;
|
|
31
|
+
showInKebab: false;
|
|
32
|
+
} & MenuAction;
|
|
33
|
+
export declare type Action = KebabAction | ButtonAction;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
name: string;
|
|
4
|
+
columnIndex: number;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
id?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (e: string) => void;
|
|
9
|
+
onBlur?: (e: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
/** Use a prefix for things like currency symbols (“$”, “¥”, “£”) or icons. */
|
|
14
|
+
prefix?: React.ReactNode;
|
|
15
|
+
/** Use suffix for things like units of measure (“in”, “cm”, ”hours”) or icons. */
|
|
16
|
+
suffix?: React.ReactNode;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
type?: 'text' | 'currency';
|
|
19
|
+
testId?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const DataTableEditableCell: ({ name, columnIndex, rowIndex, id: inputId, value, onChange, onBlur, placeholder, disabled, error, prefix, suffix, defaultValue, type, testId }: Props) => JSX.Element;
|
|
22
|
+
export default DataTableEditableCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DataTableEditableCell';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Action } from '../DataTable/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
isSelected?: boolean;
|
|
7
|
+
actions?: Action[];
|
|
8
|
+
hasDefaultPadding?: boolean;
|
|
9
|
+
} & Omit<React.HTMLProps<HTMLDivElement>, 'css'>;
|
|
10
|
+
declare const DataTableRow: React.ForwardRefExoticComponent<Pick<Props, "size" | "color" | "className" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "style" | "target" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "form" | "list" | "default" | "disabled" | "title" | "cite" | "data" | "label" | "slot" | "span" | "summary" | "pattern" | "start" | "wrap" | "checked" | "value" | "placeholder" | "prefix" | "content" | "translate" | "hidden" | "open" | "multiple" | "autoFocus" | "defaultValue" | "draggable" | "autoComplete" | "maxLength" | "dir" | "isSelected" | "readOnly" | "sizes" | "htmlFor" | "actions" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "hasDefaultPadding"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default DataTableRow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DataTableRowActions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DataTableRow';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import DataTable from './DataTable';
|
|
2
|
+
import DataTableRow from './DataTableRow';
|
|
3
|
+
import DataTableCell from './DataTable/DataTableCell/DataTableCell';
|
|
4
|
+
import DataTableEditableCell from './DataTableEditableCell';
|
|
5
|
+
export { DataTable, DataTableRow, DataTableCell, DataTableEditableCell };
|
|
6
|
+
export type { Column as DataTableColumn, CustomComponent as DataTableCustomComponent, SortDirection, Sort, Action } from './DataTable/types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: 'small' | 'medium' | 'large' | 'extra-large';
|
|
5
|
+
color?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
badge?: React.ReactNode;
|
|
8
|
+
alt?: string;
|
|
9
|
+
testId?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const Avatar: React.FC<Props>;
|
|
12
|
+
export default Avatar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AvatarImage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Avatar';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
theme?: 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
/** This will show a black tooltip when the user hover the button */
|
|
6
|
+
title?: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Badge';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from './types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
/** It is the body text of the Chip */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
/** This is used for overriding the default data-testid */
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Chip: ({ children, theme, testId }: Props) => JSX.Element;
|
|
11
|
+
export default Chip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Theme = 'marketing' | 'success' | 'upsell' | 'warning' | 'info' | 'danger';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PillTheme } from './types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
theme?: PillTheme;
|
|
7
|
+
testId?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Pill: React.FC<Props>;
|
|
10
|
+
export default Pill;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Pill';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type PillTheme = 'info' | 'success' | 'danger' | 'warning' | 'default';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import '../../forms/DatePickerCalendar/date-picker-calendar.scss';
|
|
3
|
+
import 'react-day-picker/lib/style.css';
|
|
4
|
+
import { BlockedDays, WeekStart } from '../../utils/date';
|
|
5
|
+
import { CalendarMode, CalendarPlacement } from './types';
|
|
6
|
+
declare type Props = {
|
|
7
|
+
mode?: CalendarMode;
|
|
8
|
+
/** Note that if the calendar is not able to fit in the selected position,
|
|
9
|
+
* it will override this selection and select the one that fits in the window. */
|
|
10
|
+
position?: CalendarPlacement;
|
|
11
|
+
weekStart?: WeekStart;
|
|
12
|
+
selected?: Date;
|
|
13
|
+
onSelect: (selected: Date) => void;
|
|
14
|
+
onClickOutside: () => void;
|
|
15
|
+
/** It disable some dates so the user can't click on them. Refer to this
|
|
16
|
+
* [doc](https://react-day-picker-v7.netlify.app/api/DayPicker#disabledDays) to see what
|
|
17
|
+
* values you can use. */
|
|
18
|
+
disabledDays?: BlockedDays;
|
|
19
|
+
anchorRef: MutableRefObject<HTMLElement | null>;
|
|
20
|
+
testId?: string;
|
|
21
|
+
};
|
|
22
|
+
/**Calendar overlay component*/
|
|
23
|
+
declare const Calendar: React.FC<Props>;
|
|
24
|
+
export default Calendar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CalendarPlacement } from './types';
|
|
2
|
+
declare type Position = {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const calculateCalendarPosition: (placement: CalendarPlacement, anchorPosition: DOMRect, calendarDimensions?: DOMRect | undefined) => Position;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Calendar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './KebabMenu';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* STATUS: IN DRAFT (Don't use this component yet)
|
|
7
|
+
* It is working to cover the ResourceTable actions menu but there are some functionalities pending such as `dividers` and `direction`.
|
|
8
|
+
*/
|
|
9
|
+
declare const Menu: React.FC<Props>;
|
|
10
|
+
export default Menu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type ButtonTheme = 'default' | 'primary' | 'danger' | 'upsell' | 'marketing' | 'hollow' | 'link-primary' | 'link-danger' | 'link-upsell' | 'link-toolbar' | 'link-contrast' | 'link-icon';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
theme?: ButtonTheme;
|
|
6
|
+
};
|
|
7
|
+
declare const MenuButton: React.FC<Props>;
|
|
8
|
+
export default MenuButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type MenuContextType = {
|
|
3
|
+
onToggleMenu: () => void;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
triggerRef: any;
|
|
6
|
+
};
|
|
7
|
+
declare const MenuContext: React.Context<MenuContextType>;
|
|
8
|
+
export declare const useMenuContext: () => MenuContextType;
|
|
9
|
+
export default MenuContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Menu';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
subHeader?: React.ReactNode;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
zIndex?: number;
|
|
8
|
+
/** This is the ID for the root element so when the modal is open it only allows iteracting with the modal when pressing tab. Can also use `Modal.setAppElement('#root')` in te main app once. */
|
|
9
|
+
rootElementId?: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
shouldReturnFocusAfterClose?: boolean;
|
|
14
|
+
testId?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const Modal: {
|
|
17
|
+
({ children, header, subHeader, onClose, zIndex, rootElementId, width, height, maxWidth, shouldReturnFocusAfterClose, testId }: Props): JSX.Element;
|
|
18
|
+
setAppElement(rootElement: string | HTMLElement): void;
|
|
19
|
+
};
|
|
20
|
+
export default Modal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ModalBody';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/** This will streamline the button creation and all the design pattern applied on buttons with a modal footer. If you want more flexibility to build the footer you can pass a `children` instead of using the `actions` prop. */
|
|
5
|
+
actions?: {
|
|
6
|
+
primary?: React.ReactElement;
|
|
7
|
+
secondary?: React.ReactElement;
|
|
8
|
+
tertiary?: React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
testId?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const ModalFooter: ({ children, actions, testId }: Props) => JSX.Element;
|
|
13
|
+
export default ModalFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ModalFooter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ModalHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Modal';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement, TooltipTheme } from './types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
theme?: TooltipTheme;
|
|
5
|
+
/** It defines the overlay position on the screen. The component might not use the value defined in here as it will place the tooltip on the best place based on the anchor position on the screen. */
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
/** It can be text or a JSX. */
|
|
8
|
+
overlay?: React.ReactNode;
|
|
9
|
+
/** Used on the `white` theme when there is a need of adding a header to the tooltip. */
|
|
10
|
+
header?: React.ReactNode;
|
|
11
|
+
/** If `true` it allow the overlay to keep open if the user hover it so, user can iteract with it (click on a link or copy the text). */
|
|
12
|
+
delayOnClose?: boolean;
|
|
13
|
+
/** If `true` it will add a delay on opening the overlay, if the user is not hovering the anchor it will not open the overlay. */
|
|
14
|
+
delayOnOpen?: boolean;
|
|
15
|
+
extraClass?: string;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
onVisibleChange?: (isVisible: boolean) => void;
|
|
18
|
+
children: React.ReactElement;
|
|
19
|
+
testId?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement, TooltipTheme } from '../types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
theme: TooltipTheme;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
anchorPosition: DOMRect;
|
|
7
|
+
placement: Placement;
|
|
8
|
+
header?: React.ReactNode;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onFocusIn: () => void;
|
|
11
|
+
onFocusOut: () => void;
|
|
12
|
+
extraClass?: string;
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const TooltipOverlay: React.FC<Props>;
|
|
16
|
+
export default TooltipOverlay;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Placement, ActualPlacement } from '../types';
|
|
2
|
+
declare type Position = {
|
|
3
|
+
width: number;
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const calculatePosition: (placement: Placement, anchorPosition: DOMRect, tooltipRectPosition?: DOMRect | undefined) => {
|
|
8
|
+
overlay?: Position | undefined;
|
|
9
|
+
arrow?: ArrowPosition | undefined;
|
|
10
|
+
actualPlacement: ActualPlacement;
|
|
11
|
+
};
|
|
12
|
+
export declare const updateMisalignedOverlay: (overlayPosition: Position, arrowPosition: ArrowPosition, tooltipRectPosition: DOMRect) => Position;
|
|
13
|
+
export declare const calculateOverlayPosition: (actualPlacement: ActualPlacement, anchorPosition: DOMRect, tooltipWidth?: number) => Position;
|
|
14
|
+
export declare const getActualPlacement: (placement: Placement, anchorPosition: DOMRect, tooltipHeight: number) => ActualPlacement;
|
|
15
|
+
declare type ArrowPosition = {
|
|
16
|
+
left: number;
|
|
17
|
+
top: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const calculateArrowPosition: (placement: Placement, tooltipPosition: Position, anchorPosition: DOMRect, tooltipRectPosition?: DOMRect | undefined) => ArrowPosition;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TooltipOverlay';
|