@jobber/components 6.75.2 → 6.75.3-scotttho-e5ab79e.3
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/.eslintrc.cjs +14 -0
- package/dist/AnimatedPresence/AnimatedPresence.d.ts +2 -1
- package/dist/AnimatedPresence/AnimatedPresence.transitions.d.ts +1 -1
- package/dist/AnimatedSwitcher/AnimatedSwitcher.d.ts +3 -2
- package/dist/AnimatedSwitcher/transitions.d.ts +1 -1
- package/dist/AtlantisContext/AtlantisContext.d.ts +1 -1
- package/dist/AtlantisPortalContent/AtlantisPortalContent.d.ts +1 -1
- package/dist/AtlantisThemeContext/AtlantisThemeContext.d.ts +1 -1
- package/dist/AtlantisThemeContext/index.d.ts +1 -1
- package/dist/AtlantisThemeContext/types.d.ts +2 -2
- package/dist/AtlantisThemeContext/updateTheme.d.ts +1 -1
- package/dist/Autocomplete/Autocomplete.d.ts +4 -3
- package/dist/Autocomplete/Autocomplete.types.d.ts +3 -3
- package/dist/Autocomplete/Autocomplete.utils.d.ts +1 -1
- package/dist/Autocomplete/Menu/DefaultMenu.d.ts +1 -1
- package/dist/Autocomplete/Menu/Menu.d.ts +1 -1
- package/dist/Autocomplete/Menu/MenuWrapper.d.ts +3 -2
- package/dist/Autocomplete/Option.d.ts +3 -2
- package/dist/Autocomplete/constants.d.ts +0 -1
- package/dist/Autocomplete/index.cjs +2 -1
- package/dist/Autocomplete/index.d.ts +2 -2
- package/dist/Autocomplete/index.mjs +2 -1
- package/dist/Autocomplete/useKeyboardNavigation.d.ts +1 -1
- package/dist/Autocomplete/useRepositionMenu.d.ts +1 -1
- package/dist/Autocomplete-cjs.js +11 -13
- package/dist/Autocomplete-es.js +15 -17
- package/dist/Avatar/Avatar.d.ts +4 -3
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Banner/Banner.types.d.ts +2 -2
- package/dist/Banner/BannerContext.d.ts +1 -1
- package/dist/Banner-cjs.js +1 -1
- package/dist/Banner-es.js +1 -1
- package/dist/Button/Button.d.ts +3 -2
- package/dist/Button/Button.types.d.ts +6 -6
- package/dist/Button/ButtonInternals.d.ts +3 -3
- package/dist/Button/ButtonProvider.d.ts +3 -2
- package/dist/Button/index.d.ts +2 -2
- package/dist/Button/useButtonStyles.d.ts +1 -1
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/CardClickable.d.ts +2 -1
- package/dist/Card/CardHeader.d.ts +1 -1
- package/dist/Card/index.cjs +4 -4
- package/dist/Card/index.mjs +4 -4
- package/dist/Card/types.d.ts +4 -4
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.types.d.ts +2 -2
- package/dist/Checkbox/index.d.ts +1 -1
- package/dist/Chip/Chip.d.ts +1 -1
- package/dist/Chip/Chip.types.d.ts +2 -1
- package/dist/Chip/components/ChipDismissible/ChipDismissible.d.ts +1 -1
- package/dist/Chip/components/ChipPrefix/Chip.Prefix.d.ts +2 -1
- package/dist/Chip/components/ChipSelectable/ChipSelectable.d.ts +1 -1
- package/dist/Chip/components/ChipSuffix/Chip.Suffix.d.ts +2 -1
- package/dist/Chip/hooks/useChildComponent.d.ts +1 -1
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip/index.mjs +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +3 -3
- package/dist/Chips/Chip.d.ts +1 -1
- package/dist/Chips/ChipDismissible.d.ts +3 -2
- package/dist/Chips/ChipTypes.d.ts +4 -4
- package/dist/Chips/Chips.d.ts +1 -1
- package/dist/Chips/ChipsTypes.d.ts +2 -2
- package/dist/Chips/InternalChip.d.ts +1 -1
- package/dist/Chips/InternalChipAffix.d.ts +6 -5
- package/dist/Chips/InternalChipButton.d.ts +3 -2
- package/dist/Chips/InternalChipDismissible/InternalChipDismissible.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleInput.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleTypes.d.ts +3 -3
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +3 -1
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +3 -1
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissible.d.ts +4 -3
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +4 -3
- package/dist/Chips/InternalChipDismissible/hooks/useRepositionMenu.d.ts +6 -15
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/index.cjs +4 -3
- package/dist/Chips/InternalChipDismissible/index.mjs +4 -3
- package/dist/Chips/InternalChipMultiSelect.d.ts +1 -1
- package/dist/Chips/InternalChipSingleSelect.d.ts +1 -1
- package/dist/Chips/index.cjs +4 -3
- package/dist/Chips/index.mjs +4 -3
- package/dist/Cluster/Cluster.d.ts +1 -1
- package/dist/Cluster/types.d.ts +1 -1
- package/dist/Combobox/Combobox.d.ts +1 -1
- package/dist/Combobox/Combobox.types.d.ts +1 -1
- package/dist/Combobox/ComboboxProvider.d.ts +3 -2
- package/dist/Combobox/components/ComboboxAction/ComboboxAction.d.ts +1 -1
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +1 -1
- package/dist/Combobox/components/ComboboxActivator/index.cjs +1 -1
- package/dist/Combobox/components/ComboboxActivator/index.mjs +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +1 -1
- package/dist/Combobox/components/ComboboxOption/ComboboxOption.d.ts +1 -1
- package/dist/Combobox/components/ComboboxTrigger/ComboboxTrigger.d.ts +1 -1
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -1
- package/dist/Combobox/components/ComboboxTrigger/index.mjs +1 -1
- package/dist/Combobox/hooks/useCombobox.d.ts +4 -3
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +4 -4
- package/dist/Combobox/hooks/useComboboxActivatorAccessibility.d.ts +1 -1
- package/dist/Combobox/hooks/useComboboxContent.d.ts +1 -1
- package/dist/Combobox/hooks/useComboboxValidation.d.ts +2 -2
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +2 -2
- package/dist/Combobox/index.cjs +0 -1
- package/dist/Combobox/index.d.ts +1 -1
- package/dist/Combobox/index.mjs +0 -1
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +2 -2
- package/dist/ComboboxContent-cjs.js +12 -16
- package/dist/ComboboxContent-es.js +15 -19
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ConfirmationModal/ConfirmationModal.d.ts +2 -1
- package/dist/ConfirmationModal/index.d.ts +1 -1
- package/dist/ConfirmationModal-cjs.js +1 -1
- package/dist/ConfirmationModal-es.js +2 -2
- package/dist/Container/Container.d.ts +1 -1
- package/dist/Container/types.d.ts +2 -2
- package/dist/Content/Content.d.ts +1 -1
- package/dist/Content-cjs.js +1 -1
- package/dist/Content-es.js +1 -1
- package/dist/ContentBlock/ContentBlock.d.ts +1 -1
- package/dist/ContentBlock/types.d.ts +2 -2
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +2 -2
- package/dist/Cover/Cover.d.ts +1 -1
- package/dist/DataDump/index.cjs +4 -4
- package/dist/DataDump/index.mjs +4 -4
- package/dist/DataList/DataList.d.ts +1 -1
- package/dist/DataList/DataList.types.d.ts +6 -6
- package/dist/DataList/DataList.utils.d.ts +5 -4
- package/dist/DataList/components/DataListAction/DataListAction.d.ts +1 -1
- package/dist/DataList/components/DataListActions/DataListActions.d.ts +1 -1
- package/dist/DataList/components/DataListActions/index.cjs +1 -1
- package/dist/DataList/components/DataListActions/index.mjs +1 -1
- package/dist/DataList/components/DataListActionsMenu/DataListActionsMenu.d.ts +2 -1
- package/dist/DataList/components/DataListBulkActions/DataListBulkActions.d.ts +1 -1
- package/dist/DataList/components/DataListBulkActions/index.cjs +1 -1
- package/dist/DataList/components/DataListBulkActions/index.mjs +1 -1
- package/dist/DataList/components/DataListEmptyState/DataListEmptyState.d.ts +1 -1
- package/dist/DataList/components/DataListFilters/DataListFilters.d.ts +2 -1
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -1
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -1
- package/dist/DataList/components/DataListFilters/index.cjs +0 -1
- package/dist/DataList/components/DataListFilters/index.mjs +0 -1
- package/dist/DataList/components/DataListHeader/DataListHeaderCheckbox.d.ts +1 -1
- package/dist/DataList/components/DataListHeader/index.cjs +1 -1
- package/dist/DataList/components/DataListHeader/index.mjs +1 -1
- package/dist/DataList/components/DataListHeaderTile/DataListHeaderTile.d.ts +1 -1
- package/dist/DataList/components/DataListHeaderTile/components/DataListSortingOptions.d.ts +1 -1
- package/dist/DataList/components/DataListItem/DataListItem.d.ts +1 -1
- package/dist/DataList/components/DataListItem/DataListItemInternal.d.ts +1 -1
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickable.d.ts +2 -1
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickableInternal.d.ts +3 -2
- package/dist/DataList/components/DataListItem/index.cjs +1 -1
- package/dist/DataList/components/DataListItem/index.mjs +1 -1
- package/dist/DataList/components/DataListItemActions/DataListItemActions.d.ts +3 -2
- package/dist/DataList/components/DataListItemActions/index.cjs +1 -1
- package/dist/DataList/components/DataListItemActions/index.mjs +1 -1
- package/dist/DataList/components/DataListItemActionsOverflow/DataListItemActionsOverflow.d.ts +3 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +1 -1
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +1 -1
- package/dist/DataList/components/DataListItems/DataListItems.d.ts +1 -1
- package/dist/DataList/components/DataListItems/index.cjs +1 -1
- package/dist/DataList/components/DataListItems/index.mjs +1 -1
- package/dist/DataList/components/DataListLayout/DataListLayout.d.ts +1 -1
- package/dist/DataList/components/DataListLayout/index.cjs +1 -1
- package/dist/DataList/components/DataListLayout/index.mjs +1 -1
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/DataListLayoutContext.d.ts +1 -1
- package/dist/DataList/components/DataListLayoutActions/index.cjs +1 -1
- package/dist/DataList/components/DataListLayoutActions/index.mjs +1 -1
- package/dist/DataList/components/DataListSearch/DataListSearch.d.ts +1 -1
- package/dist/DataList/components/DataListStatusBar/DataListStatusBar.d.ts +2 -1
- package/dist/DataList/components/DataListStickyHeader/DataListStickyHeader.d.ts +2 -1
- package/dist/DataList/context/DataListContext/DataListContext.d.ts +1 -1
- package/dist/DataList/context/DataListLayoutContext/DataListLayoutContext.d.ts +1 -1
- package/dist/DataList/hooks/useBatchSelect.d.ts +1 -1
- package/dist/DataList/hooks/useGetItemActions.d.ts +2 -2
- package/dist/DataList/hooks/useResponsiveSizing.d.ts +1 -1
- package/dist/DataList/index.cjs +1 -2
- package/dist/DataList/index.d.ts +1 -1
- package/dist/DataList/index.mjs +1 -2
- package/dist/DataListActionsMenu-cjs.js +4 -4
- package/dist/DataListActionsMenu-es.js +8 -8
- package/dist/DataListHeaderTile-cjs.js +1 -1
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +2 -2
- package/dist/DataListOverflowFade-es.js +3 -3
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +2 -2
- package/dist/DataListSortingOptions-cjs.js +2 -2
- package/dist/DataListSortingOptions-es.js +4 -4
- package/dist/DataTable/Body.d.ts +3 -2
- package/dist/DataTable/BodyLoading.d.ts +1 -1
- package/dist/DataTable/DataTable.d.ts +20 -3
- package/dist/DataTable/Footer.d.ts +1 -1
- package/dist/DataTable/Header.d.ts +2 -2
- package/dist/DataTable/Pagination.d.ts +1 -1
- package/dist/DataTable/components/DataTableActions.d.ts +2 -0
- package/dist/DataTable/components/DataTableBody.d.ts +2 -0
- package/dist/DataTable/components/DataTableCell.d.ts +2 -0
- package/dist/DataTable/components/DataTableContainer.d.ts +2 -0
- package/dist/DataTable/components/DataTableFooter.d.ts +9 -0
- package/dist/DataTable/components/DataTableHeader.d.ts +2 -0
- package/dist/DataTable/components/DataTableHeaderCell.d.ts +5 -0
- package/dist/DataTable/components/DataTablePagination.d.ts +5 -0
- package/dist/DataTable/components/DataTablePaginationButton.d.ts +21 -0
- package/dist/DataTable/components/DataTableRow.d.ts +2 -0
- package/dist/DataTable/components/DataTableRowActions.d.ts +4 -0
- package/dist/DataTable/components/DataTableSortableHeader.d.ts +18 -0
- package/dist/DataTable/components/DataTableTable.d.ts +2 -0
- package/dist/DataTable/components/index.cjs +27 -0
- package/dist/DataTable/components/index.d.ts +13 -0
- package/dist/DataTable/components/index.mjs +9 -0
- package/dist/DataTable/createTableSettings.d.ts +2 -2
- package/dist/DataTable/index.cjs +6 -0
- package/dist/DataTable/index.d.ts +3 -1
- package/dist/DataTable/index.mjs +1 -0
- package/dist/DataTable/test-utilities/index.cjs +1 -1
- package/dist/DataTable/test-utilities/index.mjs +1 -1
- package/dist/DataTable/test-utilities/mocks.d.ts +1 -1
- package/dist/DataTable/types.d.ts +2 -2
- package/dist/DataTable-cjs.js +43 -63
- package/dist/DataTable-es.js +41 -61
- package/dist/DataTableTable-cjs.js +127 -0
- package/dist/DataTableTable-es.js +112 -0
- package/dist/DatePicker/DatePicker.d.ts +5 -4
- package/dist/DatePicker/DatePickerActivator.d.ts +4 -2
- package/dist/DatePicker/DatePickerCustomHeader.d.ts +1 -1
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +1 -1
- package/dist/DatePicker-cjs.js +1 -1
- package/dist/DatePicker-es.js +2 -2
- package/dist/DescriptionList/DescriptionList.d.ts +2 -1
- package/dist/Disclosure/Disclosure.d.ts +2 -1
- package/dist/Disclosure-cjs.js +2 -2
- package/dist/Disclosure-es.js +3 -3
- package/dist/Drawer/Drawer.d.ts +2 -1
- package/dist/Drawer/DrawerGrid.d.ts +2 -1
- package/dist/Emphasis/Emphasis.d.ts +3 -2
- package/dist/FeatureSwitch/FeatureSwitch.d.ts +2 -1
- package/dist/Flex/Flex.d.ts +3 -2
- package/dist/Flex/Flex.types.d.ts +1 -1
- package/dist/Flex-cjs.js +1 -1
- package/dist/Flex-es.js +1 -1
- package/dist/Form/Form.d.ts +2 -1
- package/dist/Form/index.d.ts +1 -1
- package/dist/FormField/FormField.d.ts +1 -1
- package/dist/FormField/FormFieldAffix.d.ts +4 -3
- package/dist/FormField/FormFieldDescription.d.ts +2 -1
- package/dist/FormField/FormFieldPostFix.d.ts +2 -1
- package/dist/FormField/FormFieldTypes.d.ts +6 -5
- package/dist/FormField/FormFieldWrapper.d.ts +4 -3
- package/dist/FormField/hooks/useAtlantisFormField.d.ts +2 -2
- package/dist/FormField/hooks/useAtlantisFormFieldActions.d.ts +3 -3
- package/dist/FormField/hooks/useAtlantisReactHookForm.d.ts +1 -1
- package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +2 -2
- package/dist/FormField/hooks/useToolbar.d.ts +1 -1
- package/dist/FormField/index.d.ts +3 -3
- package/dist/FormField-cjs.js +3 -7
- package/dist/FormField-es.js +3 -7
- package/dist/FormatFile/FormatFile.d.ts +2 -2
- package/dist/FormatFile/types.d.ts +1 -1
- package/dist/FormatFile/useFormatFile.d.ts +1 -1
- package/dist/FormatFile/useFormatFileStyles.d.ts +1 -1
- package/dist/Frame/Frame.d.ts +1 -1
- package/dist/Frame/types.d.ts +1 -1
- package/dist/Gallery/Gallery.d.ts +1 -1
- package/dist/Gallery/GalleryTypes.d.ts +2 -2
- package/dist/Grid/Grid.d.ts +12 -5
- package/dist/Grid/index.cjs +1 -0
- package/dist/Grid/index.mjs +1 -0
- package/dist/Grid-cjs.js +16 -4
- package/dist/Grid-es.js +16 -4
- package/dist/Heading/Heading.d.ts +9 -3
- package/dist/Heading-cjs.js +10 -2
- package/dist/Heading-es.js +10 -2
- package/dist/Icon/Icon.d.ts +4 -3
- package/dist/InlineLabel/InlineLabel.d.ts +2 -1
- package/dist/InlineLabel/index.d.ts +1 -1
- package/dist/InputAvatar/InputAvatar.d.ts +2 -2
- package/dist/InputDate/InputDate.d.ts +1 -1
- package/dist/InputDate/InputDate.rebuilt.d.ts +1 -1
- package/dist/InputDate/InputDate.types.d.ts +2 -2
- package/dist/InputDate/index.d.ts +1 -1
- package/dist/InputDate/useInputDateActivatorActions.d.ts +3 -3
- package/dist/InputEmail/InputEmail.d.ts +1 -1
- package/dist/InputEmail/InputEmail.rebuilt.d.ts +1 -1
- package/dist/InputEmail/InputEmail.types.d.ts +2 -2
- package/dist/InputEmail/hooks/useInputEmailActions.d.ts +2 -2
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +1 -1
- package/dist/InputEmail/index.d.ts +2 -2
- package/dist/InputFile/InputFile.d.ts +3 -2
- package/dist/InputFile/InputFileButton.d.ts +1 -1
- package/dist/InputFile/InputFileContentContext.d.ts +1 -1
- package/dist/InputFile/InputFileDescription.d.ts +3 -2
- package/dist/InputFile/InputFileHintText.d.ts +3 -2
- package/dist/InputFile/InputFileValidationErrors.d.ts +1 -1
- package/dist/InputFile/index.d.ts +1 -1
- package/dist/InputGroup/InputGroup.d.ts +2 -1
- package/dist/InputNumber/InputNumber.d.ts +1 -1
- package/dist/InputNumber/InputNumber.rebuilt.d.ts +1 -1
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +3 -2
- package/dist/InputNumber/index.d.ts +3 -3
- package/dist/InputPassword/InputPassword.d.ts +1 -1
- package/dist/InputPhoneNumber/InputMask.d.ts +4 -3
- package/dist/InputPhoneNumber/InputPhoneNumber.d.ts +1 -1
- package/dist/InputPhoneNumber/InputPhoneNumber.rebuilt.d.ts +1 -1
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +3 -3
- package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +2 -2
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +1 -1
- package/dist/InputPhoneNumber/index.d.ts +2 -2
- package/dist/InputText/InputText.d.ts +3 -3
- package/dist/InputText/InputText.rebuilt.d.ts +1 -1
- package/dist/InputText/InputText.types.d.ts +3 -3
- package/dist/InputText/index.cjs +2 -2
- package/dist/InputText/index.d.ts +2 -2
- package/dist/InputText/index.mjs +3 -3
- package/dist/InputText/useInputTextActions.d.ts +2 -2
- package/dist/InputText/useInputTextFormField.d.ts +1 -1
- package/dist/InputText/useTextAreaResize.d.ts +2 -2
- package/dist/InputTime/InputTime.d.ts +1 -1
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +1 -1
- package/dist/InputTime/hooks/useTimePredict.d.ts +1 -1
- package/dist/InputTime/index.cjs +8 -5
- package/dist/InputTime/index.d.ts +1 -1
- package/dist/InputTime/index.mjs +8 -5
- package/dist/InputTime/utils/input-time-utils.d.ts +1 -1
- package/dist/InternalChipDismissible-cjs.js +19 -20
- package/dist/InternalChipDismissible-es.js +19 -20
- package/dist/LightBox/LightBox.d.ts +2 -1
- package/dist/LightBox-cjs.js +51 -68
- package/dist/LightBox-es.js +57 -74
- package/dist/Link/Link.d.ts +2 -1
- package/dist/Link/index.d.ts +2 -1
- package/dist/List/List.d.ts +1 -1
- package/dist/List/ListItem.d.ts +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Menu/Menu.d.ts +3 -2
- package/dist/Menu/index.cjs +4 -4
- package/dist/Menu/index.d.ts +1 -1
- package/dist/Menu/index.mjs +4 -4
- package/dist/Menu-cjs.js +46 -44
- package/dist/Menu-es.js +49 -47
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.rebuilt.d.ts +3 -2
- package/dist/Modal/Modal.types.d.ts +6 -5
- package/dist/Modal/ModalContext.rebuilt.d.ts +4 -3
- package/dist/Modal/index.cjs +3 -3
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Modal/index.mjs +7 -7
- package/dist/MultiSelect/DropDownMenu.d.ts +3 -2
- package/dist/MultiSelect/MultiSelect.d.ts +3 -2
- package/dist/Page/Page.d.ts +5 -4
- package/dist/Page/index.cjs +4 -4
- package/dist/Page/index.d.ts +1 -1
- package/dist/Page/index.mjs +4 -4
- package/dist/Page-cjs.js +4 -4
- package/dist/Page-es.js +5 -5
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/Popover.types.d.ts +3 -3
- package/dist/Popover/PopoverContext.d.ts +6 -5
- package/dist/Popover/index.cjs +1 -1
- package/dist/Popover/index.mjs +1 -1
- package/dist/Popover/usePopover.d.ts +4 -7
- package/dist/Popover-cjs.js +18 -18
- package/dist/Popover-es.js +20 -20
- package/dist/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/RadioGroup/RadioOption.d.ts +3 -2
- package/dist/RecurringSelect/CurrentRecurrenceComponent.d.ts +1 -1
- package/dist/RecurringSelect/RecurringSelect.d.ts +1 -1
- package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +1 -1
- package/dist/RecurringSelect/components/MonthlyDayOfWeekSelect.d.ts +1 -1
- package/dist/RecurringSelect/index.d.ts +2 -1
- package/dist/ResponsiveSwitcher/ResponsiveSwitcher.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlBase.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlOption.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlProvider.d.ts +2 -1
- package/dist/Select/Option.d.ts +2 -1
- package/dist/Select/OptionGroup.d.ts +29 -0
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/Select.rebuilt.d.ts +1 -1
- package/dist/Select/Select.types.d.ts +8 -1
- package/dist/Select/hooks/useSelectActions.d.ts +1 -1
- package/dist/Select/hooks/useSelectFormField.d.ts +1 -1
- package/dist/Select/index.cjs +11 -3
- package/dist/Select/index.d.ts +6 -2
- package/dist/Select/index.mjs +11 -3
- package/dist/SideDrawer/SideDrawerBackButton.d.ts +1 -1
- package/dist/SideDrawer-cjs.js +6 -6
- package/dist/SideDrawer-es.js +10 -10
- package/dist/SideKick/SideKick.d.ts +1 -1
- package/dist/SideKick/types.d.ts +1 -1
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/StatusIndicator/StatusIndicator.d.ts +1 -1
- package/dist/StatusLabel/StatusLabel.d.ts +1 -1
- package/dist/Table/Body.d.ts +2 -1
- package/dist/Table/Cells/Cell.d.ts +2 -1
- package/dist/Table/Cells/CellCurrency.d.ts +2 -2
- package/dist/Table/Footer.d.ts +2 -1
- package/dist/Table/Header.d.ts +2 -1
- package/dist/Table/Row.d.ts +2 -1
- package/dist/Table/Table.d.ts +2 -1
- package/dist/Tabs/Tabs.d.ts +2 -1
- package/dist/Tabs/hooks/useTabsOverflow.d.ts +1 -1
- package/dist/Text/Text.d.ts +3 -2
- package/dist/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Thumbnail/ThumbnailImage.d.ts +1 -1
- package/dist/Tiles/Tiles.d.ts +1 -1
- package/dist/Toast/Toast.d.ts +1 -1
- package/dist/Toast/showToast.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +3 -2
- package/dist/Tooltip/index.cjs +1 -1
- package/dist/Tooltip/index.mjs +1 -1
- package/dist/Tooltip/useTooltipPositioning.d.ts +10 -14
- package/dist/Tooltip-cjs.js +50 -20
- package/dist/Tooltip-es.js +52 -22
- package/dist/Typography/Typography.d.ts +3 -2
- package/dist/Typography/types.d.ts +1 -1
- package/dist/floating-ui.react-es.js +1 -1
- package/dist/getMappedAtlantisSpaceToken-cjs.js +1 -0
- package/dist/getMappedAtlantisSpaceToken-es.js +1 -0
- package/dist/index.cjs +11 -9
- package/dist/index.mjs +11 -9
- package/dist/maxHeight-cjs.js +24 -0
- package/dist/maxHeight-es.js +22 -0
- package/dist/sharedHelpers/getMappedAtlantisSpaceToken.d.ts +1 -1
- package/dist/sharedHelpers/types.d.ts +1 -1
- package/dist/styles.css +338 -9
- package/dist/throttle-cjs.js +0 -1
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +69 -4381
- package/dist/useDebounce-es.js +71 -4383
- package/dist/useFocusTrap-cjs.js +3 -8
- package/dist/useFocusTrap-es.js +4 -9
- package/dist/useInView-cjs.js +5 -10
- package/dist/useInView-es.js +6 -11
- package/dist/useIsMounted-cjs.js +4 -19
- package/dist/useIsMounted-es.js +5 -20
- package/dist/useOnKeyDown-cjs.js +2 -7
- package/dist/useOnKeyDown-es.js +3 -8
- package/dist/useRefocusOnActivator-cjs.js +2 -7
- package/dist/useRefocusOnActivator-es.js +3 -8
- package/dist/useResizeObserver-cjs.js +64 -92
- package/dist/useResizeObserver-es.js +65 -94
- package/dist/useSafeLayoutEffect-cjs.js +3 -8
- package/dist/useSafeLayoutEffect-es.js +5 -10
- package/dist/useScrollToActive-cjs.js +36 -20
- package/dist/useScrollToActive-es.js +37 -21
- package/dist/utils/maxHeight.d.ts +23 -0
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/meta/meta.json +15 -0
- package/package.json +10 -5
package/.eslintrc.cjs
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
overrides: [
|
|
3
|
+
{
|
|
4
|
+
files: ["*.ts", "*.tsx"],
|
|
5
|
+
parserOptions: {
|
|
6
|
+
project: "tsconfig.json",
|
|
7
|
+
tsconfigRootDir: __dirname,
|
|
8
|
+
sourceType: "module",
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
"@typescript-eslint/consistent-type-exports": "error",
|
|
12
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
2
16
|
rules: {
|
|
3
17
|
"import/no-internal-modules": [
|
|
4
18
|
"error",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { IconNames } from "@jobber/design";
|
|
3
4
|
export interface AnimatedSwitcherProps {
|
|
4
5
|
/**
|
|
5
6
|
* Determines when to switch the component to the `switchTo` prop.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AtlantisPortalContentProps } from "./AtlantisPortalContent.types";
|
|
2
|
+
import type { AtlantisPortalContentProps } from "./AtlantisPortalContent.types";
|
|
3
3
|
export declare function AtlantisPortalContent({ children, }: AtlantisPortalContentProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AtlantisThemeContextProviderProps, AtlantisThemeContextValue } from "./types";
|
|
2
|
+
import type { AtlantisThemeContextProviderProps, AtlantisThemeContextValue } from "./types";
|
|
3
3
|
export declare const atlantisThemeContextDefaultValues: AtlantisThemeContextValue;
|
|
4
4
|
export declare function AtlantisThemeContextProvider({ children, dangerouslyOverrideTheme, }: AtlantisThemeContextProviderProps): React.JSX.Element;
|
|
5
5
|
export declare function useAtlantisTheme(): AtlantisThemeContextValue;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { AtlantisThemeContextProvider, atlantisThemeContextDefaultValues, useAtlantisTheme, } from "./AtlantisThemeContext";
|
|
2
|
-
export { THEME_CHANGE_EVENT,
|
|
2
|
+
export { THEME_CHANGE_EVENT, type AtlantisThemeContextProviderProps, type AtlantisThemeContextValue, type Theme, type ThemeChangeDetails, } from "./types";
|
|
3
3
|
export { updateTheme } from "./updateTheme";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { tokens } from "@jobber/design";
|
|
2
|
-
import { PropsWithChildren } from "react";
|
|
1
|
+
import type { tokens } from "@jobber/design";
|
|
2
|
+
import type { PropsWithChildren } from "react";
|
|
3
3
|
export interface AtlantisThemeContextValue {
|
|
4
4
|
/**
|
|
5
5
|
* The theme of the application.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import type { Ref, RefAttributes } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type AnyOption, type AutocompleteProps, type Option } from "./Autocomplete.types";
|
|
4
|
+
import type { InputTextRef } from "../InputText";
|
|
4
5
|
declare function AutocompleteInternal<GenericOption extends AnyOption = AnyOption, GenericOptionValue extends Option = Option, GenericGetOptionsValue extends AnyOption = AnyOption>({ initialOptions, value, allowFreeForm, size, debounce: debounceRate, onChange, getOptions, placeholder, onBlur, onFocus, validations, customRenderMenu, ...inputProps }: AutocompleteProps<GenericOption, GenericOptionValue, GenericGetOptionsValue>, ref: Ref<InputTextRef>): React.JSX.Element;
|
|
5
6
|
export declare const Autocomplete: <GenericOption extends AnyOption = AnyOption, GenericOptionValue extends Option = Option, GenericGetOptionsValue extends AnyOption = AnyOption>(props: AutocompleteProps<GenericOption, GenericOptionValue, GenericGetOptionsValue> & RefAttributes<InputTextRef>) => ReturnType<typeof AutocompleteInternal>;
|
|
6
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
import { FormFieldProps } from "../FormField";
|
|
3
|
-
import { InputTextRef } from "../InputText";
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { FormFieldProps } from "../FormField";
|
|
3
|
+
import type { InputTextRef } from "../InputText";
|
|
4
4
|
type OptionValue = string | number;
|
|
5
5
|
export interface BaseOption {
|
|
6
6
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyOption, GroupOption, Option } from "./Autocomplete.types";
|
|
1
|
+
import { type AnyOption, type GroupOption, type Option } from "./Autocomplete.types";
|
|
2
2
|
export declare function isOptionSelected(selectedOption: Option | undefined, option: Option): boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to determine if the option is a group. This is used to
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AnyOption, MenuProps, Option } from "../Autocomplete.types";
|
|
2
|
+
import { type AnyOption, type MenuProps, type Option } from "../Autocomplete.types";
|
|
3
3
|
export declare function Menu<GenericOption extends AnyOption = AnyOption, GenericOptionValue extends Option = Option>({ options, selectedOption, onOptionSelect, inputFocused, attachTo, inputRef, customRenderMenu, }: MenuProps<GenericOption, GenericOptionValue>): React.JSX.Element | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { UseRepositionMenu } from "../useRepositionMenu";
|
|
3
4
|
export interface BaseAutocompleteMenuWrapperInternalProps {
|
|
4
5
|
readonly setMenuRef: UseRepositionMenu["setMenuRef"];
|
|
5
6
|
readonly floatStyles: UseRepositionMenu["styles"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type AnyOption, type Option } from "./Autocomplete.types";
|
|
3
4
|
export interface MenuOptionProps {
|
|
4
5
|
readonly isHighlighted: boolean;
|
|
5
6
|
readonly option: AnyOption;
|
|
@@ -9,11 +9,12 @@ require('../useIsMounted-cjs.js');
|
|
|
9
9
|
require('../useSafeLayoutEffect-cjs.js');
|
|
10
10
|
require('../floating-ui.react-cjs.js');
|
|
11
11
|
require('react-dom');
|
|
12
|
+
require('../maxHeight-cjs.js');
|
|
13
|
+
require('@jobber/design');
|
|
12
14
|
require('../Heading-cjs.js');
|
|
13
15
|
require('../Typography-cjs.js');
|
|
14
16
|
require('../Text-cjs.js');
|
|
15
17
|
require('../Icon-cjs.js');
|
|
16
|
-
require('@jobber/design');
|
|
17
18
|
require('../useOnKeyDown-cjs.js');
|
|
18
19
|
require('../InputText/index.cjs');
|
|
19
20
|
require('../FormField-cjs.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Autocomplete } from "./Autocomplete";
|
|
2
|
-
export { MenuOptionProps, BaseMenuOption, BaseMenuOptionProps, MenuOption, BaseMenuGroupOption, BaseMenuGroupOptionProps, } from "./Option";
|
|
3
|
-
export { AnyOption, AutocompleteProps, BaseOption, CustomOptionsMenuProp, GroupOption, OptionCollection, Option, } from "./Autocomplete.types";
|
|
2
|
+
export { type MenuOptionProps, BaseMenuOption, type BaseMenuOptionProps, MenuOption, BaseMenuGroupOption, type BaseMenuGroupOptionProps, } from "./Option";
|
|
3
|
+
export { type AnyOption, type AutocompleteProps, type BaseOption, type CustomOptionsMenuProp, type GroupOption, type OptionCollection, type Option, } from "./Autocomplete.types";
|
|
4
4
|
export { KeyboardAction, getRequestedIndexChange, useKeyboardNavigation, useCustomKeyboardNavigation, } from "./useKeyboardNavigation";
|
|
5
5
|
export { useRepositionMenu } from "./useRepositionMenu";
|
|
6
6
|
export { BaseAutocompleteMenuWrapper, useAutocompleteMenu, } from "./Menu/MenuWrapper";
|
|
@@ -7,11 +7,12 @@ import '../useIsMounted-es.js';
|
|
|
7
7
|
import '../useSafeLayoutEffect-es.js';
|
|
8
8
|
import '../floating-ui.react-es.js';
|
|
9
9
|
import 'react-dom';
|
|
10
|
+
import '../maxHeight-es.js';
|
|
11
|
+
import '@jobber/design';
|
|
10
12
|
import '../Heading-es.js';
|
|
11
13
|
import '../Typography-es.js';
|
|
12
14
|
import '../Text-es.js';
|
|
13
15
|
import '../Icon-es.js';
|
|
14
|
-
import '@jobber/design';
|
|
15
16
|
import '../useOnKeyDown-es.js';
|
|
16
17
|
import '../InputText/index.mjs';
|
|
17
18
|
import '../FormField-es.js';
|
package/dist/Autocomplete-cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var classnames = require('classnames');
|
|
|
7
7
|
var useIsMounted = require('./useIsMounted-cjs.js');
|
|
8
8
|
var floatingUi_react = require('./floating-ui.react-cjs.js');
|
|
9
9
|
var useSafeLayoutEffect = require('./useSafeLayoutEffect-cjs.js');
|
|
10
|
+
var maxHeight = require('./maxHeight-cjs.js');
|
|
10
11
|
var Heading = require('./Heading-cjs.js');
|
|
11
12
|
var Text = require('./Text-cjs.js');
|
|
12
13
|
var Icon = require('./Icon-cjs.js');
|
|
@@ -17,7 +18,6 @@ var FormField = require('./FormField-cjs.js');
|
|
|
17
18
|
var styles = {"autocomplete":"_7mObJiwfPh4-","options":"dL5JShAJlKM-","heading":"PWZL-94hH7k-","visible":"_2RzcnTdaPyc-","option":"y9zhi8Wr8QA-","active":"_3Xg49dtL1Q8-","separator":"LIeh390F3W8-","icon":"K2phy6IC3TY-","text":"a6-LbUm5WnY-","label":"tQNbuxcE9nU-","details":"qacStG9-XbE-","spinning":"P9cQDL4MZ-s-"};
|
|
18
19
|
|
|
19
20
|
const AUTOCOMPLETE_MAX_HEIGHT = 300;
|
|
20
|
-
const AUTCOMPLETE_MIN_HEIGHT = 100;
|
|
21
21
|
|
|
22
22
|
function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
23
23
|
const { refs, floatingStyles, update } = floatingUi_react.useFloating(Object.assign({ placement: "bottom", middleware: [
|
|
@@ -25,13 +25,11 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
25
25
|
floatingUi_react.flip({ fallbackPlacements: ["top"] }),
|
|
26
26
|
floatingUi_react.size({
|
|
27
27
|
apply({ availableHeight, elements }) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
? AUTOCOMPLETE_MAX_HEIGHT
|
|
32
|
-
: Math.max(AUTCOMPLETE_MIN_HEIGHT, availableHeight);
|
|
28
|
+
const maxHeight$1 = maxHeight.calculateMaxHeight(availableHeight, {
|
|
29
|
+
maxHeight: AUTOCOMPLETE_MAX_HEIGHT,
|
|
30
|
+
});
|
|
33
31
|
Object.assign(elements.floating.style, {
|
|
34
|
-
maxHeight: `${maxHeight}px`,
|
|
32
|
+
maxHeight: `${maxHeight$1}px`,
|
|
35
33
|
});
|
|
36
34
|
},
|
|
37
35
|
}),
|
|
@@ -44,7 +42,7 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
44
42
|
: {})));
|
|
45
43
|
// While DefaultMenu leverages conditional rendering, CustomMenu is hidden with CSS
|
|
46
44
|
// We need to apply the correct update method to each case
|
|
47
|
-
useSafeLayoutEffect.
|
|
45
|
+
useSafeLayoutEffect.useSafeLayoutEffect(() => {
|
|
48
46
|
if (cssManagedVisibility && visible && attachTo && refs.floating.current) {
|
|
49
47
|
const cleanup = floatingUi_react.autoUpdate(attachTo, refs.floating.current, update);
|
|
50
48
|
return cleanup;
|
|
@@ -88,7 +86,7 @@ function useAutocompleteMenu({ attachTo, }) {
|
|
|
88
86
|
return { MenuWrapper: AutocompleteMenuWrapper, menuRef };
|
|
89
87
|
}
|
|
90
88
|
function BaseAutocompleteMenuWrapper(props) {
|
|
91
|
-
const mounted = useIsMounted.
|
|
89
|
+
const mounted = useIsMounted.useIsMounted();
|
|
92
90
|
const menu = React.createElement(BaseAutocompleteMenuWrapperInternal, Object.assign({}, props));
|
|
93
91
|
return mounted.current ? React.createElement(floatingUi_react.FloatingPortal, null, menu) : menu;
|
|
94
92
|
}
|
|
@@ -162,13 +160,13 @@ exports.KeyboardAction = void 0;
|
|
|
162
160
|
* Use this hook if you are using components in the menu that aren't MenuOption or BaseMenuOption.
|
|
163
161
|
*/
|
|
164
162
|
function useCustomKeyboardNavigation({ onRequestHighlightChange, }) {
|
|
165
|
-
useOnKeyDown.
|
|
163
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
166
164
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Next);
|
|
167
165
|
}, "ArrowDown");
|
|
168
|
-
useOnKeyDown.
|
|
166
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
169
167
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Previous);
|
|
170
168
|
}, "ArrowUp");
|
|
171
|
-
useOnKeyDown.
|
|
169
|
+
useOnKeyDown.useOnKeyDown((event) => {
|
|
172
170
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, exports.KeyboardAction.Select);
|
|
173
171
|
}, "Enter");
|
|
174
172
|
}
|
|
@@ -280,7 +278,7 @@ function AutocompleteInternal(_a, ref) {
|
|
|
280
278
|
const [inputFocused, setInputFocused] = React.useState(false);
|
|
281
279
|
const [inputText, setInputText] = React.useState((_b = value === null || value === void 0 ? void 0 : value.label) !== null && _b !== void 0 ? _b : "");
|
|
282
280
|
const [autocompleteRef, setAutocompleteRef] = React.useState(null);
|
|
283
|
-
const delayedSearch = useDebounce.
|
|
281
|
+
const delayedSearch = useDebounce.useDebounce(updateSearch, debounceRate);
|
|
284
282
|
const inputRef = React.useRef(null);
|
|
285
283
|
React.useEffect(() => {
|
|
286
284
|
delayedSearch();
|
package/dist/Autocomplete-es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { _ as __rest, a as __awaiter } from './tslib.es6-es.js';
|
|
2
2
|
import React__default, { useCallback, useEffect, useState, forwardRef, useMemo, useRef } from 'react';
|
|
3
|
-
import { u as
|
|
3
|
+
import { u as useDebounce } from './useDebounce-es.js';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
5
|
+
import { u as useIsMounted } from './useIsMounted-es.js';
|
|
6
|
+
import { u as useFloating, o as offset, f as flip, s as size, c as autoUpdate, F as FloatingPortal } from './floating-ui.react-es.js';
|
|
7
|
+
import { u as useSafeLayoutEffect } from './useSafeLayoutEffect-es.js';
|
|
8
|
+
import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
8
9
|
import { H as Heading } from './Heading-es.js';
|
|
9
10
|
import { T as Text } from './Text-es.js';
|
|
10
11
|
import { I as Icon } from './Icon-es.js';
|
|
11
|
-
import { u as
|
|
12
|
+
import { u as useOnKeyDown } from './useOnKeyDown-es.js';
|
|
12
13
|
import { InputText } from './InputText/index.mjs';
|
|
13
14
|
import { m as mergeRefs } from './FormField-es.js';
|
|
14
15
|
|
|
15
16
|
var styles = {"autocomplete":"_7mObJiwfPh4-","options":"dL5JShAJlKM-","heading":"PWZL-94hH7k-","visible":"_2RzcnTdaPyc-","option":"y9zhi8Wr8QA-","active":"_3Xg49dtL1Q8-","separator":"LIeh390F3W8-","icon":"K2phy6IC3TY-","text":"a6-LbUm5WnY-","label":"tQNbuxcE9nU-","details":"qacStG9-XbE-","spinning":"P9cQDL4MZ-s-"};
|
|
16
17
|
|
|
17
18
|
const AUTOCOMPLETE_MAX_HEIGHT = 300;
|
|
18
|
-
const AUTCOMPLETE_MIN_HEIGHT = 100;
|
|
19
19
|
|
|
20
20
|
function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
21
21
|
const { refs, floatingStyles, update } = useFloating(Object.assign({ placement: "bottom", middleware: [
|
|
@@ -23,11 +23,9 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
23
23
|
flip({ fallbackPlacements: ["top"] }),
|
|
24
24
|
size({
|
|
25
25
|
apply({ availableHeight, elements }) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
? AUTOCOMPLETE_MAX_HEIGHT
|
|
30
|
-
: Math.max(AUTCOMPLETE_MIN_HEIGHT, availableHeight);
|
|
26
|
+
const maxHeight = calculateMaxHeight(availableHeight, {
|
|
27
|
+
maxHeight: AUTOCOMPLETE_MAX_HEIGHT,
|
|
28
|
+
});
|
|
31
29
|
Object.assign(elements.floating.style, {
|
|
32
30
|
maxHeight: `${maxHeight}px`,
|
|
33
31
|
});
|
|
@@ -42,7 +40,7 @@ function useRepositionMenu(attachTo, visible, cssManagedVisibility) {
|
|
|
42
40
|
: {})));
|
|
43
41
|
// While DefaultMenu leverages conditional rendering, CustomMenu is hidden with CSS
|
|
44
42
|
// We need to apply the correct update method to each case
|
|
45
|
-
|
|
43
|
+
useSafeLayoutEffect(() => {
|
|
46
44
|
if (cssManagedVisibility && visible && attachTo && refs.floating.current) {
|
|
47
45
|
const cleanup = autoUpdate(attachTo, refs.floating.current, update);
|
|
48
46
|
return cleanup;
|
|
@@ -86,7 +84,7 @@ function useAutocompleteMenu({ attachTo, }) {
|
|
|
86
84
|
return { MenuWrapper: AutocompleteMenuWrapper, menuRef };
|
|
87
85
|
}
|
|
88
86
|
function BaseAutocompleteMenuWrapper(props) {
|
|
89
|
-
const mounted =
|
|
87
|
+
const mounted = useIsMounted();
|
|
90
88
|
const menu = React__default.createElement(BaseAutocompleteMenuWrapperInternal, Object.assign({}, props));
|
|
91
89
|
return mounted.current ? React__default.createElement(FloatingPortal, null, menu) : menu;
|
|
92
90
|
}
|
|
@@ -160,13 +158,13 @@ var KeyboardAction;
|
|
|
160
158
|
* Use this hook if you are using components in the menu that aren't MenuOption or BaseMenuOption.
|
|
161
159
|
*/
|
|
162
160
|
function useCustomKeyboardNavigation({ onRequestHighlightChange, }) {
|
|
163
|
-
|
|
161
|
+
useOnKeyDown((event) => {
|
|
164
162
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Next);
|
|
165
163
|
}, "ArrowDown");
|
|
166
|
-
|
|
164
|
+
useOnKeyDown((event) => {
|
|
167
165
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Previous);
|
|
168
166
|
}, "ArrowUp");
|
|
169
|
-
|
|
167
|
+
useOnKeyDown((event) => {
|
|
170
168
|
onRequestHighlightChange === null || onRequestHighlightChange === void 0 ? void 0 : onRequestHighlightChange(event, KeyboardAction.Select);
|
|
171
169
|
}, "Enter");
|
|
172
170
|
}
|
|
@@ -278,7 +276,7 @@ function AutocompleteInternal(_a, ref) {
|
|
|
278
276
|
const [inputFocused, setInputFocused] = useState(false);
|
|
279
277
|
const [inputText, setInputText] = useState((_b = value === null || value === void 0 ? void 0 : value.label) !== null && _b !== void 0 ? _b : "");
|
|
280
278
|
const [autocompleteRef, setAutocompleteRef] = useState(null);
|
|
281
|
-
const delayedSearch =
|
|
279
|
+
const delayedSearch = useDebounce(updateSearch, debounceRate);
|
|
282
280
|
const inputRef = useRef(null);
|
|
283
281
|
useEffect(() => {
|
|
284
282
|
delayedSearch();
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { XOR } from "ts-xor";
|
|
4
|
+
import type { IconProps } from "../Icon";
|
|
4
5
|
type AvatarSize = "base" | "large" | "small";
|
|
5
6
|
interface AvatarFoundationProps {
|
|
6
7
|
/**
|
package/dist/Avatar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Avatar, AvatarProps } from "./Avatar";
|
|
1
|
+
export { Avatar, type AvatarProps } from "./Avatar";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type CSSProperties, type PropsWithChildren, type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { IconNames, tokens } from "@jobber/design";
|
|
3
3
|
import { type ButtonProps } from "../Button";
|
|
4
4
|
import { type ButtonDismissProps } from "../ButtonDismiss";
|
|
5
|
-
import { IconProps } from "../Icon";
|
|
5
|
+
import type { IconProps } from "../Icon";
|
|
6
6
|
export type BannerType = "notice" | "success" | "warning" | "error";
|
|
7
7
|
type TokensType = keyof typeof tokens;
|
|
8
8
|
type Prefixes = TokensType extends `${infer Prefix}-${string}` ? Prefix : never;
|
package/dist/Banner-cjs.js
CHANGED
|
@@ -58,7 +58,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
|
|
|
58
58
|
small: 320,
|
|
59
59
|
medium: 480,
|
|
60
60
|
};
|
|
61
|
-
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver
|
|
61
|
+
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver({
|
|
62
62
|
widths: bannerWidths,
|
|
63
63
|
});
|
|
64
64
|
const bannerClassNames = classnames(styles.banner, [styles[type]], {
|
package/dist/Banner-es.js
CHANGED
|
@@ -56,7 +56,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
|
|
|
56
56
|
small: 320,
|
|
57
57
|
medium: 480,
|
|
58
58
|
};
|
|
59
|
-
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver
|
|
59
|
+
const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver({
|
|
60
60
|
widths: bannerWidths,
|
|
61
61
|
});
|
|
62
62
|
const bannerClassNames = classnames(styles.banner, [styles[type]], {
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ButtonProps } from "./Button.types";
|
|
2
|
+
import { type ButtonProps } from "./Button.types";
|
|
3
3
|
import { ButtonIcon, ButtonLabel } from "./ButtonInternals";
|
|
4
4
|
declare function Button(props: ButtonProps): React.JSX.Element;
|
|
5
5
|
declare namespace Button {
|
|
6
6
|
var Label: typeof ButtonLabel;
|
|
7
7
|
var Icon: typeof ButtonIcon;
|
|
8
8
|
}
|
|
9
|
-
export {
|
|
9
|
+
export type { ButtonProps };
|
|
10
|
+
export { Button };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
-
import { LinkProps } from "react-router-dom";
|
|
3
|
-
import { XOR } from "ts-xor";
|
|
4
|
-
import { CSSProperties } from "react";
|
|
5
|
-
import { TypographyProps } from "../Typography/Typography";
|
|
6
|
-
import { IconProps } from "../Icon/Icon";
|
|
1
|
+
import type { IconNames } from "@jobber/design";
|
|
2
|
+
import type { LinkProps } from "react-router-dom";
|
|
3
|
+
import type { XOR } from "ts-xor";
|
|
4
|
+
import type { CSSProperties } from "react";
|
|
5
|
+
import type { TypographyProps } from "../Typography/Typography";
|
|
6
|
+
import type { IconProps } from "../Icon/Icon";
|
|
7
7
|
export type HTMLButtonType = "button" | "submit";
|
|
8
8
|
export type ButtonVariation = "work" | "learning" | "subtle" | "destructive";
|
|
9
9
|
export type ButtonSize = "small" | "base" | "large";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ButtonProps } from "./Button.types";
|
|
3
|
-
import { IconProps } from "../Icon";
|
|
4
|
-
import { TypographyProps } from "../Typography";
|
|
2
|
+
import { type ButtonProps } from "./Button.types";
|
|
3
|
+
import { type IconProps } from "../Icon";
|
|
4
|
+
import { type TypographyProps } from "../Typography";
|
|
5
5
|
/**
|
|
6
6
|
* For backwards compatibility with the legacy button
|
|
7
7
|
* @deprecated Used composed solution instead
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { ButtonSize } from "./Button.types";
|
|
3
4
|
interface ButtonContextProps {
|
|
4
5
|
size: ButtonSize;
|
|
5
6
|
}
|
package/dist/Button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Button } from "./Button";
|
|
2
|
-
export * from "./Button.types";
|
|
3
|
-
export { useButtonStyles, UseButtonStylesProps } from "./useButtonStyles";
|
|
2
|
+
export type * from "./Button.types";
|
|
3
|
+
export { useButtonStyles, type UseButtonStylesProps } from "./useButtonStyles";
|
|
4
4
|
export { useButtonContext } from "./ButtonProvider";
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CardBodyProps, CardHeaderProps, CardProps } from "./types";
|
|
2
|
+
import type { CardBodyProps, CardHeaderProps, CardProps } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* Props for a card that acts as a link.
|
|
5
5
|
* When url is provided, the card becomes clickable and navigates to the specified URL.
|
package/dist/Card/index.cjs
CHANGED
|
@@ -12,14 +12,14 @@ require('../Icon-cjs.js');
|
|
|
12
12
|
require('@jobber/design');
|
|
13
13
|
require('../Menu-cjs.js');
|
|
14
14
|
require('framer-motion');
|
|
15
|
-
require('../useOnKeyDown-cjs.js');
|
|
16
15
|
require('../useRefocusOnActivator-cjs.js');
|
|
17
|
-
require('react-
|
|
18
|
-
require('../useIsMounted-cjs.js');
|
|
19
|
-
require('../useSafeLayoutEffect-cjs.js');
|
|
16
|
+
require('../floating-ui.react-cjs.js');
|
|
20
17
|
require('react-dom');
|
|
21
18
|
require('../useFocusTrap-cjs.js');
|
|
19
|
+
require('../useIsMounted-cjs.js');
|
|
20
|
+
require('../useSafeLayoutEffect-cjs.js');
|
|
22
21
|
require('../useFormFieldFocus-cjs.js');
|
|
22
|
+
require('../maxHeight-cjs.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
package/dist/Card/index.mjs
CHANGED
|
@@ -10,11 +10,11 @@ import '../Icon-es.js';
|
|
|
10
10
|
import '@jobber/design';
|
|
11
11
|
import '../Menu-es.js';
|
|
12
12
|
import 'framer-motion';
|
|
13
|
-
import '../useOnKeyDown-es.js';
|
|
14
13
|
import '../useRefocusOnActivator-es.js';
|
|
15
|
-
import 'react-
|
|
16
|
-
import '../useIsMounted-es.js';
|
|
17
|
-
import '../useSafeLayoutEffect-es.js';
|
|
14
|
+
import '../floating-ui.react-es.js';
|
|
18
15
|
import 'react-dom';
|
|
19
16
|
import '../useFocusTrap-es.js';
|
|
17
|
+
import '../useIsMounted-es.js';
|
|
18
|
+
import '../useSafeLayoutEffect-es.js';
|
|
20
19
|
import '../useFormFieldFocus-es.js';
|
|
20
|
+
import '../maxHeight-es.js';
|
package/dist/Card/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
import colors from "./cardcolors.module.css";
|
|
3
|
-
import { ButtonProps } from "../Button";
|
|
4
|
-
import { MenuProps } from "../Menu";
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type colors from "./cardcolors.module.css";
|
|
3
|
+
import { type ButtonProps } from "../Button";
|
|
4
|
+
import { type MenuProps } from "../Menu";
|
|
5
5
|
export type ActionProps = ReactElement<Omit<ButtonProps, "size" | "fullWidth"> | MenuProps>;
|
|
6
6
|
export interface HeaderActionProps {
|
|
7
7
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CheckboxLegacyProps } from "./Checkbox.types";
|
|
2
|
+
import type { CheckboxLegacyProps } from "./Checkbox.types";
|
|
3
3
|
export declare function CheckboxLegacy({ checked, defaultChecked, disabled, label, name, value, indeterminate, description, children, onBlur, onChange, onFocus, }: CheckboxLegacyProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
import { XOR } from "ts-xor";
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { XOR } from "ts-xor";
|
|
3
3
|
export interface BaseCheckboxProps {
|
|
4
4
|
/**
|
|
5
5
|
* Determines if the checkbox is checked or not.
|
package/dist/Checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CheckboxLegacyProps, CheckboxRebuiltProps } from "./Checkbox.types";
|
|
2
|
+
import type { CheckboxLegacyProps, CheckboxRebuiltProps } from "./Checkbox.types";
|
|
3
3
|
type CheckboxShimProps = CheckboxLegacyProps | CheckboxRebuiltProps;
|
|
4
4
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxShimProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export type { CheckboxLegacyProps, CheckboxRebuiltProps };
|