From b8d79200b03d2bef7e0f2106ea1ab2bc6335bc85 Mon Sep 17 00:00:00 2001 From: Shadi Date: Wed, 20 Sep 2023 12:04:38 -0500 Subject: [PATCH] chore: remove prop-types (#3442) * chore: remove prop-types * test: update pin-external-deps danger check to display package with issue * fix: lint * fix: tests * fix: website lint * fix: more lint * fix: more lint fixed that keep popping up * chore: update changeset * chore: rebase fixes * chore: make these changes minor and remove upgrade guide notice * fix: whoopsie * chore: missing package.json files --------- Co-authored-by: Si Taggart --- .changeset/sixty-baboons-brush.md | 88 +++++++++ .../__fixtures__/mock_package_2/package.json | 6 +- .../__fixtures__/mock_package_3/package.json | 6 +- .../pin-external-deps.spec.ts.snap | 51 +++++ .danger/__tests__/pin-external-deps.spec.ts | 14 +- .danger/pin-external-deps.ts | 18 +- .vscode/component.code-snippets | 21 +- apps/vs-code-intellisense/src/test/runTest.ts | 1 - package.json | 2 - .../paste-codemods/tools/.cache/mappings.json | 18 -- .../barreled-to-unbarreled.input.ts | 4 +- .../barreled-to-unbarreled.output.ts | 2 +- .../components/account-switcher/package.json | 2 - .../account-switcher/src/AccountSwitcher.tsx | 3 +- .../src/AccountSwitcherBadge.tsx | 5 +- .../src/AccountSwitcherGroup.tsx | 3 +- .../src/AccountSwitcherItem.tsx | 3 +- .../src/AccountSwitcherItemRadio.tsx | 3 +- .../components/alert-dialog/package.json | 2 - .../alert-dialog/src/AlertDialogBody.tsx | 7 - .../alert-dialog/src/AlertDialogFooter.tsx | 10 - .../alert-dialog/src/AlertDialogHeader.tsx | 7 - .../components/alert-dialog/src/index.tsx | 13 -- .../paste-core/components/alert/package.json | 2 - .../paste-core/components/alert/src/index.tsx | 13 -- .../paste-core/components/anchor/package.json | 2 - .../components/anchor/src/Anchor.tsx | 3 - .../components/anchor/src/DefaultAnchor.tsx | 5 - .../components/anchor/src/InverseAnchor.tsx | 5 - .../components/anchor/src/proptypes.ts | 17 -- .../paste-core/components/avatar/package.json | 2 - .../components/avatar/src/Avatar.tsx | 21 -- .../components/avatar/src/AvatarGroup.tsx | 11 +- .../paste-core/components/badge/package.json | 2 - .../paste-core/components/badge/src/Badge.tsx | 3 - .../paste-core/components/badge/src/index.tsx | 1 - .../components/badge/src/propTypes.ts | 14 -- .../base-radio-checkbox/package.json | 2 - .../src/BaseRadioCheckbox.tsx | 17 -- .../components/breadcrumb/package.json | 2 - .../components/breadcrumb/src/index.tsx | 15 -- .../components/button-group/package.json | 2 - .../button-group/src/ButtonGroup.tsx | 6 - .../paste-core/components/button/package.json | 2 - .../components/button/src/Button.tsx | 3 - .../button/src/DestructiveButton.tsx | 4 - .../button/src/DestructiveIconButton.tsx | 5 +- .../button/src/DestructiveLinkButton.tsx | 4 - .../button/src/DestructiveSecondaryButton.tsx | 4 - .../components/button/src/InverseButton.tsx | 5 +- .../button/src/InverseLinkButton.tsx | 5 +- .../components/button/src/LinkButton.tsx | 5 +- .../components/button/src/PrimaryButton.tsx | 5 +- .../button/src/PrimaryIconButton.tsx | 5 +- .../components/button/src/ResetButton.tsx | 5 +- .../components/button/src/SecondaryButton.tsx | 5 +- .../button/src/SecondaryIconButton.tsx | 5 +- .../components/button/src/index.tsx | 1 - .../components/button/src/proptypes.ts | 63 ------ .../components/callout/package.json | 2 - .../components/callout/src/Callout.tsx | 11 -- .../components/callout/src/CalloutList.tsx | 10 - .../components/callout/src/CalloutText.tsx | 5 - .../paste-core/components/card/package.json | 2 - .../paste-core/components/card/src/index.tsx | 11 -- .../components/chat-composer/package.json | 2 - .../components/chat-log/package.json | 2 - .../chat-log/src/ChatAttachment.tsx | 7 - .../src/ChatAttachmentDescription.tsx | 6 - .../chat-log/src/ChatAttachmentLink.tsx | 6 - .../components/chat-log/src/ChatBookend.tsx | 6 - .../chat-log/src/ChatBookendItem.tsx | 6 - .../components/chat-log/src/ChatBubble.tsx | 6 - .../components/chat-log/src/ChatEvent.tsx | 6 - .../components/chat-log/src/ChatLog.tsx | 6 - .../components/chat-log/src/ChatMessage.tsx | 7 - .../chat-log/src/ChatMessageMeta.tsx | 7 - .../chat-log/src/ChatMessageMetaItem.tsx | 6 - .../chat-log/src/ComposerAttachmentCard.tsx | 8 - .../components/checkbox/package.json | 2 - .../components/checkbox/src/Checkbox.tsx | 16 -- .../checkbox/src/CheckboxDisclaimer.tsx | 7 - .../components/checkbox/src/CheckboxGroup.tsx | 15 -- .../components/code-block/package.json | 2 - .../components/code-block/src/CodeBlock.tsx | 30 --- .../code-block/src/CodeBlockTab.tsx | 6 - .../code-block/src/CodeBlockTabList.tsx | 6 - .../code-block/src/CodeBlockTabPanel.tsx | 6 - .../code-block/src/CodeBlockWrapper.tsx | 6 - .../components/combobox/package.json | 2 - .../combobox/src/singleselect/Combobox.tsx | 19 -- .../src/styles/ComboboxInputWrapper.tsx | 7 - .../combobox/src/styles/ComboboxListbox.tsx | 6 - .../src/styles/ComboboxListboxGroup.tsx | 7 - .../components/data-grid/package.json | 2 - .../components/data-grid/src/DataGrid.tsx | 5 - .../components/data-grid/src/DataGridBody.tsx | 4 - .../components/data-grid/src/DataGridCell.tsx | 6 - .../components/data-grid/src/DataGridFoot.tsx | 4 - .../components/data-grid/src/DataGridHead.tsx | 4 - .../data-grid/src/DataGridHeader.tsx | 5 - .../data-grid/src/DataGridHeaderSort.tsx | 6 - .../components/data-grid/src/DataGridRow.tsx | 5 - .../components/data-grid/src/table/Td.tsx | 6 - .../components/data-grid/src/table/Th.tsx | 6 - .../components/data-grid/src/table/Tr.tsx | 8 - .../stories/components/PaginatedDataGrid.tsx | 13 +- .../components/date-picker/package.json | 2 - .../components/date-picker/src/DatePicker.tsx | 16 -- .../components/description-list/package.json | 2 - .../description-list/src/DescriptionList.tsx | 6 - .../src/DescriptionListDetails.tsx | 6 - .../src/DescriptionListSet.tsx | 6 - .../src/DescriptionListTerm.tsx | 6 - .../components/detail-text/package.json | 2 - .../components/detail-text/src/index.tsx | 8 - .../components/disclosure/package.json | 2 - .../components/disclosure/src/Disclosure.tsx | 6 - .../disclosure/src/DisclosureContent.tsx | 5 - .../disclosure/src/DisclosureHeading.tsx | 3 +- .../components/display-heading/package.json | 2 - .../components/display-heading/src/index.tsx | 10 - .../display-heading/stories/index.stories.tsx | 2 +- .../display-pill-group/package.json | 2 - .../editable-code-block/package.json | 2 - .../src/EditableCodeBlockWrapper.tsx | 6 - .../components/file-picker/package.json | 2 - .../components/file-picker/src/FilePicker.tsx | 12 -- .../file-picker/src/FilePickerButton.tsx | 7 - .../components/file-uploader/package.json | 2 - .../file-uploader/src/FileUploader.tsx | 10 - .../src/FileUploaderDropzone.tsx | 14 -- .../src/FileUploaderDropzoneText.tsx | 6 - .../src/FileUploaderErrorText.tsx | 6 - .../src/FileUploaderHelpText.tsx | 6 - .../file-uploader/src/FileUploaderItem.tsx | 12 -- .../src/FileUploaderItemDescription.tsx | 6 - .../src/FileUploaderItemTitle.tsx | 6 - .../src/FileUploaderItemsList.tsx | 6 - .../file-uploader/src/FileUploaderLabel.tsx | 6 - .../components/form-pill-group/package.json | 2 - .../paste-core/components/form/package.json | 2 - .../paste-core/components/form/src/Form.tsx | 8 - .../components/form/src/FormActions.tsx | 6 - .../components/form/src/FormControl.tsx | 6 - .../form/src/FormControlTwoColumn.tsx | 6 - .../components/form/src/FormSection.tsx | 6 - .../form/src/FormSectionDescription.tsx | 6 - .../form/src/FormSectionHeading.tsx | 7 - .../components/heading/package.json | 2 - .../components/heading/src/PropTypes.ts | 18 -- .../components/heading/src/index.tsx | 5 +- .../components/help-text/package.json | 2 - .../components/help-text/src/HelpText.tsx | 6 - .../in-page-navigation/package.json | 2 - .../src/InPageNavigation.tsx | 8 - .../src/InPageNavigationItem.tsx | 8 - .../components/inline-code/package.json | 2 - .../components/inline-code/src/index.tsx | 7 - .../inline-control-group/package.json | 2 - .../components/input-box/package.json | 2 - .../src/FauxInput/DefaultFauxInput.tsx | 3 - .../src/FauxInput/InverseFauxInput.tsx | 3 - .../input-box/src/FauxInput/index.tsx | 3 - .../components/input-box/src/InputBox.tsx | 15 -- .../input-box/src/InputChevronWrapper.tsx | 6 - .../components/input-box/src/Prefix.tsx | 8 - .../components/input-box/src/Suffix.tsx | 8 - .../components/input-box/src/types.ts | 13 -- .../components/input/__tests__/input.test.tsx | 18 +- .../paste-core/components/input/package.json | 2 - .../paste-core/components/label/package.json | 2 - .../paste-core/components/label/src/Label.tsx | 13 -- .../components/label/src/RequiredDot.tsx | 5 - .../components/list/__tests__/index.spec.tsx | 4 +- .../paste-core/components/list/package.json | 2 - .../paste-core/components/list/src/List.tsx | 11 +- .../components/list/src/ListItem.tsx | 5 - .../components/list/src/OrderedList.tsx | 8 - .../components/list/src/UnorderedList.tsx | 8 - .../paste-core/components/menu/package.json | 2 - .../paste-core/components/menu/src/Menu.tsx | 9 +- .../components/menu/src/MenuBadge.tsx | 12 +- .../components/menu/src/MenuButton.tsx | 5 +- .../components/menu/src/MenuGroup.tsx | 8 - .../components/menu/src/MenuItem.tsx | 12 +- .../components/menu/src/MenuItemCheckbox.tsx | 14 -- .../components/menu/src/MenuItemRadio.tsx | 14 -- .../paste-core/components/meter/package.json | 2 - .../minimizable-dialog/package.json | 2 - .../src/MinimizableDialog.tsx | 7 - .../src/MinimizableDialogButton.tsx | 8 - .../src/MinimizableDialogContent.tsx | 6 - .../src/MinimizableDialogHeader.tsx | 8 - .../paste-core/components/modal/package.json | 2 - .../paste-core/components/modal/src/Modal.tsx | 12 -- .../components/modal/src/ModalBody.tsx | 6 - .../components/modal/src/ModalFooter.tsx | 6 - .../modal/src/ModalFooterActions.tsx | 7 - .../components/modal/src/ModalHeader.tsx | 6 - .../components/modal/src/ModalHeading.tsx | 7 - .../components/pagination/package.json | 2 - .../components/pagination/src/Pagination.tsx | 3 - .../PaginationArrow/PaginationArrowButton.tsx | 3 - .../PaginationArrowIconWrapper.tsx | 3 - .../PaginationArrow/PaginationBackArrow.tsx | 3 - .../PaginationForwardArrow.tsx | 3 - .../pagination/src/PaginationArrow/index.tsx | 3 - .../pagination/src/PaginationEllipsis.tsx | 3 - .../pagination/src/PaginationItems.tsx | 3 - .../pagination/src/PaginationLabel.tsx | 3 - .../pagination/src/PaginationNumber.tsx | 3 - .../pagination/src/PaginationNumbers.tsx | 3 - .../components/pagination/src/proptypes.ts | 63 ------ .../components/paragraph/package.json | 2 - .../components/paragraph/src/index.tsx | 6 - .../components/popover/package.json | 2 - .../components/popover/src/Popover.tsx | 10 - .../popover/src/PopoverBadgeButton.tsx | 7 - .../components/popover/src/PopoverButton.tsx | 8 - .../components/product-switcher/package.json | 2 - .../product-switcher/src/ProductSwitcher.tsx | 3 +- .../src/ProductSwitcherButton.tsx | 5 +- .../src/ProductSwitcherItem.tsx | 3 +- .../ProductSwitcher.customization.stories.tsx | 20 +- .../stories/ProductSwitcher.stories.tsx | 10 +- .../components/progress-bar/package.json | 2 - .../components/progress-steps/package.json | 2 - .../src/ProgressStepComplete.tsx | 3 - .../src/ProgressStepCurrent.tsx | 3 - .../progress-steps/src/ProgressStepError.tsx | 3 - .../src/ProgressStepIncomplete.tsx | 7 - .../src/ProgressStepSeparator.tsx | 5 - .../progress-steps/src/ProgressSteps.tsx | 6 - .../progress-steps/src/propTypes.ts | 9 - .../radio-button-group/package.json | 2 - .../radio-button-group/src/RadioButton.tsx | 13 -- .../src/RadioButtonGroup.tsx | 9 - .../components/radio-group/package.json | 2 - .../components/radio-group/src/Radio.tsx | 16 -- .../components/radio-group/src/RadioGroup.tsx | 9 - .../screen-reader-only/package.json | 2 - .../screen-reader-only/src/index.tsx | 8 - .../paste-core/components/select/package.json | 2 - .../components/select/src/Option.tsx | 9 - .../components/select/src/OptionGroup.tsx | 9 - .../components/select/src/Select.tsx | 10 - .../components/separator/package.json | 2 - .../components/separator/src/index.tsx | 10 +- .../components/side-modal/package.json | 2 - .../components/side-modal/src/SideModal.tsx | 7 - .../side-modal/src/SideModalBody.tsx | 6 - .../side-modal/src/SideModalButton.tsx | 7 - .../side-modal/src/SideModalFooter.tsx | 6 - .../side-modal/src/SideModalFooterActions.tsx | 7 - .../side-modal/src/SideModalHeader.tsx | 7 - .../side-modal/src/SideModalHeading.tsx | 7 - .../components/sidebar/package.json | 2 - .../components/sidebar/src/Sidebar.tsx | 13 -- .../sidebar/src/SidebarBetaBadge.tsx | 8 - .../components/sidebar/src/SidebarBody.tsx | 5 - .../src/footer/SidebarCollapseButton.tsx | 8 - .../sidebar/src/header/SidebarHeader.tsx | 6 - .../src/header/SidebarHeaderIconButton.tsx | 7 - .../sidebar/src/header/SidebarHeaderLabel.tsx | 6 - .../src/navigation/SidebarNavigation.tsx | 7 - .../SidebarNavigationDisclosure.tsx | 5 - .../SidebarNavigationDisclosureContent.tsx | 5 - .../SidebarNavigationDisclosureHeading.tsx | 7 - ...ebarNavigationDisclosureHeadingWrapper.tsx | 5 - .../src/navigation/SidebarNavigationItem.tsx | 6 - .../navigation/SidebarNavigationSeparator.tsx | 5 - .../components/skeleton-loader/package.json | 2 - .../paste-core/components/slider/package.json | 2 - .../components/spinner/package.json | 2 - .../components/spinner/src/index.tsx | 9 - .../paste-core/components/status/package.json | 2 - .../components/status/src/StatusBadge.tsx | 8 +- .../components/status/src/StatusMenuBadge.tsx | 9 +- .../status/src/StatusMenuItemChild.tsx | 6 - .../paste-core/components/switch/package.json | 2 - .../components/switch/src/Switch.tsx | 14 -- .../components/switch/src/SwitchGroup.tsx | 14 -- .../components/switch/src/SwitchKnob.tsx | 10 - .../paste-core/components/table/package.json | 2 - .../paste-core/components/table/src/TBody.tsx | 2 - .../paste-core/components/table/src/TFoot.tsx | 2 - .../paste-core/components/table/src/THead.tsx | 2 - .../paste-core/components/table/src/Table.tsx | 2 - .../paste-core/components/table/src/Td.tsx | 2 - .../paste-core/components/table/src/Th.tsx | 2 - .../paste-core/components/table/src/Tr.tsx | 2 - .../paste-core/components/table/src/index.tsx | 1 - .../components/table/src/proptypes.ts | 43 ----- .../paste-core/components/tabs/package.json | 2 - .../paste-core/components/tabs/src/Tab.tsx | 7 - .../components/tabs/src/TabList.tsx | 8 - .../components/tabs/src/TabPanel.tsx | 9 - .../components/tabs/src/TabPanels.tsx | 7 - .../paste-core/components/tabs/src/Tabs.tsx | 8 - .../components/tabs/stories/index.stories.tsx | 16 -- .../components/textarea/package.json | 2 - .../components/textarea/src/TextArea.tsx | 15 -- .../components/time-picker/package.json | 2 - .../components/time-picker/src/TimePicker.tsx | 16 -- .../paste-core/components/toast/package.json | 2 - .../components/toast/src/ErrorToast.tsx | 3 - .../components/toast/src/NeutralToast.tsx | 3 - .../components/toast/src/SuccessToast.tsx | 3 - .../paste-core/components/toast/src/Toast.tsx | 3 - .../components/toast/src/ToastContainer.tsx | 3 - .../components/toast/src/ToastPortal.tsx | 5 - .../components/toast/src/Toaster.tsx | 3 - .../components/toast/src/WarningToast.tsx | 3 - .../components/toast/src/propTypes.ts | 35 ---- .../components/tooltip/package.json | 2 - .../components/tooltip/src/index.tsx | 9 - .../paste-core/components/topbar/package.json | 2 - .../components/topbar/src/Topbar.tsx | 7 - .../components/topbar/src/TopbarActions.tsx | 7 - .../components/truncate/package.json | 2 - .../components/truncate/src/index.tsx | 6 - .../components/user-dialog/package.json | 2 - .../components/user-dialog/src/UserDialog.tsx | 7 - .../user-dialog/src/UserDialogContainer.tsx | 10 - .../user-dialog/src/UserDialogList.tsx | 5 - .../user-dialog/src/UserDialogListItem.tsx | 5 - .../user-dialog/src/UserDialogSeparator.tsx | 5 - .../user-dialog/src/UserDialogUserEmail.tsx | 6 - .../user-dialog/src/UserDialogUserInfo.tsx | 6 - .../user-dialog/src/UserDialogUserName.tsx | 6 - .../components/visual-picker/package.json | 2 - packages/paste-core/core-bundle/package.json | 2 - .../layout/aspect-ratio/package.json | 2 - .../layout/aspect-ratio/src/index.tsx | 8 - packages/paste-core/layout/flex/package.json | 2 - packages/paste-core/layout/flex/src/index.tsx | 46 ----- packages/paste-core/layout/grid/package.json | 2 - .../paste-core/layout/grid/src/Column.tsx | 9 - packages/paste-core/layout/grid/src/Grid.tsx | 10 - .../layout/media-object/package.json | 2 - .../layout/media-object/src/MediaBody.tsx | 5 - .../layout/media-object/src/MediaFigure.tsx | 8 - .../layout/media-object/src/MediaObject.tsx | 6 - packages/paste-core/layout/stack/package.json | 2 - .../paste-core/layout/stack/src/index.tsx | 8 - .../box/__fixtures__/CustomizableBox.tsx | 1 - .../paste-core/primitives/box/package.json | 2 - .../primitives/combobox/package.json | 2 - .../primitives/disclosure/package.json | 2 - .../primitives/sibling-box/package.json | 2 - .../primitives/sibling-box/src/index.tsx | 5 - .../text/__fixtures__/CustomizableText.tsx | 1 - .../paste-core/primitives/text/package.json | 2 - packages/paste-customization/package.json | 2 - packages/paste-icons/package.json | 2 - .../__tests__/propValidator.test.ts | 26 --- .../__tests__/responsivePropValidator.test.ts | 59 ------ packages/paste-style-props/package.json | 2 - packages/paste-style-props/src/index.ts | 2 - .../src/proptypes/background.ts | 8 - .../paste-style-props/src/proptypes/border.ts | 12 -- .../src/proptypes/helpers.ts | 3 - .../paste-style-props/src/proptypes/index.ts | 23 --- .../paste-style-props/src/proptypes/layout.ts | 16 -- .../src/proptypes/position.ts | 8 - .../paste-style-props/src/proptypes/shadow.ts | 8 - .../paste-style-props/src/proptypes/space.ts | 12 -- .../src/proptypes/typography.ts | 16 -- .../src/proptypes/utils/propValidator.ts | 27 --- .../utils/responsivePropValidator.ts | 6 - .../paste-token-contrast-checker/package.json | 1 - packages/paste-website/package.json | 1 - .../src/pages/core/upgrade-guide.mdx | 14 +- .../manual-installation/index.mdx | 8 +- templates/paste-nextjs-template/package.json | 1 - tools/build/__tests__/compiledImports.test.ts | 2 - tools/plop-templates/component-component.hbs | 1 - tools/plop-templates/package.hbs | 2 - yarn.lock | 180 ------------------ 380 files changed, 242 insertions(+), 2669 deletions(-) create mode 100644 .changeset/sixty-baboons-brush.md create mode 100644 .danger/__tests__/__snapshots__/pin-external-deps.spec.ts.snap delete mode 100644 packages/paste-core/components/anchor/src/proptypes.ts delete mode 100644 packages/paste-core/components/badge/src/propTypes.ts delete mode 100644 packages/paste-core/components/button/src/proptypes.ts delete mode 100644 packages/paste-core/components/heading/src/PropTypes.ts delete mode 100644 packages/paste-core/components/pagination/src/proptypes.ts delete mode 100644 packages/paste-core/components/progress-steps/src/propTypes.ts delete mode 100644 packages/paste-core/components/table/src/proptypes.ts delete mode 100644 packages/paste-core/components/toast/src/propTypes.ts delete mode 100644 packages/paste-style-props/__tests__/propValidator.test.ts delete mode 100644 packages/paste-style-props/__tests__/responsivePropValidator.test.ts delete mode 100644 packages/paste-style-props/src/proptypes/background.ts delete mode 100644 packages/paste-style-props/src/proptypes/border.ts delete mode 100644 packages/paste-style-props/src/proptypes/helpers.ts delete mode 100644 packages/paste-style-props/src/proptypes/index.ts delete mode 100644 packages/paste-style-props/src/proptypes/layout.ts delete mode 100644 packages/paste-style-props/src/proptypes/position.ts delete mode 100644 packages/paste-style-props/src/proptypes/shadow.ts delete mode 100644 packages/paste-style-props/src/proptypes/space.ts delete mode 100644 packages/paste-style-props/src/proptypes/typography.ts delete mode 100644 packages/paste-style-props/src/proptypes/utils/propValidator.ts delete mode 100644 packages/paste-style-props/src/proptypes/utils/responsivePropValidator.ts diff --git a/.changeset/sixty-baboons-brush.md b/.changeset/sixty-baboons-brush.md new file mode 100644 index 0000000000..857ddb4912 --- /dev/null +++ b/.changeset/sixty-baboons-brush.md @@ -0,0 +1,88 @@ +--- +'@twilio-paste/codemods': patch +'@twilio-paste/account-switcher': minor +'@twilio-paste/alert': minor +'@twilio-paste/alert-dialog': minor +'@twilio-paste/anchor': minor +'@twilio-paste/avatar': minor +'@twilio-paste/badge': minor +'@twilio-paste/base-radio-checkbox': minor +'@twilio-paste/breadcrumb': minor +'@twilio-paste/button': minor +'@twilio-paste/button-group': minor +'@twilio-paste/callout': minor +'@twilio-paste/card': minor +'@twilio-paste/chat-composer': minor +'@twilio-paste/chat-log': minor +'@twilio-paste/checkbox': minor +'@twilio-paste/code-block': minor +'@twilio-paste/combobox': minor +'@twilio-paste/data-grid': minor +'@twilio-paste/date-picker': minor +'@twilio-paste/description-list': minor +'@twilio-paste/detail-text': minor +'@twilio-paste/disclosure': minor +'@twilio-paste/display-heading': minor +'@twilio-paste/editable-code-block': minor +'@twilio-paste/file-picker': minor +'@twilio-paste/file-uploader': minor +'@twilio-paste/form': minor +'@twilio-paste/heading': minor +'@twilio-paste/help-text': minor +'@twilio-paste/in-page-navigation': minor +'@twilio-paste/inline-code': minor +'@twilio-paste/input': minor +'@twilio-paste/input-box': minor +'@twilio-paste/label': minor +'@twilio-paste/list': minor +'@twilio-paste/menu': minor +'@twilio-paste/minimizable-dialog': minor +'@twilio-paste/modal': minor +'@twilio-paste/pagination': minor +'@twilio-paste/paragraph': minor +'@twilio-paste/popover': minor +'@twilio-paste/product-switcher': minor +'@twilio-paste/progress-steps': minor +'@twilio-paste/radio-button-group': minor +'@twilio-paste/radio-group': minor +'@twilio-paste/screen-reader-only': minor +'@twilio-paste/select': minor +'@twilio-paste/separator': minor +'@twilio-paste/side-modal': minor +'@twilio-paste/sidebar': minor +'@twilio-paste/skeleton-loader': minor +'@twilio-paste/spinner': minor +'@twilio-paste/status': minor +'@twilio-paste/switch': minor +'@twilio-paste/table': minor +'@twilio-paste/tabs': minor +'@twilio-paste/textarea': minor +'@twilio-paste/time-picker': minor +'@twilio-paste/toast': minor +'@twilio-paste/tooltip': minor +'@twilio-paste/topbar': minor +'@twilio-paste/truncate': minor +'@twilio-paste/user-dialog': minor +'@twilio-paste/core': minor +'@twilio-paste/aspect-ratio': minor +'@twilio-paste/flex': minor +'@twilio-paste/grid': minor +'@twilio-paste/media-object': minor +'@twilio-paste/stack': minor +'@twilio-paste/box': minor +'@twilio-paste/combobox-primitive': minor +'@twilio-paste/disclosure-primitive': minor +'@twilio-paste/sibling-box': minor +'@twilio-paste/text': minor +'@twilio-paste/customization': minor +'@twilio-paste/design-tokens': minor +'@twilio-paste/lexical-library': minor +'@twilio-paste/react-spectrum-library': minor +'@twilio-paste/nextjs-template': minor +'@twilio-paste/style-props': minor +'@twilio-paste/token-contrast-checker': minor +--- + +Removed all run-time [prop-type checking](https://www.npmjs.com/package/prop-types)from Paste components. Paste now ships with only TypeScript types. + +**ACTION NEEDED**: None. This should be 100% backwards compatible. diff --git a/.danger/__fixtures__/mock_package_2/package.json b/.danger/__fixtures__/mock_package_2/package.json index 0cd826268c..d0fea931ff 100644 --- a/.danger/__fixtures__/mock_package_2/package.json +++ b/.danger/__fixtures__/mock_package_2/package.json @@ -8,13 +8,11 @@ "peerDependencies": { "@twilio-paste/design-tokens": "^8.0.0", "@twilio-paste/styling-library": "^1.0.0", - "@twilio-paste/theme": "^8.0.0", - "prop-types": "^15.7.2" + "@twilio-paste/theme": "^8.0.0" }, "devDependencies": { "@twilio-paste/design-tokens": "^8.0.0", "@twilio-paste/styling-library": "^1.0.2", - "@twilio-paste/theme": "^8.0.0", - "prop-types": "^15.7.2" + "@twilio-paste/theme": "^8.0.0" } } diff --git a/.danger/__fixtures__/mock_package_3/package.json b/.danger/__fixtures__/mock_package_3/package.json index a939330414..e7237c79ff 100644 --- a/.danger/__fixtures__/mock_package_3/package.json +++ b/.danger/__fixtures__/mock_package_3/package.json @@ -8,13 +8,11 @@ "peerDependencies": { "@twilio-paste/design-tokens": "^8.0.0", "@twilio-paste/styling-library": "^1.0.0", - "@twilio-paste/theme": "^8.0.0", - "prop-types": "^15.7.2" + "@twilio-paste/theme": "^8.0.0" }, "devDependencies": { "@twilio-paste/design-tokens": "^8.0.0", "@twilio-paste/styling-library": "^1.0.2", - "@twilio-paste/theme": "^8.0.0", - "prop-types": "^15.7.2" + "@twilio-paste/theme": "^8.0.0" } } diff --git a/.danger/__tests__/__snapshots__/pin-external-deps.spec.ts.snap b/.danger/__tests__/__snapshots__/pin-external-deps.spec.ts.snap new file mode 100644 index 0000000000..82a2b26d9c --- /dev/null +++ b/.danger/__tests__/__snapshots__/pin-external-deps.spec.ts.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`pin external dependencies check getUnPinnedExternalDepsFromPackageJSONFiles() should return an array of all the unpinned external deps across every provided package.json file 1`] = ` +Array [ + Object { + "dep": "lodash", + "name": "mock-package", + }, +] +`; + +exports[`pin external dependencies check getUnPinnedExternalDepsFromPackageJSONFiles() should return an array of all the unpinned external deps across every provided package.json file 2`] = ` +Array [ + Object { + "dep": "csstype", + "name": "mock-package-2", + }, + Object { + "dep": "lodash", + "name": "mock-package-2", + }, +] +`; + +exports[`pin external dependencies check getUnPinnedExternalDepsFromPackageJSONFiles() should return an array of all the unpinned external deps across every provided package.json file 3`] = `Array []`; + +exports[`pin external dependencies check getUnPinnedExternalDepsFromPackageJSONFiles() should return an array of all the unpinned external deps across every provided package.json file 4`] = ` +Array [ + Object { + "dep": "lodash", + "name": "mock-package", + }, +] +`; + +exports[`pin external dependencies check getUnPinnedExternalDepsFromPackageJSONFiles() should return an array of all the unpinned external deps across every provided package.json file 5`] = ` +Array [ + Object { + "dep": "lodash", + "name": "mock-package", + }, + Object { + "dep": "csstype", + "name": "mock-package-2", + }, + Object { + "dep": "lodash", + "name": "mock-package-2", + }, +] +`; diff --git a/.danger/__tests__/pin-external-deps.spec.ts b/.danger/__tests__/pin-external-deps.spec.ts index bda8bba250..6cb93a0848 100644 --- a/.danger/__tests__/pin-external-deps.spec.ts +++ b/.danger/__tests__/pin-external-deps.spec.ts @@ -16,24 +16,24 @@ describe('pin external dependencies check', () => { }); describe('getUnPinnedExternalDepsFromPackageJSONFiles()', () => { it('should return an array of all the unpinned external deps across every provided package.json file', () => { - expect(getUnPinnedExternalDepsFromPackageJSONFiles(['./.danger/__fixtures__/mock_package/package.json'])).toEqual( - ['lodash'] - ); + expect( + getUnPinnedExternalDepsFromPackageJSONFiles(['./.danger/__fixtures__/mock_package/package.json']) + ).toMatchSnapshot(); expect( getUnPinnedExternalDepsFromPackageJSONFiles(['./.danger/__fixtures__/mock_package_2/package.json']) - ).toEqual(['csstype', 'lodash']); + ).toMatchSnapshot(); expect( getUnPinnedExternalDepsFromPackageJSONFiles(['./.danger/__fixtures__/mock_package_3/package.json']) - ).toEqual([]); + ).toMatchSnapshot(); expect( getUnPinnedExternalDepsFromPackageJSONFiles([ './.danger/__fixtures__/mock_package/package.json', './.danger/__fixtures__/mock_package_3/package.json', ]) - ).toEqual(['lodash']); + ).toMatchSnapshot(); expect( getUnPinnedExternalDepsFromPackageJSONFiles([ @@ -41,7 +41,7 @@ describe('pin external dependencies check', () => { './.danger/__fixtures__/mock_package_2/package.json', './.danger/__fixtures__/mock_package_3/package.json', ]) - ).toEqual(['lodash', 'csstype', 'lodash']); + ).toMatchSnapshot(); }); }); diff --git a/.danger/pin-external-deps.ts b/.danger/pin-external-deps.ts index 09706df901..72717eb239 100644 --- a/.danger/pin-external-deps.ts +++ b/.danger/pin-external-deps.ts @@ -33,12 +33,14 @@ export const getUnpinnedExternalDeps = (deps: Record): string[] * @param {string[]} pkgJSONFiles * @return {*} {string[]} */ -export const getUnPinnedExternalDepsFromPackageJSONFiles = (pkgJSONFiles: string[]): string[] => { - const unPinnedExternalDeps: string[] = []; +export const getUnPinnedExternalDepsFromPackageJSONFiles = ( + pkgJSONFiles: string[] +): Array<{dep: string; name: string}> => { + const unPinnedExternalDeps: Array<{dep: string; name: string}> = []; pkgJSONFiles.forEach((pkgJSON) => { const fileContent = fs.readFileSync(pkgJSON).toString(); - const {dependencies} = JSON.parse(fileContent); - getUnpinnedExternalDeps(dependencies).forEach((dep) => unPinnedExternalDeps.push(dep)); + const {name, dependencies} = JSON.parse(fileContent); + getUnpinnedExternalDeps(dependencies).forEach((dep) => unPinnedExternalDeps.push({dep, name})); }); return unPinnedExternalDeps; }; @@ -57,10 +59,12 @@ export default () => { const unpinnedExternalDeps = getUnPinnedExternalDepsFromPackageJSONFiles(packageJSONsChanged); if (unpinnedExternalDeps.length > 0) { + let locationString = ``; + unpinnedExternalDeps.forEach(({dep, name}) => { + locationString += `* ${name} - ${dep}\n`; + }); fail( - `There are some package.json files in this PR that contain unpinned external package libraries. Please pin your external package libraries by removing the ^ from the beginning of the version number. See: ${JSON.stringify( - unpinnedExternalDeps - )}` + `There are some package.json files in this PR that contain unpinned external package libraries. Please pin your external package libraries by removing the ^ from the beginning of the version number. See:\n\n${locationString}` ); } } diff --git a/.vscode/component.code-snippets b/.vscode/component.code-snippets index 45619c4e1f..68eef7ff75 100644 --- a/.vscode/component.code-snippets +++ b/.vscode/component.code-snippets @@ -22,14 +22,7 @@ }, "Paste React component with props file outline": { "prefix": "prindexp", - "body": [ - "import * as React from 'react';", - "import PropTypes from 'prop-types';", - "import {Box} from '@twilio-paste/box';", - "", - "${1:prfcp}", - "" - ], + "body": ["import * as React from 'react';", "import {Box} from '@twilio-paste/box';", "", "${1:prfcp}", ""], "description": "Create an component with props file starter" }, "Paste React Function Component With Props": { @@ -47,10 +40,6 @@ "", "${1:ComponentName}.displayName = '${1:ComponentName}';", "", - "${1:ComponentName}.propTypes = {", - " children: PropTypes.node.isRequired,", - "};", - "", "export {${1:ComponentName}};" ], "description": "Create a React component" @@ -70,10 +59,6 @@ "", "${1:ComponentName}.displayName = '${1:ComponentName}';", "", - "${1:ComponentName}.propTypes = {", - " children: PropTypes.node.isRequired,", - "};", - "", "export {${1:ComponentName}};" ], "description": "Create a React component" @@ -113,10 +98,6 @@ "", "Styled${1:ComponentName}.displayName = 'Styled${1:ComponentName}';", "", - "Styled${1:ComponentName}.propTypes = {", - " children: PropTypes.node.isRequired,", - "};", - "", "export {Styled${1:ComponentName}};" ], "description": "Create a Styled component" diff --git a/apps/vs-code-intellisense/src/test/runTest.ts b/apps/vs-code-intellisense/src/test/runTest.ts index 72d2dcbbf1..78330f7c30 100644 --- a/apps/vs-code-intellisense/src/test/runTest.ts +++ b/apps/vs-code-intellisense/src/test/runTest.ts @@ -1,5 +1,4 @@ import * as path from 'path'; - import {runTests} from '@vscode/test-electron'; async function main() { diff --git a/package.json b/package.json index cce76543af..cf3ba30b3d 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,6 @@ "@types/color": "^3.0.0", "@types/jest": "^24.0.18", "@types/node": "^18.11.13", - "@types/prop-types": "^15.7.5", "@types/react": "^18.0.27", "@types/react-color": "^3.0.6", "@types/react-github-button": "^0.1.1", @@ -192,7 +191,6 @@ "plop": "^2.7.4", "precise-commits": "^1.0.2", "prettier": "^2.8.1", - "prop-types": "^15.7.2", "puppeteer-core": "^19.6.1", "react": "^18.0.0", "react-dom": "^18.0.0", diff --git a/packages/paste-codemods/tools/.cache/mappings.json b/packages/paste-codemods/tools/.cache/mappings.json index 9bd7d6fcca..7c73ec1548 100644 --- a/packages/paste-codemods/tools/.cache/mappings.json +++ b/packages/paste-codemods/tools/.cache/mappings.json @@ -18,7 +18,6 @@ "Avatar": "@twilio-paste/core/avatar", "AvatarGroup": "@twilio-paste/core/avatar", "Badge": "@twilio-paste/core/badge", - "BadgePropTypes": "@twilio-paste/core/badge", "BadgeVariants": "@twilio-paste/core/badge", "badgeAnchorStyles": "@twilio-paste/core/badge", "badgeBaseStyles": "@twilio-paste/core/badge", @@ -33,10 +32,8 @@ "Breadcrumb": "@twilio-paste/core/breadcrumb", "BreadcrumbItem": "@twilio-paste/core/breadcrumb", "Button": "@twilio-paste/core/button", - "ButtonPropTypes": "@twilio-paste/core/button", "ButtonToggleStyles": "@twilio-paste/core/button", "DestructiveSecondaryButtonToggleStyles": "@twilio-paste/core/button", - "DirectButtonPropTypes": "@twilio-paste/core/button", "ButtonGroup": "@twilio-paste/core/button-group", "Callout": "@twilio-paste/core/callout", "CalloutHeading": "@twilio-paste/core/callout", @@ -128,7 +125,6 @@ "FormPillGroup": "@twilio-paste/core/form-pill-group", "useFormPillState": "@twilio-paste/core/form-pill-group", "Heading": "@twilio-paste/core/heading", - "HeadingPropTypes": "@twilio-paste/core/heading", "HelpText": "@twilio-paste/core/help-text", "HelpTextVariants": "@twilio-paste/core/help-text", "InPageNavigation": "@twilio-paste/core/in-page-navigation", @@ -151,19 +147,12 @@ "Menu": "@twilio-paste/core/menu", "MenuBadge": "@twilio-paste/core/menu", "MenuBadgeContent": "@twilio-paste/core/menu", - "MenuBadgePropTypes": "@twilio-paste/core/menu", "MenuButton": "@twilio-paste/core/menu", - "MenuButtonPropTypes": "@twilio-paste/core/menu", "MenuGroup": "@twilio-paste/core/menu", "MenuGroupContext": "@twilio-paste/core/menu", - "MenuGroupPropTypes": "@twilio-paste/core/menu", "MenuItem": "@twilio-paste/core/menu", "MenuItemCheckbox": "@twilio-paste/core/menu", - "MenuItemCheckboxPropTypes": "@twilio-paste/core/menu", - "MenuItemPropTypes": "@twilio-paste/core/menu", "MenuItemRadio": "@twilio-paste/core/menu", - "MenuItemRadioPropTypes": "@twilio-paste/core/menu", - "MenuPropTypes": "@twilio-paste/core/menu", "MenuSeparator": "@twilio-paste/core/menu", "StyledMenuItem": "@twilio-paste/core/menu", "SubMenuButton": "@twilio-paste/core/menu", @@ -270,19 +259,12 @@ "Switch": "@twilio-paste/core/switch", "SwitchGroup": "@twilio-paste/core/switch", "TBody": "@twilio-paste/core/table", - "TBodyPropTypes": "@twilio-paste/core/table", "TFoot": "@twilio-paste/core/table", - "TFootPropTypes": "@twilio-paste/core/table", "THead": "@twilio-paste/core/table", - "THeadPropTypes": "@twilio-paste/core/table", "Table": "@twilio-paste/core/table", - "TablePropTypes": "@twilio-paste/core/table", "Td": "@twilio-paste/core/table", - "TdPropTypes": "@twilio-paste/core/table", "Th": "@twilio-paste/core/table", - "ThPropTypes": "@twilio-paste/core/table", "Tr": "@twilio-paste/core/table", - "TrPropTypes": "@twilio-paste/core/table", "Tab": "@twilio-paste/core/tabs", "TabList": "@twilio-paste/core/tabs", "TabPanel": "@twilio-paste/core/tabs", diff --git a/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.input.ts b/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.input.ts index b3b874efe6..fefaefd559 100644 --- a/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.input.ts +++ b/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.input.ts @@ -1,6 +1,6 @@ -import {Button, Label, MediaObject, TBodyPropTypes} from '@twilio-paste/core'; +import {Button, Label, MediaObject} from '@twilio-paste/core'; import {Table} from '@twilio-paste/core'; import {Button as Stuffin} from '@twilio-paste/core'; import {Button as Stuff} from '@sendgrid/ui-components'; import {Input} from '@twilio-paste/core'; -import {Card} from '@twilio-paste/core/dist/card'; \ No newline at end of file +import {Card} from '@twilio-paste/core/dist/card'; diff --git a/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.output.ts b/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.output.ts index 42676e5c48..88b50fc61a 100644 --- a/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.output.ts +++ b/packages/paste-codemods/transforms/__testfixtures__/barreled-to-unbarreled.output.ts @@ -1,5 +1,5 @@ -import { TBodyPropTypes, Table } from '@twilio-paste/core/table'; import { MediaObject } from '@twilio-paste/core/media-object'; +import { Table } from '@twilio-paste/core/table'; import { Label } from '@twilio-paste/core/label'; import { Button, Button as Stuffin } from '@twilio-paste/core/button'; import {Button as Stuff} from '@sendgrid/ui-components'; diff --git a/packages/paste-core/components/account-switcher/package.json b/packages/paste-core/components/account-switcher/package.json index 0269f87e38..1d8f62f924 100644 --- a/packages/paste-core/components/account-switcher/package.json +++ b/packages/paste-core/components/account-switcher/package.json @@ -49,7 +49,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -79,7 +78,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/account-switcher/src/AccountSwitcher.tsx b/packages/paste-core/components/account-switcher/src/AccountSwitcher.tsx index 1946f8e63f..528f55f126 100644 --- a/packages/paste-core/components/account-switcher/src/AccountSwitcher.tsx +++ b/packages/paste-core/components/account-switcher/src/AccountSwitcher.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {Menu, MenuPropTypes} from '@twilio-paste/menu'; +import {Menu} from '@twilio-paste/menu'; import type {MenuProps} from '@twilio-paste/menu'; export interface AccountSwitcherProps extends MenuProps { @@ -17,5 +17,4 @@ const AccountSwitcher = React.forwardRef( ); AccountSwitcher.displayName = 'AccountSwitcher'; -AccountSwitcher.propTypes = MenuPropTypes; export {AccountSwitcher}; diff --git a/packages/paste-core/components/account-switcher/src/AccountSwitcherBadge.tsx b/packages/paste-core/components/account-switcher/src/AccountSwitcherBadge.tsx index 141d96a21d..74146894cb 100644 --- a/packages/paste-core/components/account-switcher/src/AccountSwitcherBadge.tsx +++ b/packages/paste-core/components/account-switcher/src/AccountSwitcherBadge.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {MenuBadge, MenuBadgePropTypes} from '@twilio-paste/menu'; +import {MenuBadge} from '@twilio-paste/menu'; import type {MenuBadgeProps} from '@twilio-paste/menu'; export interface AccountSwitcherBadgeProps extends Omit { @@ -16,8 +16,5 @@ const AccountSwitcherBadge = React.forwardRef( ); AlertDialog.displayName = 'AlertDialog'; - -AlertDialog.propTypes = { - children: PropTypes.node.isRequired, - destructive: PropTypes.bool, - element: PropTypes.string, - heading: PropTypes.string.isRequired, - isOpen: PropTypes.bool.isRequired, - onConfirm: PropTypes.func.isRequired, - onConfirmLabel: PropTypes.string.isRequired, - onDismiss: PropTypes.func.isRequired, - onDismissLabel: PropTypes.string.isRequired, -}; diff --git a/packages/paste-core/components/alert/package.json b/packages/paste-core/components/alert/package.json index 6275b159fa..28c21c2ad7 100644 --- a/packages/paste-core/components/alert/package.json +++ b/packages/paste-core/components/alert/package.json @@ -43,7 +43,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -67,7 +66,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/alert/src/index.tsx b/packages/paste-core/components/alert/src/index.tsx index feb76c8fdc..fbd691b5cf 100644 --- a/packages/paste-core/components/alert/src/index.tsx +++ b/packages/paste-core/components/alert/src/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps, ValueOf} from '@twilio-paste/types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; @@ -147,16 +146,4 @@ const Alert = React.forwardRef( ); Alert.displayName = 'Alert'; -Alert.propTypes = { - children: PropTypes.node.isRequired, - onDismiss: PropTypes.func, - role: PropTypes.string, - variant: PropTypes.oneOf(Object.values(AlertVariants)).isRequired, - element: PropTypes.string, - i18nDismissLabel: PropTypes.string, - i18nErrorLabel: PropTypes.string, - i18nNeutralLabel: PropTypes.string, - i18nWarningLabel: PropTypes.string, -}; - export {Alert}; diff --git a/packages/paste-core/components/anchor/package.json b/packages/paste-core/components/anchor/package.json index 7f41cbb331..b58cabfac8 100644 --- a/packages/paste-core/components/anchor/package.json +++ b/packages/paste-core/components/anchor/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -56,7 +55,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "tsx": "^3.12.10", diff --git a/packages/paste-core/components/anchor/src/Anchor.tsx b/packages/paste-core/components/anchor/src/Anchor.tsx index cbbff0c692..574b6da001 100644 --- a/packages/paste-core/components/anchor/src/Anchor.tsx +++ b/packages/paste-core/components/anchor/src/Anchor.tsx @@ -4,7 +4,6 @@ import {LinkExternalIcon} from '@twilio-paste/icons/esm/LinkExternalIcon'; import {DefaultAnchor} from './DefaultAnchor'; import {InverseAnchor} from './InverseAnchor'; -import {AnchorPropTypes} from './proptypes'; import type {AnchorProps} from './types'; const AnchorVariants = { @@ -112,8 +111,6 @@ const Anchor = React.forwardRef( Anchor.displayName = 'Anchor'; -Anchor.propTypes = AnchorPropTypes; - export {Anchor}; export * from './types'; diff --git a/packages/paste-core/components/anchor/src/DefaultAnchor.tsx b/packages/paste-core/components/anchor/src/DefaultAnchor.tsx index ad79000704..4be2be3f67 100644 --- a/packages/paste-core/components/anchor/src/DefaultAnchor.tsx +++ b/packages/paste-core/components/anchor/src/DefaultAnchor.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box} from '@twilio-paste/box'; -import {AnchorPropTypes} from './proptypes'; import type {AnchorProps} from './types'; const DefaultAnchor = React.forwardRef((props, ref) => ( @@ -35,8 +34,4 @@ const DefaultAnchor = React.forwardRef((props, r DefaultAnchor.displayName = 'DefaultAnchor'; -if (process.env.NODE_ENV === 'development') { - DefaultAnchor.propTypes = AnchorPropTypes; -} - export {DefaultAnchor}; diff --git a/packages/paste-core/components/anchor/src/InverseAnchor.tsx b/packages/paste-core/components/anchor/src/InverseAnchor.tsx index 3bda2e3ae5..2e06883c4f 100644 --- a/packages/paste-core/components/anchor/src/InverseAnchor.tsx +++ b/packages/paste-core/components/anchor/src/InverseAnchor.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box} from '@twilio-paste/box'; -import {AnchorPropTypes} from './proptypes'; import type {AnchorProps} from './types'; const InverseAnchor = React.forwardRef((props, ref) => ( @@ -35,8 +34,4 @@ const InverseAnchor = React.forwardRef((props, r InverseAnchor.displayName = 'InverseAnchor'; -if (process.env.NODE_ENV === 'development') { - InverseAnchor.propTypes = AnchorPropTypes; -} - export {InverseAnchor}; diff --git a/packages/paste-core/components/anchor/src/proptypes.ts b/packages/paste-core/components/anchor/src/proptypes.ts deleted file mode 100644 index dd016ae6cc..0000000000 --- a/packages/paste-core/components/anchor/src/proptypes.ts +++ /dev/null @@ -1,17 +0,0 @@ -import PropTypes from 'prop-types'; - -export const AnchorPropTypes = { - children: PropTypes.node.isRequired, - href: PropTypes.string.isRequired, - rel: PropTypes.string, - showExternal: PropTypes.bool, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - tabIndex: PropTypes.oneOf([0, -1]) as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']) as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['default', 'inverse']) as any, - /** element identifier for customization */ - element: PropTypes.string, - i18nExternalLinkLabel: PropTypes.string, -}; diff --git a/packages/paste-core/components/avatar/package.json b/packages/paste-core/components/avatar/package.json index 91de1785d0..ca03073d5d 100644 --- a/packages/paste-core/components/avatar/package.json +++ b/packages/paste-core/components/avatar/package.json @@ -43,7 +43,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -63,7 +62,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/avatar/src/Avatar.tsx b/packages/paste-core/components/avatar/src/Avatar.tsx index e0718c8c1d..1e8f0bae1b 100644 --- a/packages/paste-core/components/avatar/src/Avatar.tsx +++ b/packages/paste-core/components/avatar/src/Avatar.tsx @@ -1,10 +1,8 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {isValidElementType} from 'react-is'; import {Text} from '@twilio-paste/text'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxStyleProps} from '@twilio-paste/box'; -import {isIconSizeTokenProp} from '@twilio-paste/style-props'; import {getComputedTokenNames, getInitialsFromName} from './utils'; import type {AvatarProps, AvatarContentProps, ColorVariants, AvatarVariants} from './types'; @@ -122,22 +120,3 @@ export const Avatar = React.forwardRef( ); Avatar.displayName = 'Avatar'; - -Avatar.propTypes = { - size: isIconSizeTokenProp, - name: PropTypes.string.isRequired, - element: PropTypes.string, - src: PropTypes.string, - color: PropTypes.oneOf([ - 'default', - 'decorative10', - 'decorative20', - 'decorative30', - 'decorative40', - ] as ColorVariants[]), - variant: PropTypes.oneOf(['user', 'entity'] as AvatarVariants[]), - icon: (props) => { - if (typeof props.icon !== 'function') new Error('[Paste Avatar]: icon prop must be a Paste Icon'); - return null; - }, -}; diff --git a/packages/paste-core/components/avatar/src/AvatarGroup.tsx b/packages/paste-core/components/avatar/src/AvatarGroup.tsx index c8b3f07d17..beb73e3a9d 100644 --- a/packages/paste-core/components/avatar/src/AvatarGroup.tsx +++ b/packages/paste-core/components/avatar/src/AvatarGroup.tsx @@ -1,9 +1,7 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Stack} from '@twilio-paste/stack'; -import {isIconSizeTokenProp} from '@twilio-paste/style-props'; -import type {AvatarGroupProps, AvatarVariants} from './types'; +import type {AvatarGroupProps} from './types'; import {getGroupSpacing} from './utils'; export const AvatarGroupContext = React.createContext>({} as AvatarGroupProps); @@ -21,10 +19,3 @@ export const AvatarGroup = React.forwardRef( ); AvatarGroup.displayName = 'AvatarGroup'; - -AvatarGroup.propTypes = { - size: isIconSizeTokenProp, - variant: PropTypes.oneOf(['user', 'entity'] as AvatarVariants[]), - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/badge/package.json b/packages/paste-core/components/badge/package.json index e361afbb2c..99125cceb1 100644 --- a/packages/paste-core/components/badge/package.json +++ b/packages/paste-core/components/badge/package.json @@ -40,7 +40,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -61,7 +60,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/badge/src/Badge.tsx b/packages/paste-core/components/badge/src/Badge.tsx index 8fe86edb09..8ce9f34659 100644 --- a/packages/paste-core/components/badge/src/Badge.tsx +++ b/packages/paste-core/components/badge/src/Badge.tsx @@ -4,7 +4,6 @@ import {secureExternalLink} from '@twilio-paste/anchor'; import {ErrorIcon} from '@twilio-paste/icons/esm/ErrorIcon'; import type {BadgeProps} from './types'; -import {BadgePropTypes} from './propTypes'; import {useResizeChildIcons} from './hooks'; import {badgeBaseStyles, badgeVariantStyles, badgeAnchorStyles, getBadgeButtonStyles} from './styles'; @@ -42,5 +41,3 @@ export const Badge = React.forwardRef( ); Badge.displayName = 'Badge'; - -Badge.propTypes = BadgePropTypes; diff --git a/packages/paste-core/components/badge/src/index.tsx b/packages/paste-core/components/badge/src/index.tsx index 0eb7730ec6..b08add5e14 100644 --- a/packages/paste-core/components/badge/src/index.tsx +++ b/packages/paste-core/components/badge/src/index.tsx @@ -2,5 +2,4 @@ export * from './types'; export * from './hooks'; export * from './styles'; export * from './constants'; -export * from './propTypes'; export * from './Badge'; diff --git a/packages/paste-core/components/badge/src/propTypes.ts b/packages/paste-core/components/badge/src/propTypes.ts deleted file mode 100644 index 36a7aa2e73..0000000000 --- a/packages/paste-core/components/badge/src/propTypes.ts +++ /dev/null @@ -1,14 +0,0 @@ -import PropTypes from 'prop-types'; - -import {BadgeVariants} from './constants'; -import type {BadgeSizes} from './types'; - -export const BadgePropTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - variant: PropTypes.oneOf(Object.values(BadgeVariants)).isRequired, - size: PropTypes.oneOf(['default', 'small'] as BadgeSizes[]), - as: PropTypes.oneOf(['span', 'button', 'a']).isRequired, - href: PropTypes.string, - onClick: PropTypes.func, -}; diff --git a/packages/paste-core/components/base-radio-checkbox/package.json b/packages/paste-core/components/base-radio-checkbox/package.json index 197e474836..1b9f8e688a 100644 --- a/packages/paste-core/components/base-radio-checkbox/package.json +++ b/packages/paste-core/components/base-radio-checkbox/package.json @@ -44,7 +44,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -69,7 +68,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/base-radio-checkbox/src/BaseRadioCheckbox.tsx b/packages/paste-core/components/base-radio-checkbox/src/BaseRadioCheckbox.tsx index ced1cb3ec4..9b36e737a6 100644 --- a/packages/paste-core/components/base-radio-checkbox/src/BaseRadioCheckbox.tsx +++ b/packages/paste-core/components/base-radio-checkbox/src/BaseRadioCheckbox.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {TextProps} from '@twilio-paste/text'; import {Text} from '@twilio-paste/text'; @@ -113,10 +112,6 @@ const BaseRadioCheckboxControl = React.forwardRef; @@ -133,9 +128,6 @@ const BaseRadioCheckboxLabel = React.forwardRef, Pick { children: NonNullable; @@ -150,10 +142,6 @@ const BaseRadioCheckboxLabelText = React.forwardRef { children: NonNullable; @@ -171,10 +159,5 @@ const BaseRadioCheckboxHelpText = React.forwardRef, - last: PropTypes.bool, - }; -} - export interface BreadcrumbProps extends HTMLPasteProps<'nav'> { children: NonNullable; element?: BoxElementProps['element']; @@ -128,9 +118,4 @@ const Breadcrumb = React.forwardRef( Breadcrumb.displayName = 'Breadcrumb'; -Breadcrumb.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {Breadcrumb, BreadcrumbItem}; diff --git a/packages/paste-core/components/button-group/package.json b/packages/paste-core/components/button-group/package.json index 3b2c8c66b5..ed94746b56 100644 --- a/packages/paste-core/components/button-group/package.json +++ b/packages/paste-core/components/button-group/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -52,7 +51,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/button-group/src/ButtonGroup.tsx b/packages/paste-core/components/button-group/src/ButtonGroup.tsx index 5e72a82d4b..85e113bb9b 100644 --- a/packages/paste-core/components/button-group/src/ButtonGroup.tsx +++ b/packages/paste-core/components/button-group/src/ButtonGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {styled, css} from '@twilio-paste/styling-library'; @@ -75,8 +74,3 @@ export const ButtonGroup = React.forwardRef( ); ButtonGroup.displayName = 'ButtonGroup'; - -ButtonGroup.propTypes = { - attached: PropTypes.bool, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/button/package.json b/packages/paste-core/components/button/package.json index e6a80dda4d..015c4e091c 100644 --- a/packages/paste-core/components/button/package.json +++ b/packages/paste-core/components/button/package.json @@ -44,7 +44,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -65,7 +64,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "tsx": "^3.12.10", diff --git a/packages/paste-core/components/button/src/Button.tsx b/packages/paste-core/components/button/src/Button.tsx index 1e61028054..7654df968a 100644 --- a/packages/paste-core/components/button/src/Button.tsx +++ b/packages/paste-core/components/button/src/Button.tsx @@ -14,7 +14,6 @@ import type { ButtonVariants, ButtonStates, } from './types'; -import {ButtonPropTypes} from './proptypes'; import {PrimaryButton} from './PrimaryButton'; import {PrimaryIconButton} from './PrimaryIconButton'; import {SecondaryButton} from './SecondaryButton'; @@ -290,8 +289,6 @@ Button.defaultProps = { variant: 'primary', }; -Button.propTypes = ButtonPropTypes; - Button.displayName = 'Button'; export type {ButtonProps}; diff --git a/packages/paste-core/components/button/src/DestructiveButton.tsx b/packages/paste-core/components/button/src/DestructiveButton.tsx index 034772f71f..56b18e3d66 100644 --- a/packages/paste-core/components/button/src/DestructiveButton.tsx +++ b/packages/paste-core/components/button/src/DestructiveButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting 'color' on pseudostyles from over zealous @@ -65,9 +64,6 @@ const DestructiveButton = React.forwardRef DestructiveButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - DestructiveButton.propTypes = DirectButtonPropTypes; -} DestructiveButton.displayName = 'DestructiveButton'; export {DestructiveButton}; diff --git a/packages/paste-core/components/button/src/DestructiveIconButton.tsx b/packages/paste-core/components/button/src/DestructiveIconButton.tsx index 439396bbef..2abe583f45 100644 --- a/packages/paste-core/components/button/src/DestructiveIconButton.tsx +++ b/packages/paste-core/components/button/src/DestructiveIconButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting 'color' on pseudostyles from over zealous @@ -52,9 +51,7 @@ const DestructiveIconButton = React.forwardRef( InverseButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - InverseButton.propTypes = DirectButtonPropTypes; -} + InverseButton.displayName = 'InverseButton'; export {InverseButton}; diff --git a/packages/paste-core/components/button/src/InverseLinkButton.tsx b/packages/paste-core/components/button/src/InverseLinkButton.tsx index b7c5b604f1..00aedb2a71 100644 --- a/packages/paste-core/components/button/src/InverseLinkButton.tsx +++ b/packages/paste-core/components/button/src/InverseLinkButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; const defaultStyles: BoxStyleProps = merge(BaseStyles.default, { color: 'colorTextInverse', @@ -49,9 +48,7 @@ const InverseLinkButton = React.forwardRef InverseLinkButton.defaultProps = { as: 'a', }; -if (process.env.NODE_ENV === 'development') { - InverseLinkButton.propTypes = DirectButtonPropTypes; -} + InverseLinkButton.displayName = 'InverseLinkButton'; export {InverseLinkButton}; diff --git a/packages/paste-core/components/button/src/LinkButton.tsx b/packages/paste-core/components/button/src/LinkButton.tsx index fdbeffa771..3ddf710a50 100644 --- a/packages/paste-core/components/button/src/LinkButton.tsx +++ b/packages/paste-core/components/button/src/LinkButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; const defaultStyles: BoxStyleProps = merge(BaseStyles.default, { color: 'colorTextPrimary', @@ -48,9 +47,7 @@ const LinkButton = React.forwardRef( LinkButton.defaultProps = { as: 'a', }; -if (process.env.NODE_ENV === 'development') { - LinkButton.propTypes = DirectButtonPropTypes; -} + LinkButton.displayName = 'LinkButton'; export {LinkButton}; diff --git a/packages/paste-core/components/button/src/PrimaryButton.tsx b/packages/paste-core/components/button/src/PrimaryButton.tsx index e0b2b4dae0..3531390ff2 100644 --- a/packages/paste-core/components/button/src/PrimaryButton.tsx +++ b/packages/paste-core/components/button/src/PrimaryButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting 'color' on pseudostyles from over zealous @@ -65,9 +64,7 @@ const PrimaryButton = React.forwardRef( PrimaryButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - PrimaryButton.propTypes = DirectButtonPropTypes; -} + PrimaryButton.displayName = 'PrimaryButton'; export {PrimaryButton}; diff --git a/packages/paste-core/components/button/src/PrimaryIconButton.tsx b/packages/paste-core/components/button/src/PrimaryIconButton.tsx index 809328c152..9a8fd86f2e 100644 --- a/packages/paste-core/components/button/src/PrimaryIconButton.tsx +++ b/packages/paste-core/components/button/src/PrimaryIconButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting 'color' on pseudostyles from over zealous @@ -52,9 +51,7 @@ const PrimaryIconButton = React.forwardRef PrimaryIconButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - PrimaryIconButton.propTypes = DirectButtonPropTypes; -} + PrimaryIconButton.displayName = 'PrimaryIconButton'; export {PrimaryIconButton}; diff --git a/packages/paste-core/components/button/src/ResetButton.tsx b/packages/paste-core/components/button/src/ResetButton.tsx index df24363fe3..1f7493ce80 100644 --- a/packages/paste-core/components/button/src/ResetButton.tsx +++ b/packages/paste-core/components/button/src/ResetButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; const defaultStyles: BoxStyleProps = merge(BaseStyles.default, { fontWeight: 'inherit', @@ -39,9 +38,7 @@ const ResetButton = React.forwardRef( ResetButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - ResetButton.propTypes = DirectButtonPropTypes; -} + ResetButton.displayName = 'ResetButton'; export {ResetButton}; diff --git a/packages/paste-core/components/button/src/SecondaryButton.tsx b/packages/paste-core/components/button/src/SecondaryButton.tsx index 3b30c6a529..c6284b67cf 100644 --- a/packages/paste-core/components/button/src/SecondaryButton.tsx +++ b/packages/paste-core/components/button/src/SecondaryButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles, ToggleStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting interaction color from over zealous legacy @@ -93,9 +92,7 @@ const SecondaryButton = React.forwardRef( SecondaryButton.defaultProps = { as: 'button', }; -if (process.env.NODE_ENV === 'development') { - SecondaryButton.propTypes = DirectButtonPropTypes; -} + SecondaryButton.displayName = 'SecondaryButton'; export {SecondaryButton}; diff --git a/packages/paste-core/components/button/src/SecondaryIconButton.tsx b/packages/paste-core/components/button/src/SecondaryIconButton.tsx index 39b10bab31..81417e6c68 100644 --- a/packages/paste-core/components/button/src/SecondaryIconButton.tsx +++ b/packages/paste-core/components/button/src/SecondaryIconButton.tsx @@ -5,7 +5,6 @@ import merge from 'deepmerge'; import {SizeStyles, BaseStyles, ToggleIconButtonStyles} from './styles'; import type {DirectButtonProps} from './types'; -import {DirectButtonPropTypes} from './proptypes'; /* * defensively resetting 'color' on pseudostyles from over zealous @@ -64,9 +63,7 @@ const SecondaryIconButton = React.forwardRef( ); Callout.displayName = 'Callout'; - -Callout.propTypes = { - children: PropTypes.node, - element: PropTypes.string, - variant: PropTypes.oneOf(['neutral', 'warning', 'error', 'success', 'new', 'default'] as CalloutVariants[]) - .isRequired, - i18nLabel: PropTypes.string, - marginY: isMarginTokenProp, -}; diff --git a/packages/paste-core/components/callout/src/CalloutList.tsx b/packages/paste-core/components/callout/src/CalloutList.tsx index dea78c04ad..cf33ac30f1 100644 --- a/packages/paste-core/components/callout/src/CalloutList.tsx +++ b/packages/paste-core/components/callout/src/CalloutList.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {Text, safelySpreadTextProps} from '@twilio-paste/text'; import type {BoxProps} from '@twilio-paste/box'; @@ -31,11 +30,6 @@ export const CalloutList = React.forwardRef( ); CalloutList.displayName = 'CalloutList'; -CalloutList.propTypes = { - children: PropTypes.node, - element: PropTypes.string, - as: PropTypes.oneOf(['ul', 'ol'] as AsTags[]).isRequired, -}; export interface CalloutListItemProps extends Partial> { children?: React.ReactNode; @@ -51,7 +45,3 @@ export const CalloutListItem = React.forwardRef( } ); -Card.propTypes = { - element: PropTypes.string, - padding: isPaddingTokenProp, - paddingTop: isPaddingTokenProp, - paddingRight: isPaddingTokenProp, - paddingBottom: isPaddingTokenProp, - paddingLeft: isPaddingTokenProp, -}; - Card.displayName = 'Card'; export {Card}; diff --git a/packages/paste-core/components/chat-composer/package.json b/packages/paste-core/components/chat-composer/package.json index dcdf2a8131..2f531044d1 100644 --- a/packages/paste-core/components/chat-composer/package.json +++ b/packages/paste-core/components/chat-composer/package.json @@ -39,7 +39,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^17.0.2 || ^18.0.0", "react-dom": "^17.0.2 || ^18.0.0" }, @@ -56,7 +55,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/chat-log/package.json b/packages/paste-core/components/chat-log/package.json index 03b921c00f..ee2cc50251 100644 --- a/packages/paste-core/components/chat-log/package.json +++ b/packages/paste-core/components/chat-log/package.json @@ -45,7 +45,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -71,7 +70,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/chat-log/src/ChatAttachment.tsx b/packages/paste-core/components/chat-log/src/ChatAttachment.tsx index 73183aeff9..32e64383a0 100644 --- a/packages/paste-core/components/chat-log/src/ChatAttachment.tsx +++ b/packages/paste-core/components/chat-log/src/ChatAttachment.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxElementProps} from '@twilio-paste/box'; import {Box} from '@twilio-paste/box'; import {MediaObject, MediaFigure, MediaBody} from '@twilio-paste/media-object'; @@ -35,10 +34,4 @@ const ChatAttachment = React.forwardRef( ChatAttachment.displayName = 'ChatAttachment'; -ChatAttachment.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - attachmentIcon: PropTypes.node.isRequired, -}; - export {ChatAttachment}; diff --git a/packages/paste-core/components/chat-log/src/ChatAttachmentDescription.tsx b/packages/paste-core/components/chat-log/src/ChatAttachmentDescription.tsx index 8349be196e..0b99020088 100644 --- a/packages/paste-core/components/chat-log/src/ChatAttachmentDescription.tsx +++ b/packages/paste-core/components/chat-log/src/ChatAttachmentDescription.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxElementProps} from '@twilio-paste/box'; import {Text, safelySpreadTextProps} from '@twilio-paste/text'; @@ -31,9 +30,4 @@ const ChatAttachmentDescription = React.forwardRef( ChatBookend.displayName = 'ChatBookend'; -ChatBookend.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - export {ChatBookend}; diff --git a/packages/paste-core/components/chat-log/src/ChatBookendItem.tsx b/packages/paste-core/components/chat-log/src/ChatBookendItem.tsx index a81e1de3e6..5d2d25ccba 100644 --- a/packages/paste-core/components/chat-log/src/ChatBookendItem.tsx +++ b/packages/paste-core/components/chat-log/src/ChatBookendItem.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -20,9 +19,4 @@ const ChatBookendItem = React.forwardRef( ChatBookendItem.displayName = 'ChatBookendItem'; -ChatBookendItem.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - export {ChatBookendItem}; diff --git a/packages/paste-core/components/chat-log/src/ChatBubble.tsx b/packages/paste-core/components/chat-log/src/ChatBubble.tsx index 5957f81e4b..6292f83a3b 100644 --- a/packages/paste-core/components/chat-log/src/ChatBubble.tsx +++ b/packages/paste-core/components/chat-log/src/ChatBubble.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxStyleProps, BoxElementProps} from '@twilio-paste/box'; @@ -52,8 +51,3 @@ export const ChatBubble = React.forwardRef( ); ChatBubble.displayName = 'ChatBubble'; - -ChatBubble.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/chat-log/src/ChatEvent.tsx b/packages/paste-core/components/chat-log/src/ChatEvent.tsx index 908f6b1a56..746950b1ac 100644 --- a/packages/paste-core/components/chat-log/src/ChatEvent.tsx +++ b/packages/paste-core/components/chat-log/src/ChatEvent.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -31,9 +30,4 @@ const ChatEvent = React.forwardRef( ChatEvent.displayName = 'ChatEvent'; -ChatEvent.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - export {ChatEvent}; diff --git a/packages/paste-core/components/chat-log/src/ChatLog.tsx b/packages/paste-core/components/chat-log/src/ChatLog.tsx index 32698393ed..713accb7f1 100644 --- a/packages/paste-core/components/chat-log/src/ChatLog.tsx +++ b/packages/paste-core/components/chat-log/src/ChatLog.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -20,9 +19,4 @@ const ChatLog = React.forwardRef(({children, eleme ChatLog.displayName = 'ChatLog'; -ChatLog.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - export {ChatLog}; diff --git a/packages/paste-core/components/chat-log/src/ChatMessage.tsx b/packages/paste-core/components/chat-log/src/ChatMessage.tsx index caa2557702..15b858e7a8 100644 --- a/packages/paste-core/components/chat-log/src/ChatMessage.tsx +++ b/packages/paste-core/components/chat-log/src/ChatMessage.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxStyleProps, BoxElementProps} from '@twilio-paste/box'; @@ -48,9 +47,3 @@ export const ChatMessage = React.forwardRef( ); ChatMessage.displayName = 'ChatMessage'; - -ChatMessage.propTypes = { - children: PropTypes.node, - variant: PropTypes.oneOf(['inbound', 'outbound'] as MessageVariants[]).isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/chat-log/src/ChatMessageMeta.tsx b/packages/paste-core/components/chat-log/src/ChatMessageMeta.tsx index ac8c55f8c6..d85af962cc 100644 --- a/packages/paste-core/components/chat-log/src/ChatMessageMeta.tsx +++ b/packages/paste-core/components/chat-log/src/ChatMessageMeta.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -35,9 +34,3 @@ export const ChatMessageMeta = React.forwardRef( ); Checkbox.displayName = 'Checkbox'; -Checkbox.propTypes = { - children: PropTypes.node.isRequired, - disabled: PropTypes.bool, - name: PropTypes.string, - onChange: PropTypes.func, - hasError: PropTypes.bool, - helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), - id: PropTypes.string, - indeterminate: PropTypes.bool, - isSelectAll: PropTypes.bool, - isSelectAllChild: PropTypes.bool, - element: PropTypes.string, - defaultChecked: PropTypes.bool, -}; - export {Checkbox, HiddenCheckbox, CheckboxIcon}; diff --git a/packages/paste-core/components/checkbox/src/CheckboxDisclaimer.tsx b/packages/paste-core/components/checkbox/src/CheckboxDisclaimer.tsx index fb7b162473..f02197dabe 100644 --- a/packages/paste-core/components/checkbox/src/CheckboxDisclaimer.tsx +++ b/packages/paste-core/components/checkbox/src/CheckboxDisclaimer.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import {HelpText} from '@twilio-paste/help-text'; @@ -33,10 +32,4 @@ const CheckboxDisclaimer = React.forwardRef( CheckboxGroup.displayName = 'CheckboxGroup'; -if (process.env.NODE_ENV === 'development') { - CheckboxGroup.propTypes = { - isSelectAll: PropTypes.bool, - name: PropTypes.string.isRequired, - element: PropTypes.string, - onChange: PropTypes.func, - disabled: PropTypes.bool, - errorText: PropTypes.string, - helpText: PropTypes.string, - orientation: PropTypes.oneOf(['vertical', 'horizontal']), - i18nRequiredLabel: PropTypes.string, - }; -} - export {CheckboxGroup}; diff --git a/packages/paste-core/components/code-block/package.json b/packages/paste-core/components/code-block/package.json index 51a28265f0..9738a38cd4 100644 --- a/packages/paste-core/components/code-block/package.json +++ b/packages/paste-core/components/code-block/package.json @@ -52,7 +52,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -85,7 +84,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/code-block/src/CodeBlock.tsx b/packages/paste-core/components/code-block/src/CodeBlock.tsx index 18085919eb..cdad3ec45e 100644 --- a/packages/paste-core/components/code-block/src/CodeBlock.tsx +++ b/packages/paste-core/components/code-block/src/CodeBlock.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {SyntaxHighlighter} from '@twilio-paste/syntax-highlighter-library'; import type {SnippetLanguages} from '@twilio-paste/syntax-highlighter-library'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; @@ -122,32 +121,3 @@ export const CodeBlock = React.forwardRef( ); CodeBlock.displayName = 'CodeBlock'; - -CodeBlock.propTypes = { - code: PropTypes.string.isRequired, - element: PropTypes.string, - language: PropTypes.oneOf([ - 'javascript', - 'jsx', - 'csharp', - 'php', - 'ruby', - 'python', - 'java', - 'json', - 'c', - 'bash', - 'shell-session', - 'go', - 'groovy', - ] as SnippetLanguages[]).isRequired, - showLineNumbers: PropTypes.bool, - wrapLines: PropTypes.bool, - maxLines: PropTypes.number, - externalLink: PropTypes.string, - i18nCopyLabelBefore: PropTypes.string, - i18nCopyLabelAfter: PropTypes.string, - i18nLinkLabel: PropTypes.string, - variant: PropTypes.oneOf(['multi-line', 'single-line'] as CodeBlockVariants[]), - copyTextFormatter: PropTypes.func, -}; diff --git a/packages/paste-core/components/code-block/src/CodeBlockTab.tsx b/packages/paste-core/components/code-block/src/CodeBlockTab.tsx index 1c2b9bd432..59c2c67dc4 100644 --- a/packages/paste-core/components/code-block/src/CodeBlockTab.tsx +++ b/packages/paste-core/components/code-block/src/CodeBlockTab.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {Tab} from '@twilio-paste/tabs'; import type {TabProps} from '@twilio-paste/tabs'; @@ -19,8 +18,3 @@ export const CodeBlockTab = React.forwardRef( ); CodeBlockTab.displayName = 'CodeBlockTab'; - -CodeBlockTab.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/code-block/src/CodeBlockTabList.tsx b/packages/paste-core/components/code-block/src/CodeBlockTabList.tsx index cbfc78078b..3db757dfe5 100644 --- a/packages/paste-core/components/code-block/src/CodeBlockTabList.tsx +++ b/packages/paste-core/components/code-block/src/CodeBlockTabList.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {TabList} from '@twilio-paste/tabs'; @@ -22,8 +21,3 @@ export const CodeBlockTabList = React.forwardRef( Combobox.displayName = 'Combobox'; -Combobox.propTypes = { - autocomplete: PropTypes.bool, - element: PropTypes.string, - groupItemsBy: PropTypes.string, - helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), - initialIsOpen: PropTypes.bool, - initialSelectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), - items: PropTypes.arrayOf(PropTypes.any).isRequired, - itemToString: PropTypes.func, - labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired, - onHighlightedIndexChange: PropTypes.func, - onInputValueChange: PropTypes.func, - onIsOpenChange: PropTypes.func, - onSelectedItemChange: PropTypes.func, - optionTemplate: PropTypes.func, - selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), -}; - export {Combobox}; diff --git a/packages/paste-core/components/combobox/src/styles/ComboboxInputWrapper.tsx b/packages/paste-core/components/combobox/src/styles/ComboboxInputWrapper.tsx index 37490fe964..1f4093aaa9 100644 --- a/packages/paste-core/components/combobox/src/styles/ComboboxInputWrapper.tsx +++ b/packages/paste-core/components/combobox/src/styles/ComboboxInputWrapper.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; export interface ComboboxInputWrapperProps { @@ -18,10 +17,4 @@ const ComboboxInputWrapper = React.forwardRef ComboboxListbox.displayName = 'ComboboxListbox'; -ComboboxListbox.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {ComboboxListbox}; diff --git a/packages/paste-core/components/combobox/src/styles/ComboboxListboxGroup.tsx b/packages/paste-core/components/combobox/src/styles/ComboboxListboxGroup.tsx index 284cb56324..0346bb8fa5 100644 --- a/packages/paste-core/components/combobox/src/styles/ComboboxListboxGroup.tsx +++ b/packages/paste-core/components/combobox/src/styles/ComboboxListboxGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import {Text} from '@twilio-paste/text'; @@ -62,10 +61,4 @@ const ComboboxListboxGroup = React.forwardRef( ); DataGrid.displayName = 'DataGrid'; -DataGrid.propTypes = { - 'aria-label': PropTypes.string.isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/data-grid/src/DataGridBody.tsx b/packages/paste-core/components/data-grid/src/DataGridBody.tsx index fdfe4cb381..54a09fa96e 100644 --- a/packages/paste-core/components/data-grid/src/DataGridBody.tsx +++ b/packages/paste-core/components/data-grid/src/DataGridBody.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {TBody} from '@twilio-paste/table'; import type {TBodyProps} from '@twilio-paste/table'; @@ -14,6 +13,3 @@ export const DataGridBody = React.forwardRef> }; DataGridCell.displayName = 'DataGridCell'; -DataGridCell.propTypes = { - as: PropTypes.oneOf(['th', 'td']), - element: PropTypes.string, - colSpan: PropTypes.number, -}; diff --git a/packages/paste-core/components/data-grid/src/DataGridFoot.tsx b/packages/paste-core/components/data-grid/src/DataGridFoot.tsx index 951d218184..fd16e0fba4 100644 --- a/packages/paste-core/components/data-grid/src/DataGridFoot.tsx +++ b/packages/paste-core/components/data-grid/src/DataGridFoot.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {TFoot} from '@twilio-paste/table'; import type {TFootProps} from '@twilio-paste/table'; @@ -15,6 +14,3 @@ export const DataGridFoot = React.forwardRef> = ({ }; DataGridHeader.displayName = 'DataGridHeader'; -DataGridHeader.propTypes = { - element: PropTypes.string, - colSpan: PropTypes.number, -}; diff --git a/packages/paste-core/components/data-grid/src/DataGridHeaderSort.tsx b/packages/paste-core/components/data-grid/src/DataGridHeaderSort.tsx index 251dc6ef67..cba35f0e13 100644 --- a/packages/paste-core/components/data-grid/src/DataGridHeaderSort.tsx +++ b/packages/paste-core/components/data-grid/src/DataGridHeaderSort.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {Button} from '@twilio-paste/button'; import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only'; @@ -70,8 +69,3 @@ export const DataGridHeaderSort: React.FC(['ascending', 'descending', 'none']).isRequired, - onClick: PropTypes.func, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/data-grid/src/DataGridRow.tsx b/packages/paste-core/components/data-grid/src/DataGridRow.tsx index 52073ad61b..f3fa9dcdd4 100644 --- a/packages/paste-core/components/data-grid/src/DataGridRow.tsx +++ b/packages/paste-core/components/data-grid/src/DataGridRow.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxElementProps} from '@twilio-paste/box'; import {CompositeGroup} from '@twilio-paste/reakit-library'; @@ -27,7 +26,3 @@ export const DataGridRow = React.forwardRef( ); Td.displayName = 'Td'; -Td.propTypes = { - ...TdPropTypes, - onClick: PropTypes.func, -}; diff --git a/packages/paste-core/components/data-grid/src/table/Th.tsx b/packages/paste-core/components/data-grid/src/table/Th.tsx index ca4763218e..a1a7ca3ab4 100644 --- a/packages/paste-core/components/data-grid/src/table/Th.tsx +++ b/packages/paste-core/components/data-grid/src/table/Th.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ThPropTypes} from '@twilio-paste/table'; import type {ThProps as TableThProps} from '@twilio-paste/table'; export interface ThProps extends TableThProps { @@ -45,7 +43,3 @@ export const Th = React.forwardRef( ); Th.displayName = 'Th'; -Th.propTypes = { - ...ThPropTypes, - onClick: PropTypes.func, -}; diff --git a/packages/paste-core/components/data-grid/src/table/Tr.tsx b/packages/paste-core/components/data-grid/src/table/Tr.tsx index 15cbdd2374..40ff0d911e 100644 --- a/packages/paste-core/components/data-grid/src/table/Tr.tsx +++ b/packages/paste-core/components/data-grid/src/table/Tr.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {styled, css} from '@twilio-paste/styling-library'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {TrPropTypes} from '@twilio-paste/table'; import type {TrProps as TableTrProps} from '@twilio-paste/table'; export interface TrProps extends TableTrProps { @@ -42,9 +40,3 @@ export const Tr = React.forwardRef( ); Tr.displayName = 'Tr'; -Tr.propTypes = { - ...TrPropTypes, - role: PropTypes.string.isRequired, - selected: PropTypes.bool, - striped: PropTypes.bool.isRequired, -}; diff --git a/packages/paste-core/components/data-grid/stories/components/PaginatedDataGrid.tsx b/packages/paste-core/components/data-grid/stories/components/PaginatedDataGrid.tsx index 367a9d0f7d..4c3e1e9a0c 100644 --- a/packages/paste-core/components/data-grid/stories/components/PaginatedDataGrid.tsx +++ b/packages/paste-core/components/data-grid/stories/components/PaginatedDataGrid.tsx @@ -75,15 +75,18 @@ const DataGridPagination: React.FC { onPageChange(Math.min(currentPage + 1, pageCount)); - }, [currentPage, pageCount]); + }, [currentPage, pageCount, onPageChange]); const goToPreviousPage = React.useCallback(() => { onPageChange(Math.max(currentPage - 1, 1)); - }, [currentPage]); + }, [currentPage, onPageChange]); - const goToPage = React.useCallback((pageNumber: number) => { - onPageChange(pageNumber); - }, []); + const goToPage = React.useCallback( + (pageNumber: number) => { + onPageChange(pageNumber); + }, + [onPageChange] + ); const paginationState = calculatePaginationState(currentPage, pageCount); diff --git a/packages/paste-core/components/date-picker/package.json b/packages/paste-core/components/date-picker/package.json index d83f506188..ea70b2b0e2 100644 --- a/packages/paste-core/components/date-picker/package.json +++ b/packages/paste-core/components/date-picker/package.json @@ -47,7 +47,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -72,7 +71,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/date-picker/src/DatePicker.tsx b/packages/paste-core/components/date-picker/src/DatePicker.tsx index dfaf367e62..3d0ab8ee93 100644 --- a/packages/paste-core/components/date-picker/src/DatePicker.tsx +++ b/packages/paste-core/components/date-picker/src/DatePicker.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {InputProps} from '@twilio-paste/input'; import {Input} from '@twilio-paste/input'; @@ -11,19 +10,4 @@ const DatePicker = React.forwardRef(({element DatePicker.displayName = 'DatePicker'; -DatePicker.propTypes = { - disabled: PropTypes.bool, - element: PropTypes.string, - hasError: PropTypes.bool, - id: PropTypes.string, - name: PropTypes.string, - onBlur: PropTypes.func, - onChange: PropTypes.func, - onFocus: PropTypes.func, - placeholder: PropTypes.string, - readOnly: PropTypes.bool, - required: PropTypes.bool, - value: PropTypes.string, -}; - export {DatePicker}; diff --git a/packages/paste-core/components/description-list/package.json b/packages/paste-core/components/description-list/package.json index bb14a241fd..18291a77a1 100644 --- a/packages/paste-core/components/description-list/package.json +++ b/packages/paste-core/components/description-list/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/description-list/src/DescriptionList.tsx b/packages/paste-core/components/description-list/src/DescriptionList.tsx index 6069c4ef9e..f1a7d37c2d 100644 --- a/packages/paste-core/components/description-list/src/DescriptionList.tsx +++ b/packages/paste-core/components/description-list/src/DescriptionList.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import * as PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -20,9 +19,4 @@ const DescriptionList = React.forwardRef DescriptionList.displayName = 'DescriptionList'; -DescriptionList.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - export {DescriptionList}; diff --git a/packages/paste-core/components/description-list/src/DescriptionListDetails.tsx b/packages/paste-core/components/description-list/src/DescriptionListDetails.tsx index adfb96c54f..c7c0413c45 100644 --- a/packages/paste-core/components/description-list/src/DescriptionListDetails.tsx +++ b/packages/paste-core/components/description-list/src/DescriptionListDetails.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import * as PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -31,9 +30,4 @@ const DescriptionListDetails = React.forwardRef( ); DetailText.displayName = 'DetailText'; - -DetailText.propTypes = { - as: PropTypes.string as any, - children: PropTypes.node, - element: PropTypes.string, - marginTop: PropTypes.oneOf(['space0', 'space30']), -}; diff --git a/packages/paste-core/components/disclosure/package.json b/packages/paste-core/components/disclosure/package.json index 296a02807f..4bf28b1d0d 100644 --- a/packages/paste-core/components/disclosure/package.json +++ b/packages/paste-core/components/disclosure/package.json @@ -42,7 +42,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -65,7 +64,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/disclosure/src/Disclosure.tsx b/packages/paste-core/components/disclosure/src/Disclosure.tsx index f6e44cf50f..d122ac1088 100644 --- a/packages/paste-core/components/disclosure/src/Disclosure.tsx +++ b/packages/paste-core/components/disclosure/src/Disclosure.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useDisclosurePrimitiveState} from '@twilio-paste/disclosure-primitive'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -39,11 +38,6 @@ const Disclosure = React.forwardRef( } ); Disclosure.displayName = 'Disclosure'; -Disclosure.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - variant: PropTypes.oneOf(['default', 'contained'] as DisclosureVariants[]), -}; export {Disclosure}; diff --git a/packages/paste-core/components/disclosure/src/DisclosureContent.tsx b/packages/paste-core/components/disclosure/src/DisclosureContent.tsx index 42c14db117..8acf61b22f 100644 --- a/packages/paste-core/components/disclosure/src/DisclosureContent.tsx +++ b/packages/paste-core/components/disclosure/src/DisclosureContent.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useSpring, animated} from '@twilio-paste/animation-library'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {DisclosurePrimitiveContent} from '@twilio-paste/disclosure-primitive'; @@ -78,9 +77,5 @@ const DisclosureContent = React.forwardRef DisplayHeading.displayName = 'DisplayHeading'; -DisplayHeading.propTypes = { - element: PropTypes.string, - as: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'span'] as AsTags[]).isRequired, - marginBottom: PropTypes.oneOf(['space0']) as PropTypes.Validator<'space0' | null | undefined> | undefined, - variant: PropTypes.oneOf(['displayHeading10', 'displayHeading20', 'displayHeading30'] as DisplayHeadingVariants[]) - .isRequired, - display: PropTypes.string, -}; - export {DisplayHeading}; diff --git a/packages/paste-core/components/display-heading/stories/index.stories.tsx b/packages/paste-core/components/display-heading/stories/index.stories.tsx index de24a6ec87..72393d8b5b 100644 --- a/packages/paste-core/components/display-heading/stories/index.stories.tsx +++ b/packages/paste-core/components/display-heading/stories/index.stories.tsx @@ -1,6 +1,6 @@ +import * as React from 'react'; import {CustomizationProvider} from '@twilio-paste/customization'; import {useTheme} from '@twilio-paste/theme'; -import * as React from 'react'; import {DisplayHeading} from '../src'; diff --git a/packages/paste-core/components/display-pill-group/package.json b/packages/paste-core/components/display-pill-group/package.json index 62a5c7aa01..ef37f4a615 100644 --- a/packages/paste-core/components/display-pill-group/package.json +++ b/packages/paste-core/components/display-pill-group/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/editable-code-block/package.json b/packages/paste-core/components/editable-code-block/package.json index 4347d405b6..5c1e9a16c3 100644 --- a/packages/paste-core/components/editable-code-block/package.json +++ b/packages/paste-core/components/editable-code-block/package.json @@ -50,7 +50,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -81,7 +80,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/editable-code-block/src/EditableCodeBlockWrapper.tsx b/packages/paste-core/components/editable-code-block/src/EditableCodeBlockWrapper.tsx index d7b8ced60c..975f993d1b 100644 --- a/packages/paste-core/components/editable-code-block/src/EditableCodeBlockWrapper.tsx +++ b/packages/paste-core/components/editable-code-block/src/EditableCodeBlockWrapper.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {styled, css} from '@twilio-paste/styling-library'; @@ -28,8 +27,3 @@ export const EditableCodeBlockWrapper = React.forwardRef( FilePicker.displayName = 'FilePicker'; -FilePicker.propTypes = { - accept: PropTypes.string, - children: PropTypes.element.isRequired, - element: PropTypes.string, - disabled: PropTypes.bool, - i18nNoSelectionText: PropTypes.string, - required: PropTypes.bool, - onChange: PropTypes.func, - name: PropTypes.string, -}; - export {FilePicker}; diff --git a/packages/paste-core/components/file-picker/src/FilePickerButton.tsx b/packages/paste-core/components/file-picker/src/FilePickerButton.tsx index 80b284a184..8297a8b8d7 100644 --- a/packages/paste-core/components/file-picker/src/FilePickerButton.tsx +++ b/packages/paste-core/components/file-picker/src/FilePickerButton.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {ButtonProps} from '@twilio-paste/button'; import {Button} from '@twilio-paste/button'; import {Box} from '@twilio-paste/box'; @@ -18,10 +17,4 @@ const FilePickerButton = React.forwardRef( FilePickerButton.displayName = 'FilePickerButton'; -FilePickerButton.propTypes = { - element: PropTypes.string, - children: PropTypes.node.isRequired, - disabled: PropTypes.bool, -}; - export {FilePickerButton}; diff --git a/packages/paste-core/components/file-uploader/package.json b/packages/paste-core/components/file-uploader/package.json index 91b9fe58e0..810e345651 100644 --- a/packages/paste-core/components/file-uploader/package.json +++ b/packages/paste-core/components/file-uploader/package.json @@ -49,7 +49,6 @@ "@twilio-paste/uid-library": "2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -76,7 +75,6 @@ "@twilio-paste/uid-library": "2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/file-uploader/src/FileUploader.tsx b/packages/paste-core/components/file-uploader/src/FileUploader.tsx index 0b6d840728..4995e98ec9 100644 --- a/packages/paste-core/components/file-uploader/src/FileUploader.tsx +++ b/packages/paste-core/components/file-uploader/src/FileUploader.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {useUID} from '@twilio-paste/uid-library'; @@ -30,12 +29,3 @@ export const FileUploader = React.forwardRef( ); FileUploader.displayName = 'FileUploader'; - -FileUploader.propTypes = { - children: PropTypes.node, - disabled: PropTypes.bool, - element: PropTypes.string, - id: PropTypes.string, - name: PropTypes.string.isRequired, - required: PropTypes.bool, -}; diff --git a/packages/paste-core/components/file-uploader/src/FileUploaderDropzone.tsx b/packages/paste-core/components/file-uploader/src/FileUploaderDropzone.tsx index cf189b9ae3..e1d29df587 100644 --- a/packages/paste-core/components/file-uploader/src/FileUploaderDropzone.tsx +++ b/packages/paste-core/components/file-uploader/src/FileUploaderDropzone.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps, BoxStyleProps} from '@twilio-paste/box'; import {UploadToCloudIcon} from '@twilio-paste/icons/esm/UploadToCloudIcon'; @@ -204,16 +203,3 @@ export const FileUploaderDropzone = React.forwardRef, 'children'> { element?: BoxProps['element']; @@ -28,9 +26,3 @@ export const Form = React.forwardRef( ); Form.displayName = 'Form'; - -Form.propTypes = { - children: PropTypes.node, - element: PropTypes.string, - maxWidth: isMaxWidthTokenProp, -}; diff --git a/packages/paste-core/components/form/src/FormActions.tsx b/packages/paste-core/components/form/src/FormActions.tsx index 04dedd17e6..4f645cff06 100644 --- a/packages/paste-core/components/form/src/FormActions.tsx +++ b/packages/paste-core/components/form/src/FormActions.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -25,8 +24,3 @@ export const FormActions = React.forwardRef( ); FormActions.displayName = 'FormActions'; - -FormActions.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/form/src/FormControl.tsx b/packages/paste-core/components/form/src/FormControl.tsx index 7ef2c799f4..e3b4589c79 100644 --- a/packages/paste-core/components/form/src/FormControl.tsx +++ b/packages/paste-core/components/form/src/FormControl.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -17,8 +16,3 @@ export const FormControl = React.forwardRef( ); FormControl.displayName = 'FormControl'; - -FormControl.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/form/src/FormControlTwoColumn.tsx b/packages/paste-core/components/form/src/FormControlTwoColumn.tsx index 5019b12f15..08b0b2ffa2 100644 --- a/packages/paste-core/components/form/src/FormControlTwoColumn.tsx +++ b/packages/paste-core/components/form/src/FormControlTwoColumn.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -24,8 +23,3 @@ export const FormControlTwoColumn = React.forwardRef | undefined, - variant: PropTypes.oneOf([ - 'heading10', - 'heading20', - 'heading30', - 'heading40', - 'heading50', - 'heading60', - ] as HeadingVariants[]).isRequired, - display: PropTypes.string, -}; diff --git a/packages/paste-core/components/heading/src/index.tsx b/packages/paste-core/components/heading/src/index.tsx index 6fc890fb13..baf0f9865a 100644 --- a/packages/paste-core/components/heading/src/index.tsx +++ b/packages/paste-core/components/heading/src/index.tsx @@ -3,7 +3,6 @@ import type {TextStyleProps} from '@twilio-paste/text'; import {Text, safelySpreadTextProps} from '@twilio-paste/text'; import type {HeadingVariants, HeadingProps, AsTags} from './types'; -import {HeadingPropTypes} from './PropTypes'; function getHeadingProps(headingVariant?: HeadingVariants, marginBottom?: 'space0'): TextStyleProps { switch (headingVariant) { @@ -85,7 +84,5 @@ const Heading = React.forwardRef( Heading.displayName = 'Heading'; -Heading.propTypes = HeadingPropTypes; - export type {HeadingProps, HeadingVariants, AsTags as asTags}; -export {Heading, HeadingPropTypes}; +export {Heading}; diff --git a/packages/paste-core/components/help-text/package.json b/packages/paste-core/components/help-text/package.json index ccb9fa7927..9121d6badd 100644 --- a/packages/paste-core/components/help-text/package.json +++ b/packages/paste-core/components/help-text/package.json @@ -37,7 +37,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -55,7 +54,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/help-text/src/HelpText.tsx b/packages/paste-core/components/help-text/src/HelpText.tsx index a0f634f923..9ffc5fe5b4 100644 --- a/packages/paste-core/components/help-text/src/HelpText.tsx +++ b/packages/paste-core/components/help-text/src/HelpText.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {HTMLPasteProps, ValueOf} from '@twilio-paste/types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -101,9 +100,4 @@ const HelpText = React.forwardRef( HelpText.displayName = 'HelpText'; -HelpText.propTypes = { - marginTop: PropTypes.oneOf(['space0']), - element: PropTypes.string, -}; - export {HelpText}; diff --git a/packages/paste-core/components/in-page-navigation/package.json b/packages/paste-core/components/in-page-navigation/package.json index 7730695bca..70fc853001 100644 --- a/packages/paste-core/components/in-page-navigation/package.json +++ b/packages/paste-core/components/in-page-navigation/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/in-page-navigation/src/InPageNavigation.tsx b/packages/paste-core/components/in-page-navigation/src/InPageNavigation.tsx index 48473a1fa3..2d68f383e9 100644 --- a/packages/paste-core/components/in-page-navigation/src/InPageNavigation.tsx +++ b/packages/paste-core/components/in-page-navigation/src/InPageNavigation.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -42,11 +41,4 @@ const InPageNavigation = React.forwardRef InPageNavigation.displayName = 'InPageNavigation'; -InPageNavigation.propTypes = { - children: PropTypes.node, - element: PropTypes.string, - 'aria-label': PropTypes.string.isRequired, - variant: PropTypes.oneOf(['fullWidth', 'default']), -}; - export {InPageNavigation}; diff --git a/packages/paste-core/components/in-page-navigation/src/InPageNavigationItem.tsx b/packages/paste-core/components/in-page-navigation/src/InPageNavigationItem.tsx index 1f8067f124..e0a0736b96 100644 --- a/packages/paste-core/components/in-page-navigation/src/InPageNavigationItem.tsx +++ b/packages/paste-core/components/in-page-navigation/src/InPageNavigationItem.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxStyleProps, BoxProps} from '@twilio-paste/box'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {secureExternalLink} from '@twilio-paste/anchor'; @@ -113,11 +112,4 @@ const InPageNavigationItem = React.forwardRef( InlineCode.displayName = 'InlineCode'; -InlineCode.propTypes = { - children: PropTypes.string.isRequired, - element: PropTypes.string, - variant: PropTypes.oneOf(['default', 'minimal']), -}; - export {InlineCode}; diff --git a/packages/paste-core/components/inline-control-group/package.json b/packages/paste-core/components/inline-control-group/package.json index 227c797c30..bce88fdc2f 100644 --- a/packages/paste-core/components/inline-control-group/package.json +++ b/packages/paste-core/components/inline-control-group/package.json @@ -43,7 +43,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -67,7 +66,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/input-box/package.json b/packages/paste-core/components/input-box/package.json index 135cd26dfc..eadf9eaa50 100644 --- a/packages/paste-core/components/input-box/package.json +++ b/packages/paste-core/components/input-box/package.json @@ -36,7 +36,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -53,7 +52,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/input-box/src/FauxInput/DefaultFauxInput.tsx b/packages/paste-core/components/input-box/src/FauxInput/DefaultFauxInput.tsx index bad178d02f..c4a271642e 100644 --- a/packages/paste-core/components/input-box/src/FauxInput/DefaultFauxInput.tsx +++ b/packages/paste-core/components/input-box/src/FauxInput/DefaultFauxInput.tsx @@ -3,7 +3,6 @@ import {Box} from '@twilio-paste/box'; import type {BoxShadow, BackgroundColor} from '@twilio-paste/style-props'; import type {FauxInputProps} from '../types'; -import {FauxInputPropTypes} from '../types'; const DefaultFauxInput = React.forwardRef>( ({disabled, element, hasError, readOnly, children, type, variant}, ref) => { @@ -59,6 +58,4 @@ const DefaultFauxInput = React.forwardRef( ({disabled, element, hasError, readOnly, children, type, variant}, ref) => { @@ -57,6 +56,4 @@ const InverseFauxInput = React.forwardRef( InverseFauxInput.displayName = 'InverseFauxInput'; -InverseFauxInput.propTypes = FauxInputPropTypes; - export {InverseFauxInput}; diff --git a/packages/paste-core/components/input-box/src/FauxInput/index.tsx b/packages/paste-core/components/input-box/src/FauxInput/index.tsx index a3f55ba589..72a7ac322a 100644 --- a/packages/paste-core/components/input-box/src/FauxInput/index.tsx +++ b/packages/paste-core/components/input-box/src/FauxInput/index.tsx @@ -3,7 +3,6 @@ import * as React from 'react'; import {DefaultFauxInput} from './DefaultFauxInput'; import {InverseFauxInput} from './InverseFauxInput'; import type {FauxInputProps} from '../types'; -import {FauxInputPropTypes} from '../types'; const FauxInputVariants = { default: DefaultFauxInput, @@ -32,6 +31,4 @@ const FieldWrapper = React.forwardRef( FieldWrapper.displayName = 'FieldWrapper'; -FieldWrapper.propTypes = FauxInputPropTypes; - export {FieldWrapper}; diff --git a/packages/paste-core/components/input-box/src/InputBox.tsx b/packages/paste-core/components/input-box/src/InputBox.tsx index 2d3d8bad4d..c3612ae454 100644 --- a/packages/paste-core/components/input-box/src/InputBox.tsx +++ b/packages/paste-core/components/input-box/src/InputBox.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {FieldWrapper} from './FauxInput'; @@ -69,18 +68,4 @@ const InputBox = React.forwardRef( Prefix.displayName = 'Prefix'; -Prefix.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string.isRequired, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['default', 'inverse']) as any, -}; - export {Prefix}; diff --git a/packages/paste-core/components/input-box/src/Suffix.tsx b/packages/paste-core/components/input-box/src/Suffix.tsx index 7b22dd54b5..41350dc73b 100644 --- a/packages/paste-core/components/input-box/src/Suffix.tsx +++ b/packages/paste-core/components/input-box/src/Suffix.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {BackgroundColor, BorderColor} from '@twilio-paste/style-props'; @@ -58,11 +57,4 @@ const Suffix = React.forwardRef( Suffix.displayName = 'Suffix'; -Suffix.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string.isRequired, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['default', 'inverse']) as any, -}; - export {Suffix}; diff --git a/packages/paste-core/components/input-box/src/types.ts b/packages/paste-core/components/input-box/src/types.ts index 02cf855325..dd4b1cef4c 100644 --- a/packages/paste-core/components/input-box/src/types.ts +++ b/packages/paste-core/components/input-box/src/types.ts @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; export type InputBoxTypes = @@ -27,15 +26,3 @@ export interface FauxInputProps { type?: InputBoxTypes; variant?: Variants; } - -export const FauxInputPropTypes = { - children: PropTypes.node.isRequired, - disabled: PropTypes.bool, - element: PropTypes.string.isRequired, - hasError: PropTypes.bool, - readOnly: PropTypes.bool, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - type: PropTypes.oneOf(['text', 'email', 'hidden', 'number', 'password', 'search', 'tel', 'date', 'time']) as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['default', 'inverse']) as any, -}; diff --git a/packages/paste-core/components/input/__tests__/input.test.tsx b/packages/paste-core/components/input/__tests__/input.test.tsx index bc9ba68e70..c2e2ffb717 100644 --- a/packages/paste-core/components/input/__tests__/input.test.tsx +++ b/packages/paste-core/components/input/__tests__/input.test.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {fireEvent, render, screen} from '@testing-library/react'; +import {act, render, screen} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import {CustomizationProvider} from '@twilio-paste/customization'; @@ -107,7 +107,9 @@ describe('Input event handlers', () => { expect(onFocusMock).toHaveBeenCalledTimes(1); RenderedInput.blur(); expect(onBlurMock).toHaveBeenCalledTimes(1); - userEvent.type(RenderedInput, 'foo'); + act(() => { + userEvent.type(RenderedInput, 'foo'); + }); expect(onChangeMock).toHaveBeenCalledTimes(3); }); }); @@ -224,16 +226,22 @@ describe('Number Input', () => { it('increase button hides when hit max', () => { const {getByRole} = render(); const IncreaseButton = getByRole('button', {name: 'step value up'}); - userEvent.click(IncreaseButton); + act(() => { + userEvent.click(IncreaseButton); + }); expect(getByRole('spinbutton').value).toBe('1'); - userEvent.click(IncreaseButton); + act(() => { + userEvent.click(IncreaseButton); + }); expect(getByRole('spinbutton').value).toBe('2'); expect(IncreaseButton).not.toBeInTheDocument(); }); it('decrease button hides when hit min', () => { const {getByRole} = render(); const DecreaseButton = getByRole('button', {name: 'step value down'}); - userEvent.click(DecreaseButton); + act(() => { + userEvent.click(DecreaseButton); + }); expect(getByRole('spinbutton').value).toBe('-1'); expect(DecreaseButton).not.toBeInTheDocument(); }); diff --git a/packages/paste-core/components/input/package.json b/packages/paste-core/components/input/package.json index e4d56a260c..c6a3a31da0 100644 --- a/packages/paste-core/components/input/package.json +++ b/packages/paste-core/components/input/package.json @@ -43,7 +43,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -67,7 +66,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/label/package.json b/packages/paste-core/components/label/package.json index 485dbdccc2..900e562d83 100644 --- a/packages/paste-core/components/label/package.json +++ b/packages/paste-core/components/label/package.json @@ -39,7 +39,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -59,7 +58,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/label/src/Label.tsx b/packages/paste-core/components/label/src/Label.tsx index eb4b88d8ae..f8b818e599 100644 --- a/packages/paste-core/components/label/src/Label.tsx +++ b/packages/paste-core/components/label/src/Label.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {MediaObject, MediaFigure, MediaBody} from '@twilio-paste/media-object'; @@ -109,16 +108,4 @@ const Label = React.forwardRef( Label.displayName = 'Label'; -Label.propTypes = { - as: PropTypes.oneOf(['label', 'legend', 'div']), - disabled: PropTypes.bool, - element: PropTypes.string, - htmlFor: PropTypes.string, - marginBottom: PropTypes.oneOf(['space0']), - required: PropTypes.bool, - i18nRequiredLabel: PropTypes.string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['default', 'inverse']) as any, -}; - export {Label}; diff --git a/packages/paste-core/components/label/src/RequiredDot.tsx b/packages/paste-core/components/label/src/RequiredDot.tsx index 5abdc8011c..bfadcef253 100644 --- a/packages/paste-core/components/label/src/RequiredDot.tsx +++ b/packages/paste-core/components/label/src/RequiredDot.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only'; @@ -42,7 +41,3 @@ export const RequiredDot: React.FC> = }; RequiredDot.displayName = 'RequiredDot'; - -RequiredDot.propTypes = { - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/list/__tests__/index.spec.tsx b/packages/paste-core/components/list/__tests__/index.spec.tsx index 0d7654b0b7..b48d393a46 100644 --- a/packages/paste-core/components/list/__tests__/index.spec.tsx +++ b/packages/paste-core/components/list/__tests__/index.spec.tsx @@ -32,8 +32,8 @@ describe('Ordered List', () => { it('should set list style type styles to combat css reset stylesheets', () => { render( - Children - Children + Children + Children ); const renderedOrderedList = screen.getByTestId('ordered-list'); diff --git a/packages/paste-core/components/list/package.json b/packages/paste-core/components/list/package.json index 658632e526..82f096ff8f 100644 --- a/packages/paste-core/components/list/package.json +++ b/packages/paste-core/components/list/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/list/src/List.tsx b/packages/paste-core/components/list/src/List.tsx index d1cd292b09..c057f7fa1a 100644 --- a/packages/paste-core/components/list/src/List.tsx +++ b/packages/paste-core/components/list/src/List.tsx @@ -1,9 +1,7 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Text} from '@twilio-paste/text'; -import {isMarginTokenProp} from '@twilio-paste/style-props'; -import type {AsTags, BaseListProps} from './types'; +import type {BaseListProps} from './types'; const List = React.forwardRef( ({as, children, element = 'LIST', listStyleType = 'disc', ...props}, ref) => { @@ -28,11 +26,4 @@ const List = React.forwardRef(({children, elem ListItem.displayName = 'ListItem'; -ListItem.propTypes = { - element: PropTypes.string, -}; - export {ListItem}; diff --git a/packages/paste-core/components/list/src/OrderedList.tsx b/packages/paste-core/components/list/src/OrderedList.tsx index 1ff3aaec9f..ad2ab5b65b 100644 --- a/packages/paste-core/components/list/src/OrderedList.tsx +++ b/packages/paste-core/components/list/src/OrderedList.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {safelySpreadTextProps} from '@twilio-paste/text'; -import {isMarginTokenProp} from '@twilio-paste/style-props'; import {List} from './List'; import type {OrderedListProps} from './types'; @@ -26,10 +24,4 @@ const OrderedList = React.forwardRef( OrderedList.displayName = 'OrderedList'; -OrderedList.propTypes = { - element: PropTypes.string, - marginTop: isMarginTokenProp, - marginBottom: isMarginTokenProp, -}; - export {OrderedList}; diff --git a/packages/paste-core/components/list/src/UnorderedList.tsx b/packages/paste-core/components/list/src/UnorderedList.tsx index 064815eba1..5265e05e4e 100644 --- a/packages/paste-core/components/list/src/UnorderedList.tsx +++ b/packages/paste-core/components/list/src/UnorderedList.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {safelySpreadTextProps} from '@twilio-paste/text'; -import {isMarginTokenProp} from '@twilio-paste/style-props'; import {List} from './List'; import type {UnorderedListProps} from './types'; @@ -26,10 +24,4 @@ const UnorderedList = React.forwardRef( UnorderedList.displayName = 'UnorderedList'; -UnorderedList.propTypes = { - element: PropTypes.string, - marginTop: isMarginTokenProp, - marginBottom: isMarginTokenProp, -}; - export {UnorderedList}; diff --git a/packages/paste-core/components/menu/package.json b/packages/paste-core/components/menu/package.json index be0f05d8fc..4775255aac 100644 --- a/packages/paste-core/components/menu/package.json +++ b/packages/paste-core/components/menu/package.json @@ -48,7 +48,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -77,7 +76,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/menu/src/Menu.tsx b/packages/paste-core/components/menu/src/Menu.tsx index 6546f5bbfb..0f77d402e6 100644 --- a/packages/paste-core/components/menu/src/Menu.tsx +++ b/packages/paste-core/components/menu/src/Menu.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxElementProps} from '@twilio-paste/box'; import {safelySpreadBoxProps, Box} from '@twilio-paste/box'; import {MenuPrimitive} from '@twilio-paste/menu-primitive'; @@ -33,12 +32,6 @@ const Menu = React.forwardRef(({element = 'MENU', ... return ; }); -export const MenuPropTypes = { - element: PropTypes.string, - hideOnClickOutside: PropTypes.bool, - disabled: PropTypes.bool, -}; - Menu.displayName = 'Menu'; -Menu.propTypes = MenuPropTypes; + export {Menu}; diff --git a/packages/paste-core/components/menu/src/MenuBadge.tsx b/packages/paste-core/components/menu/src/MenuBadge.tsx index 01383011ce..6025d887bc 100644 --- a/packages/paste-core/components/menu/src/MenuBadge.tsx +++ b/packages/paste-core/components/menu/src/MenuBadge.tsx @@ -1,10 +1,9 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only'; -import {Badge, BadgeVariants} from '@twilio-paste/badge'; +import {Badge} from '@twilio-paste/badge'; import type {BadgeProps} from '@twilio-paste/badge'; -import {Button, ButtonPropTypes} from '@twilio-paste/button'; +import {Button} from '@twilio-paste/button'; import type {ButtonProps} from '@twilio-paste/button'; import {MenuPrimitiveButton} from '@twilio-paste/menu-primitive'; import type {MenuPrimitiveButtonProps} from '@twilio-paste/menu-primitive'; @@ -51,13 +50,6 @@ const MenuBadge = React.forwardRef( } ); -export const MenuBadgePropTypes = { - ...ButtonPropTypes, - i18nButtonLabel: PropTypes.string.isRequired, - variant: PropTypes.oneOf(Object.values(BadgeVariants)).isRequired, -}; - MenuBadge.displayName = 'MenuBadge'; -MenuBadge.propTypes = MenuBadgePropTypes; export {MenuBadge}; diff --git a/packages/paste-core/components/menu/src/MenuButton.tsx b/packages/paste-core/components/menu/src/MenuButton.tsx index 4f2244a3aa..aae4db9adc 100644 --- a/packages/paste-core/components/menu/src/MenuButton.tsx +++ b/packages/paste-core/components/menu/src/MenuButton.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import type {MenuPrimitiveButtonProps} from '@twilio-paste/menu-primitive'; import {MenuPrimitiveButton} from '@twilio-paste/menu-primitive'; import type {ButtonProps} from '@twilio-paste/button'; -import {Button, ButtonPropTypes} from '@twilio-paste/button'; +import {Button} from '@twilio-paste/button'; export type MenuButtonProps = MenuPrimitiveButtonProps & ButtonProps; @@ -14,8 +14,5 @@ const MenuButton = React.forwardRef(({elemen ); }); -export const MenuButtonPropTypes = ButtonPropTypes; - MenuButton.displayName = 'MenuButton'; -MenuButton.propTypes = MenuButtonPropTypes; export {MenuButton}; diff --git a/packages/paste-core/components/menu/src/MenuGroup.tsx b/packages/paste-core/components/menu/src/MenuGroup.tsx index 0caa77d7d0..7b62facc05 100644 --- a/packages/paste-core/components/menu/src/MenuGroup.tsx +++ b/packages/paste-core/components/menu/src/MenuGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import * as PropTypes from 'prop-types'; import {safelySpreadBoxProps, Box} from '@twilio-paste/box'; import type {GenericIconProps} from '@twilio-paste/icons/esm/types'; import {Text} from '@twilio-paste/text'; @@ -45,12 +44,5 @@ const MenuGroup = React.forwardRef( } ); -export const MenuGroupPropTypes = { - label: PropTypes.string.isRequired, - icon: PropTypes.element, - element: PropTypes.string, -}; - MenuGroup.displayName = 'MenuGroup'; -MenuGroup.propTypes = MenuGroupPropTypes; export {MenuGroup}; diff --git a/packages/paste-core/components/menu/src/MenuItem.tsx b/packages/paste-core/components/menu/src/MenuItem.tsx index 9ca2c48d88..f515ef3366 100644 --- a/packages/paste-core/components/menu/src/MenuItem.tsx +++ b/packages/paste-core/components/menu/src/MenuItem.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {MenuPrimitiveItem} from '@twilio-paste/menu-primitive'; import type {MenuItemProps} from './types'; @@ -16,15 +15,6 @@ const MenuItem = React.forwardRef( } ); -export const MenuItemPropTypes = { - href: PropTypes.string, - variant: PropTypes.oneOf(Object.values(MenuItemVariants)), - disabled: PropTypes.bool, - id: PropTypes.string, - onClick: PropTypes.func, - element: PropTypes.string, -}; - MenuItem.displayName = 'MenuItem'; -MenuItem.propTypes = MenuItemPropTypes; + export {MenuItem}; diff --git a/packages/paste-core/components/menu/src/MenuItemCheckbox.tsx b/packages/paste-core/components/menu/src/MenuItemCheckbox.tsx index d2ee11e2ca..1f6a62b4e7 100644 --- a/packages/paste-core/components/menu/src/MenuItemCheckbox.tsx +++ b/packages/paste-core/components/menu/src/MenuItemCheckbox.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {MenuPrimitiveItemCheckbox} from '@twilio-paste/menu-primitive'; import type {MenuItemCheckboxProps} from './types'; @@ -16,18 +15,5 @@ const MenuItemCheckbox = React.forwardRef } ); -export const MenuItemCheckboxPropTypes = { - href: PropTypes.string, - variant: PropTypes.oneOf(Object.values(MenuItemVariants)), - disabled: PropTypes.bool, - id: PropTypes.string, - onClick: PropTypes.func, - element: PropTypes.string, - value: PropTypes.string, - checked: PropTypes.bool, - name: PropTypes.string, -}; - MenuItemCheckbox.displayName = 'MenuItemCheckbox'; -MenuItemCheckbox.propTypes = MenuItemCheckboxPropTypes; export {MenuItemCheckbox}; diff --git a/packages/paste-core/components/menu/src/MenuItemRadio.tsx b/packages/paste-core/components/menu/src/MenuItemRadio.tsx index 015b33d875..2b923a683d 100644 --- a/packages/paste-core/components/menu/src/MenuItemRadio.tsx +++ b/packages/paste-core/components/menu/src/MenuItemRadio.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {MenuPrimitiveItemRadio} from '@twilio-paste/menu-primitive'; import type {MenuItemRadioProps} from './types'; @@ -16,18 +15,5 @@ const MenuItemRadio = React.forwardRef( } ); -export const MenuItemRadioPropTypes = { - href: PropTypes.string, - variant: PropTypes.oneOf([Object.values(MenuItemVariants)]), - disabled: PropTypes.bool, - id: PropTypes.string, - onClick: PropTypes.func, - element: PropTypes.string, - value: PropTypes.string, - checked: PropTypes.bool, - name: PropTypes.string, -}; - MenuItemRadio.displayName = 'MenuItemRadio'; -MenuItemRadio.propTypes = MenuItemRadioPropTypes; export {MenuItemRadio}; diff --git a/packages/paste-core/components/meter/package.json b/packages/paste-core/components/meter/package.json index d840c2a530..457b6b56c5 100644 --- a/packages/paste-core/components/meter/package.json +++ b/packages/paste-core/components/meter/package.json @@ -42,7 +42,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -65,7 +64,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/minimizable-dialog/package.json b/packages/paste-core/components/minimizable-dialog/package.json index 6fb98cff1c..8d80941373 100644 --- a/packages/paste-core/components/minimizable-dialog/package.json +++ b/packages/paste-core/components/minimizable-dialog/package.json @@ -44,7 +44,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -69,7 +68,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/minimizable-dialog/src/MinimizableDialog.tsx b/packages/paste-core/components/minimizable-dialog/src/MinimizableDialog.tsx index b9470e922d..74458cfc0e 100644 --- a/packages/paste-core/components/minimizable-dialog/src/MinimizableDialog.tsx +++ b/packages/paste-core/components/minimizable-dialog/src/MinimizableDialog.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {StyledBase} from '@twilio-paste/theme'; @@ -61,9 +60,3 @@ export const MinimizableDialog = React.forwardRef( ); Modal.displayName = 'Modal'; -Modal.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - isOpen: PropTypes.bool.isRequired, - onDismiss: PropTypes.func.isRequired, - allowPinchZoom: PropTypes.bool, - size: PropTypes.oneOf(['default', 'wide'] as Sizes[]).isRequired, - initialFocusRef: PropTypes.object as any, - ariaLabelledby: PropTypes.string.isRequired, -}; - export {Modal}; diff --git a/packages/paste-core/components/modal/src/ModalBody.tsx b/packages/paste-core/components/modal/src/ModalBody.tsx index b3d0de1b38..966152b6af 100644 --- a/packages/paste-core/components/modal/src/ModalBody.tsx +++ b/packages/paste-core/components/modal/src/ModalBody.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -28,9 +27,4 @@ const ModalBody = React.forwardRef( ); ModalBody.displayName = 'ModalBody'; -ModalBody.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {ModalBody}; diff --git a/packages/paste-core/components/modal/src/ModalFooter.tsx b/packages/paste-core/components/modal/src/ModalFooter.tsx index e840538abc..3bbfbc0607 100644 --- a/packages/paste-core/components/modal/src/ModalFooter.tsx +++ b/packages/paste-core/components/modal/src/ModalFooter.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -28,9 +27,4 @@ const ModalFooter = React.forwardRef( ); ModalFooter.displayName = 'ModalFooter'; -ModalFooter.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {ModalFooter}; diff --git a/packages/paste-core/components/modal/src/ModalFooterActions.tsx b/packages/paste-core/components/modal/src/ModalFooterActions.tsx index dd7f694a5e..7192b89fdb 100644 --- a/packages/paste-core/components/modal/src/ModalFooterActions.tsx +++ b/packages/paste-core/components/modal/src/ModalFooterActions.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -37,10 +36,4 @@ const ModalFooterActions = React.forwardRef( ); ModalHeader.displayName = 'ModalHeader'; -ModalHeader.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {ModalHeader}; diff --git a/packages/paste-core/components/modal/src/ModalHeading.tsx b/packages/paste-core/components/modal/src/ModalHeading.tsx index 04829905aa..4b52ef6344 100644 --- a/packages/paste-core/components/modal/src/ModalHeading.tsx +++ b/packages/paste-core/components/modal/src/ModalHeading.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Heading} from '@twilio-paste/heading'; import type {HeadingProps} from '@twilio-paste/heading'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -20,10 +19,4 @@ const ModalHeading = React.forwardRef( ); ModalHeading.displayName = 'ModalHeading'; -ModalHeading.propTypes = { - children: PropTypes.node.isRequired, - as: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']), - element: PropTypes.string, -}; - export {ModalHeading}; diff --git a/packages/paste-core/components/pagination/package.json b/packages/paste-core/components/pagination/package.json index e3c78c3334..c8129507b5 100644 --- a/packages/paste-core/components/pagination/package.json +++ b/packages/paste-core/components/pagination/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/pagination/src/Pagination.tsx b/packages/paste-core/components/pagination/src/Pagination.tsx index 9e76a0be72..1cf943b659 100644 --- a/packages/paste-core/components/pagination/src/Pagination.tsx +++ b/packages/paste-core/components/pagination/src/Pagination.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {PaginationProps} from './types'; -import {PaginationPropTypes} from './proptypes'; const Pagination = React.forwardRef( ({children, element = 'PAGINATION', label, ...props}, ref) => { @@ -16,6 +15,4 @@ const Pagination = React.forwardRef( Pagination.displayName = 'Pagination'; -Pagination.propTypes = PaginationPropTypes; - export {Pagination}; diff --git a/packages/paste-core/components/pagination/src/PaginationArrow/PaginationArrowButton.tsx b/packages/paste-core/components/pagination/src/PaginationArrow/PaginationArrowButton.tsx index 090058d031..1c956a2782 100644 --- a/packages/paste-core/components/pagination/src/PaginationArrow/PaginationArrowButton.tsx +++ b/packages/paste-core/components/pagination/src/PaginationArrow/PaginationArrowButton.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {PaginationArrowButtonProps} from '../types'; -import {PaginationArrowButtonPropTypes} from '../proptypes'; const PaginationArrowButton = React.forwardRef( ({children, element = 'PAGINATION_ARROW_BUTTON', disabled, visibleLabel, ...props}, ref) => { @@ -54,6 +53,4 @@ const PaginationArrowButton = React.forwardRef> = ({ children, @@ -30,6 +29,4 @@ const PaginationArrowIconWrapper: React.FC( ( @@ -49,6 +48,4 @@ const PaginationBackArrow = React.forwardRef( ( @@ -49,6 +48,4 @@ const PaginationForwardArrow = React.forwardRef( @@ -106,6 +105,4 @@ const PaginationArrow = React.forwardRef( ({label, element = 'PAGINATION_ELLIPSIS', ...props}, ref) => { @@ -28,6 +27,4 @@ const PaginationEllipsis = React.forwardRef( ({children, element = 'PAGINATION_ITEMS', ...props}, ref) => { @@ -39,6 +38,4 @@ const PaginationItems = React.forwardRef PaginationItems.displayName = 'PaginationItems'; -PaginationItems.propTypes = PaginationItemsPropTypes; - export {PaginationItems}; diff --git a/packages/paste-core/components/pagination/src/PaginationLabel.tsx b/packages/paste-core/components/pagination/src/PaginationLabel.tsx index b4057e11ae..030b8212af 100644 --- a/packages/paste-core/components/pagination/src/PaginationLabel.tsx +++ b/packages/paste-core/components/pagination/src/PaginationLabel.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Text, safelySpreadTextProps} from '@twilio-paste/text'; import type {PaginationLabelProps} from './types'; -import {PaginationLabelPropTypes} from './proptypes'; const PaginationLabel = React.forwardRef( ({children, element = 'PAGINATION_LABEL', ...props}, ref) => { @@ -25,6 +24,4 @@ const PaginationLabel = React.forwardRef( PaginationLabel.displayName = 'PaginationLabel'; -PaginationLabel.propTypes = PaginationLabelPropTypes; - export {PaginationLabel}; diff --git a/packages/paste-core/components/pagination/src/PaginationNumber.tsx b/packages/paste-core/components/pagination/src/PaginationNumber.tsx index 1256bc257a..a553426538 100644 --- a/packages/paste-core/components/pagination/src/PaginationNumber.tsx +++ b/packages/paste-core/components/pagination/src/PaginationNumber.tsx @@ -3,7 +3,6 @@ import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {Text} from '@twilio-paste/text'; import type {PaginationNumberProps} from './types'; -import {PaginationNumberPropTypes} from './proptypes'; import {handleLinkValidation} from './utils'; const PaginationNumber = React.forwardRef( @@ -69,6 +68,4 @@ const PaginationNumber = React.forwardRef( ({children, element = 'PAGINATION_NUMBERS', pageLabel, ...props}, ref) => { @@ -54,6 +53,4 @@ const PaginationNumbers = React.forwardRef( Paragraph.displayName = 'Paragraph'; -Paragraph.propTypes = { - element: PropTypes.string, - marginBottom: PropTypes.oneOf(['space0']) as PropTypes.Validator<'space0' | null | undefined> | undefined, -}; - export {Paragraph}; diff --git a/packages/paste-core/components/popover/package.json b/packages/paste-core/components/popover/package.json index b9f96a5ab2..16f1d26df6 100644 --- a/packages/paste-core/components/popover/package.json +++ b/packages/paste-core/components/popover/package.json @@ -46,7 +46,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -73,7 +72,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/popover/src/Popover.tsx b/packages/paste-core/components/popover/src/Popover.tsx index ea51b1a5cc..8988b8d175 100644 --- a/packages/paste-core/components/popover/src/Popover.tsx +++ b/packages/paste-core/components/popover/src/Popover.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {Button} from '@twilio-paste/button'; @@ -81,14 +80,5 @@ const Popover = React.forwardRef( } ); -Popover.propTypes = { - 'aria-label': PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - element: PropTypes.string, - i18nDismissLabel: PropTypes.string, - initialFocusRef: PropTypes.object as any, - width: PropTypes.oneOf(['size10', 'size20', 'size30', 'size40', 'size50'] as WidthOptions[]), -}; - Popover.displayName = 'Popover'; export {Popover}; diff --git a/packages/paste-core/components/popover/src/PopoverBadgeButton.tsx b/packages/paste-core/components/popover/src/PopoverBadgeButton.tsx index 0cce3f0369..e0723e2872 100644 --- a/packages/paste-core/components/popover/src/PopoverBadgeButton.tsx +++ b/packages/paste-core/components/popover/src/PopoverBadgeButton.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Badge} from '@twilio-paste/badge'; import {NonModalDialogDisclosurePrimitive} from '@twilio-paste/non-modal-dialog-primitive'; @@ -37,11 +36,5 @@ const PopoverBadgeButton = React.forwardRef( } ); -PopoverButton.propTypes = { - id: PropTypes.string, - children: PropTypes.node.isRequired, - toggle: PropTypes.func, - element: PropTypes.string, -}; - PopoverButton.displayName = 'PopoverButton'; export {PopoverButton}; diff --git a/packages/paste-core/components/product-switcher/package.json b/packages/paste-core/components/product-switcher/package.json index 61c6dd426e..994fa79cd0 100644 --- a/packages/paste-core/components/product-switcher/package.json +++ b/packages/paste-core/components/product-switcher/package.json @@ -49,7 +49,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -79,7 +78,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/product-switcher/src/ProductSwitcher.tsx b/packages/paste-core/components/product-switcher/src/ProductSwitcher.tsx index 1259a8a422..00071a1b87 100644 --- a/packages/paste-core/components/product-switcher/src/ProductSwitcher.tsx +++ b/packages/paste-core/components/product-switcher/src/ProductSwitcher.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {Menu, MenuPropTypes} from '@twilio-paste/menu'; +import {Menu} from '@twilio-paste/menu'; import type {MenuProps} from '@twilio-paste/menu'; export interface ProductSwitcherProps extends MenuProps { @@ -17,5 +17,4 @@ const ProductSwitcher = React.forwardRef( ); ProductSwitcher.displayName = 'ProductSwitcher'; -ProductSwitcher.propTypes = MenuPropTypes; export {ProductSwitcher}; diff --git a/packages/paste-core/components/product-switcher/src/ProductSwitcherButton.tsx b/packages/paste-core/components/product-switcher/src/ProductSwitcherButton.tsx index 8e990b0dfe..a584961e7e 100644 --- a/packages/paste-core/components/product-switcher/src/ProductSwitcherButton.tsx +++ b/packages/paste-core/components/product-switcher/src/ProductSwitcherButton.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {MenuButton, MenuButtonPropTypes} from '@twilio-paste/menu'; +import {MenuButton} from '@twilio-paste/menu'; import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only'; import type {MenuButtonProps} from '@twilio-paste/menu'; import {ProductSwitcherIcon} from '@twilio-paste/icons/esm/ProductSwitcherIcon'; @@ -19,8 +19,5 @@ const ProductSwitcherButton = React.forwardRef { name="product" value="twilio" checked={product === 'twilio'} - onChange={(e) => { + onChange={() => { setProduct('twilio'); }} productName="Twilio" @@ -43,7 +43,7 @@ export const DefaultElementName: StoryFn = () => { name="product" value="segment" checked={product === 'segment'} - onChange={(e) => { + onChange={() => { setProduct('segment'); }} productName="Segment" @@ -55,7 +55,7 @@ export const DefaultElementName: StoryFn = () => { name="product" value="flex" checked={product === 'flex'} - onChange={(e) => { + onChange={() => { setProduct('flex'); }} productName="Flex" @@ -67,7 +67,7 @@ export const DefaultElementName: StoryFn = () => { name="product" value="sendgrid" checked={product === 'sendgrid'} - onChange={(e) => { + onChange={() => { setProduct('sendgrid'); }} productName="SendGrid" @@ -79,7 +79,7 @@ export const DefaultElementName: StoryFn = () => { name="product" value="admin" checked={product === 'admin'} - onChange={(e) => { + onChange={() => { setProduct('admin'); }} productName="Console Admin" @@ -110,7 +110,7 @@ export const CustomElementName: StoryFn = () => { name="product" value="twilio" checked={product === 'twilio'} - onChange={(e) => { + onChange={() => { setProduct('twilio'); }} productName="Twilio" @@ -123,7 +123,7 @@ export const CustomElementName: StoryFn = () => { name="product" value="segment" checked={product === 'segment'} - onChange={(e) => { + onChange={() => { setProduct('segment'); }} productName="Segment" @@ -136,7 +136,7 @@ export const CustomElementName: StoryFn = () => { name="product" value="flex" checked={product === 'flex'} - onChange={(e) => { + onChange={() => { setProduct('flex'); }} productName="Flex" @@ -149,7 +149,7 @@ export const CustomElementName: StoryFn = () => { name="product" value="sendgrid" checked={product === 'sendgrid'} - onChange={(e) => { + onChange={() => { setProduct('sendgrid'); }} productName="SendGrid" @@ -162,7 +162,7 @@ export const CustomElementName: StoryFn = () => { name="product" value="admin" checked={product === 'admin'} - onChange={(e) => { + onChange={() => { setProduct('admin'); }} productName="Console Admin" diff --git a/packages/paste-core/components/product-switcher/stories/ProductSwitcher.stories.tsx b/packages/paste-core/components/product-switcher/stories/ProductSwitcher.stories.tsx index 0d469eeabc..872ff3576b 100644 --- a/packages/paste-core/components/product-switcher/stories/ProductSwitcher.stories.tsx +++ b/packages/paste-core/components/product-switcher/stories/ProductSwitcher.stories.tsx @@ -24,7 +24,7 @@ export const ProductSwitcherMenu: StoryFn = () => { name="product" value="twilio" checked={product === 'twilio'} - onChange={(e) => { + onChange={() => { setProduct('twilio'); }} productName="Twilio" @@ -36,7 +36,7 @@ export const ProductSwitcherMenu: StoryFn = () => { name="product" value="segment" checked={product === 'segment'} - onChange={(e) => { + onChange={() => { setProduct('segment'); }} productName="Segment" @@ -48,7 +48,7 @@ export const ProductSwitcherMenu: StoryFn = () => { name="product" value="flex" checked={product === 'flex'} - onChange={(e) => { + onChange={() => { setProduct('flex'); }} productName="Flex" @@ -60,7 +60,7 @@ export const ProductSwitcherMenu: StoryFn = () => { name="product" value="sendgrid" checked={product === 'sendgrid'} - onChange={(e) => { + onChange={() => { setProduct('sendgrid'); }} productName="SendGrid" @@ -72,7 +72,7 @@ export const ProductSwitcherMenu: StoryFn = () => { name="product" value="admin" checked={product === 'admin'} - onChange={(e) => { + onChange={() => { setProduct('admin'); }} productName="Console Admin" diff --git a/packages/paste-core/components/progress-bar/package.json b/packages/paste-core/components/progress-bar/package.json index 10a250c4fb..1840f1cd55 100644 --- a/packages/paste-core/components/progress-bar/package.json +++ b/packages/paste-core/components/progress-bar/package.json @@ -42,7 +42,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -65,7 +64,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0" } diff --git a/packages/paste-core/components/progress-steps/package.json b/packages/paste-core/components/progress-steps/package.json index 8dd221e152..68a385c24b 100644 --- a/packages/paste-core/components/progress-steps/package.json +++ b/packages/paste-core/components/progress-steps/package.json @@ -37,7 +37,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -55,7 +54,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/progress-steps/src/ProgressStepComplete.tsx b/packages/paste-core/components/progress-steps/src/ProgressStepComplete.tsx index 1af9aadf34..168f5f4e69 100644 --- a/packages/paste-core/components/progress-steps/src/ProgressStepComplete.tsx +++ b/packages/paste-core/components/progress-steps/src/ProgressStepComplete.tsx @@ -1,10 +1,8 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {SuccessIcon as ProgressSuccessIcon} from '@twilio-paste/icons/esm/SuccessIcon'; import type {ProgressStepCompleteProps} from './types'; -import {ProgressStepPropTypes} from './propTypes'; export const ProgressStepComplete = React.forwardRef( ({element = 'PROGRESS_STEP_COMPLETE', as = 'div', children, i18nCompleteLabel = 'Completed', ...props}, ref) => { @@ -44,4 +42,3 @@ export const ProgressStepComplete = React.forwardRef( ({element = 'PROGRESS_STEP_CURRENT', as = 'div', children, i18nCurrentLabel = 'Current', ...props}, ref) => { @@ -45,4 +43,3 @@ export const ProgressStepCurrent = React.forwardRef( ({element = 'PROGRESS_STEP_ERROR', as = 'div', children, i18nErrorLabel = 'Error', ...props}, ref) => { @@ -44,4 +42,3 @@ export const ProgressStepError = React.forwardRef( ( @@ -56,8 +54,3 @@ export const ProgressStepIncomplete = React.forwardRef( RadioButton.displayName = 'RadioButton'; -RadioButton.propTypes = { - id: PropTypes.string, - value: PropTypes.string, - name: PropTypes.string, - checked: PropTypes.bool, - disabled: PropTypes.bool, - hasError: PropTypes.bool, - onChange: PropTypes.func, - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {RadioButton}; diff --git a/packages/paste-core/components/radio-button-group/src/RadioButtonGroup.tsx b/packages/paste-core/components/radio-button-group/src/RadioButtonGroup.tsx index 8e2dcac732..d14f1da089 100644 --- a/packages/paste-core/components/radio-button-group/src/RadioButtonGroup.tsx +++ b/packages/paste-core/components/radio-button-group/src/RadioButtonGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {InlineControlGroupProps} from '@twilio-paste/inline-control-group'; import {HelpText} from '@twilio-paste/help-text'; @@ -99,12 +98,4 @@ const RadioButtonGroup = React.forwardRef( Radio.displayName = 'Radio'; -if (process.env.NODE_ENV === 'development') { - Radio.propTypes = { - id: PropTypes.string, - value: PropTypes.string, - name: PropTypes.string, - checked: PropTypes.bool, - disabled: PropTypes.bool, - hasError: PropTypes.bool, - helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), - onChange: PropTypes.func, - children: PropTypes.node.isRequired, - element: PropTypes.string, - }; -} - export {Radio, HiddenRadio, type HiddenRadioState}; diff --git a/packages/paste-core/components/radio-group/src/RadioGroup.tsx b/packages/paste-core/components/radio-group/src/RadioGroup.tsx index 691551db7d..49f270efa7 100644 --- a/packages/paste-core/components/radio-group/src/RadioGroup.tsx +++ b/packages/paste-core/components/radio-group/src/RadioGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {InlineControlGroup} from '@twilio-paste/inline-control-group'; import type {InlineControlGroupProps} from '@twilio-paste/inline-control-group'; @@ -66,12 +65,4 @@ const RadioGroup = React.forwardRef( RadioGroup.displayName = 'RadioGroup'; -RadioGroup.propTypes = { - name: PropTypes.string.isRequired, - onChange: PropTypes.func, - value: PropTypes.string, - element: PropTypes.string, - i18nRequiredLabel: PropTypes.string, -}; - export {RadioGroup}; diff --git a/packages/paste-core/components/screen-reader-only/package.json b/packages/paste-core/components/screen-reader-only/package.json index 4e99f1fbbf..9d997f7e67 100644 --- a/packages/paste-core/components/screen-reader-only/package.json +++ b/packages/paste-core/components/screen-reader-only/package.json @@ -37,7 +37,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -55,7 +54,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/screen-reader-only/src/index.tsx b/packages/paste-core/components/screen-reader-only/src/index.tsx index c0a185c8b7..b537d18ab6 100644 --- a/packages/paste-core/components/screen-reader-only/src/index.tsx +++ b/packages/paste-core/components/screen-reader-only/src/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -34,11 +33,4 @@ const ScreenReaderOnly = React.forwardRef( ); ScreenReaderOnly.displayName = 'ScreenReaderOnly'; -if (process.env.NODE_ENV === 'development') { - ScreenReaderOnly.propTypes = { - children: PropTypes.node.isRequired, - id: PropTypes.string, - }; -} - export {ScreenReaderOnly}; diff --git a/packages/paste-core/components/select/package.json b/packages/paste-core/components/select/package.json index 0df434b78f..c0fcf17189 100644 --- a/packages/paste-core/components/select/package.json +++ b/packages/paste-core/components/select/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/select/src/Option.tsx b/packages/paste-core/components/select/src/Option.tsx index 112a82a40f..b607483645 100644 --- a/packages/paste-core/components/select/src/Option.tsx +++ b/packages/paste-core/components/select/src/Option.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -40,12 +39,4 @@ const Option = React.forwardRef(({children, elem Option.displayName = 'Option'; -if (process.env.NODE_ENV === 'development') { - Option.propTypes = { - value: PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - element: PropTypes.string, - }; -} - export {Option}; diff --git a/packages/paste-core/components/select/src/OptionGroup.tsx b/packages/paste-core/components/select/src/OptionGroup.tsx index 8290f7579c..a289cd93c5 100644 --- a/packages/paste-core/components/select/src/OptionGroup.tsx +++ b/packages/paste-core/components/select/src/OptionGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -33,12 +32,4 @@ const OptionGroup = React.forwardRef( OptionGroup.displayName = 'OptionGroup'; -if (process.env.NODE_ENV === 'development') { - OptionGroup.propTypes = { - label: PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - element: PropTypes.string, - }; -} - export {OptionGroup}; diff --git a/packages/paste-core/components/select/src/Select.tsx b/packages/paste-core/components/select/src/Select.tsx index 30492787d0..21704f75f0 100644 --- a/packages/paste-core/components/select/src/Select.tsx +++ b/packages/paste-core/components/select/src/Select.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {ChevronDownIcon} from '@twilio-paste/icons/esm/ChevronDownIcon'; import {InputBox, InputChevronWrapper, getInputChevronIconColor} from '@twilio-paste/input-box'; @@ -130,13 +129,4 @@ const Select = React.forwardRef( Select.displayName = 'Select'; -if (process.env.NODE_ENV === 'development') { - Select.propTypes = { - id: PropTypes.string, - hasError: PropTypes.bool, - onChange: PropTypes.func, - element: PropTypes.string, - }; -} - export {Select}; diff --git a/packages/paste-core/components/separator/package.json b/packages/paste-core/components/separator/package.json index 7be2e504f3..393d4b655d 100644 --- a/packages/paste-core/components/separator/package.json +++ b/packages/paste-core/components/separator/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/separator/src/index.tsx b/packages/paste-core/components/separator/src/index.tsx index c0561da1bf..3312d778ae 100644 --- a/packages/paste-core/components/separator/src/index.tsx +++ b/packages/paste-core/components/separator/src/index.tsx @@ -1,12 +1,11 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {Space} from '@twilio-paste/style-props'; -import {isMarginTokenProp} from '@twilio-paste/style-props'; import type {HTMLPasteProps} from '@twilio-paste/types'; type Orientation = 'horizontal' | 'vertical'; + export interface SeparatorProps extends HTMLPasteProps<'hr'>, Pick { id?: never; orientation: Orientation; @@ -42,11 +41,4 @@ const Separator = React.forwardRef( Separator.displayName = 'Separator'; -Separator.propTypes = { - element: PropTypes.string, - orientation: PropTypes.oneOf(['horizontal', 'vertical'] as Orientation[]).isRequired, - horizontalSpacing: isMarginTokenProp, - verticalSpacing: isMarginTokenProp, -}; - export {Separator}; diff --git a/packages/paste-core/components/side-modal/package.json b/packages/paste-core/components/side-modal/package.json index 6584ff46b9..dfb3c5ba99 100644 --- a/packages/paste-core/components/side-modal/package.json +++ b/packages/paste-core/components/side-modal/package.json @@ -46,7 +46,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -73,7 +72,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/side-modal/src/SideModal.tsx b/packages/paste-core/components/side-modal/src/SideModal.tsx index 1372550a91..ccab6ef287 100644 --- a/packages/paste-core/components/side-modal/src/SideModal.tsx +++ b/packages/paste-core/components/side-modal/src/SideModal.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useTransition, animated} from '@twilio-paste/animation-library'; import {Box, safelySpreadBoxProps, type BoxProps} from '@twilio-paste/box'; import {StyledBase} from '@twilio-paste/theme'; @@ -87,9 +86,3 @@ export const SideModal = React.forwardRef( ); SideModal.displayName = 'SideModal'; - -SideModal.propTypes = { - 'aria-label': PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/side-modal/src/SideModalBody.tsx b/packages/paste-core/components/side-modal/src/SideModalBody.tsx index 3d15004d58..7e91f672bb 100644 --- a/packages/paste-core/components/side-modal/src/SideModalBody.tsx +++ b/packages/paste-core/components/side-modal/src/SideModalBody.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -19,10 +18,5 @@ const SideModalBody = React.forwardRef( } ); -SideModalBody.propTypes = { - children: PropTypes.node, - element: PropTypes.string, -}; - SideModalBody.displayName = 'SideModalBody'; export {SideModalBody}; diff --git a/packages/paste-core/components/side-modal/src/SideModalButton.tsx b/packages/paste-core/components/side-modal/src/SideModalButton.tsx index 55f302337b..a723f19f94 100644 --- a/packages/paste-core/components/side-modal/src/SideModalButton.tsx +++ b/packages/paste-core/components/side-modal/src/SideModalButton.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Button} from '@twilio-paste/button'; import type {ButtonProps} from '@twilio-paste/button'; import {NonModalDialogDisclosurePrimitive} from '@twilio-paste/non-modal-dialog-primitive'; @@ -22,11 +21,5 @@ const SideModalButton = React.forwardRef( ); SideModalFooter.displayName = 'SideModalFooter'; -SideModalFooter.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; - export {SideModalFooter}; diff --git a/packages/paste-core/components/side-modal/src/SideModalFooterActions.tsx b/packages/paste-core/components/side-modal/src/SideModalFooterActions.tsx index 849d1c1f78..43d1bbaa5e 100644 --- a/packages/paste-core/components/side-modal/src/SideModalFooterActions.tsx +++ b/packages/paste-core/components/side-modal/src/SideModalFooterActions.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -34,10 +33,4 @@ const SideModalFooterActions = React.forwardRef( SideModalHeader.displayName = 'SideModalHeader'; -SideModalHeader.propTypes = { - children: PropTypes.node, - i18nDismissLabel: PropTypes.string, - element: PropTypes.string, -}; - export {SideModalHeader}; diff --git a/packages/paste-core/components/side-modal/src/SideModalHeading.tsx b/packages/paste-core/components/side-modal/src/SideModalHeading.tsx index fa2f641bbe..196385c39d 100644 --- a/packages/paste-core/components/side-modal/src/SideModalHeading.tsx +++ b/packages/paste-core/components/side-modal/src/SideModalHeading.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Heading} from '@twilio-paste/heading'; import type {HeadingProps} from '@twilio-paste/heading'; import type {BoxElementProps} from '@twilio-paste/box'; @@ -20,10 +19,4 @@ const SideModalHeading = React.forwardRef( } ); Sidebar.displayName = 'Sidebar'; -Sidebar.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - collapsed: PropTypes.bool, - variant: PropTypes.oneOf(['default', 'compact', 'hidden']).isRequired, - mainContentSkipLinkID: PropTypes.string, - sidebarNavigationSkipLinkID: PropTypes.string, - topbarSkipLinkID: PropTypes.string, - i18nMainContentSkipLinkText: PropTypes.string, - i18nNavigationSkipLinkText: PropTypes.string, - i18nTopbarSkipLinkText: PropTypes.string, -}; diff --git a/packages/paste-core/components/sidebar/src/SidebarBetaBadge.tsx b/packages/paste-core/components/sidebar/src/SidebarBetaBadge.tsx index 26b06aa17d..7b5ad5ddbc 100644 --- a/packages/paste-core/components/sidebar/src/SidebarBetaBadge.tsx +++ b/packages/paste-core/components/sidebar/src/SidebarBetaBadge.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {badgeBaseStyles, useResizeChildIcons} from '@twilio-paste/badge'; @@ -42,10 +41,3 @@ export const SidebarBetaBadge = React.forwardRef( } ); SidebarBody.displayName = 'SidebarBody'; -SidebarBody.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/sidebar/src/footer/SidebarCollapseButton.tsx b/packages/paste-core/components/sidebar/src/footer/SidebarCollapseButton.tsx index 934051b58d..2de0df4b1b 100644 --- a/packages/paste-core/components/sidebar/src/footer/SidebarCollapseButton.tsx +++ b/packages/paste-core/components/sidebar/src/footer/SidebarCollapseButton.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Button} from '@twilio-paste/button'; import {Box, type BoxProps} from '@twilio-paste/box'; import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only'; @@ -49,11 +48,4 @@ export const SidebarCollapseButton = React.forwardRef( Spinner.displayName = 'Spinner'; -Spinner.propTypes = { - title: PropTypes.string, - delay: PropTypes.number, - element: PropTypes.string, - size: isIconSizeTokenProp, -}; - export {Spinner}; diff --git a/packages/paste-core/components/status/package.json b/packages/paste-core/components/status/package.json index 333bfc9171..02958d29ae 100644 --- a/packages/paste-core/components/status/package.json +++ b/packages/paste-core/components/status/package.json @@ -49,7 +49,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -79,7 +78,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/status/src/StatusBadge.tsx b/packages/paste-core/components/status/src/StatusBadge.tsx index dd5a45cfe5..f3061ade7f 100644 --- a/packages/paste-core/components/status/src/StatusBadge.tsx +++ b/packages/paste-core/components/status/src/StatusBadge.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {BadgePropTypes, badgeBaseStyles, badgeVariantStyles} from '@twilio-paste/badge'; +import {badgeBaseStyles, badgeVariantStyles} from '@twilio-paste/badge'; import type {BadgeBaseProps, BadgeSpanProps} from '@twilio-paste/badge'; import {StatusObject} from './constants'; @@ -41,9 +40,4 @@ const StatusBadge = React.forwardRef( StatusBadge.displayName = 'StatusBadge'; -StatusBadge.propTypes = { - ...BadgePropTypes, - variant: PropTypes.oneOf(Object.keys(StatusObject) as StatusBadgeVariants[]).isRequired, -}; - export {StatusBadge}; diff --git a/packages/paste-core/components/status/src/StatusMenuBadge.tsx b/packages/paste-core/components/status/src/StatusMenuBadge.tsx index 4c6685bdf1..95423e3f6f 100644 --- a/packages/paste-core/components/status/src/StatusMenuBadge.tsx +++ b/packages/paste-core/components/status/src/StatusMenuBadge.tsx @@ -1,10 +1,8 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; -import {MenuBadgeContent, MenuBadgePropTypes} from '@twilio-paste/menu'; +import {MenuBadgeContent} from '@twilio-paste/menu'; import type {MenuBadgeProps} from '@twilio-paste/menu'; import {StatusBadge} from './StatusBadge'; -import {StatusObject} from './constants'; import type {StatusBadgeProps} from './StatusBadge'; export interface StatusMenuBadgeProps extends Omit { @@ -25,9 +23,4 @@ const StatusMenuBadge = React.forwardRef( ); Switch.displayName = 'Switch'; -Switch.propTypes = { - disabled: PropTypes.bool, - element: PropTypes.string, - id: PropTypes.string, - children: PropTypes.node.isRequired, - name: PropTypes.string, - onChange: PropTypes.func, - hasError: PropTypes.bool, - helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), - defaultChecked: PropTypes.bool, - checked: PropTypes.bool, -}; - export {Switch}; diff --git a/packages/paste-core/components/switch/src/SwitchGroup.tsx b/packages/paste-core/components/switch/src/SwitchGroup.tsx index 320ba76ee5..e33fd46c86 100644 --- a/packages/paste-core/components/switch/src/SwitchGroup.tsx +++ b/packages/paste-core/components/switch/src/SwitchGroup.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {InlineControlGroup} from '@twilio-paste/inline-control-group'; import type {InlineControlGroupProps} from '@twilio-paste/inline-control-group'; @@ -64,17 +63,4 @@ const SwitchGroup = React.forwardRef( SwitchGroup.displayName = 'SwitchGroup'; -if (process.env.NODE_ENV === 'development') { - SwitchGroup.propTypes = { - name: PropTypes.string.isRequired, - element: PropTypes.string, - onChange: PropTypes.func, - disabled: PropTypes.bool, - errorText: PropTypes.string, - helpText: PropTypes.string, - orientation: PropTypes.oneOf(['vertical', 'horizontal']), - i18nRequiredLabel: PropTypes.string, - }; -} - export {SwitchGroup}; diff --git a/packages/paste-core/components/switch/src/SwitchKnob.tsx b/packages/paste-core/components/switch/src/SwitchKnob.tsx index 7d62459b76..407b51753f 100644 --- a/packages/paste-core/components/switch/src/SwitchKnob.tsx +++ b/packages/paste-core/components/switch/src/SwitchKnob.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {SelectedIcon} from '@twilio-paste/icons/esm/SelectedIcon'; @@ -88,13 +87,4 @@ const SwitchKnob = React.forwardRef( SwitchKnob.displayName = 'SwitchKnob'; -SwitchKnob.propTypes = { - disabled: PropTypes.bool, - element: PropTypes.string, - checked: PropTypes.bool, - hasError: PropTypes.bool, - isHovering: PropTypes.bool.isRequired, - height: PropTypes.string.isRequired, -}; - export {SwitchKnob}; diff --git a/packages/paste-core/components/table/package.json b/packages/paste-core/components/table/package.json index 4f613a2a40..b1c2770910 100644 --- a/packages/paste-core/components/table/package.json +++ b/packages/paste-core/components/table/package.json @@ -36,7 +36,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -52,7 +51,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "tsx": "^3.12.10", diff --git a/packages/paste-core/components/table/src/TBody.tsx b/packages/paste-core/components/table/src/TBody.tsx index b07c599d2f..667ad25c7d 100644 --- a/packages/paste-core/components/table/src/TBody.tsx +++ b/packages/paste-core/components/table/src/TBody.tsx @@ -4,7 +4,6 @@ import type {BoxStyleProps} from '@twilio-paste/box'; import {styled, css} from '@twilio-paste/styling-library'; import type {TBodyProps} from './types'; -import {TBodyPropTypes} from './proptypes'; const bodyCellStyles: BoxStyleProps = { borderBottomWidth: 'borderWidth0', @@ -29,6 +28,5 @@ const TBody = React.forwardRef(({element = }); TBody.displayName = 'TBody'; -TBody.propTypes = TBodyPropTypes; export {TBody}; diff --git a/packages/paste-core/components/table/src/TFoot.tsx b/packages/paste-core/components/table/src/TFoot.tsx index 1d5473a21f..6ca39bdf7c 100644 --- a/packages/paste-core/components/table/src/TFoot.tsx +++ b/packages/paste-core/components/table/src/TFoot.tsx @@ -4,7 +4,6 @@ import type {BoxStyleProps} from '@twilio-paste/box'; import {styled, css} from '@twilio-paste/styling-library'; import type {TFootProps} from './types'; -import {TFootPropTypes} from './proptypes'; const footerCellStyles: BoxStyleProps = { borderBottomWidth: 'borderWidth0', @@ -36,6 +35,5 @@ const TFoot = React.forwardRef(({element = }); TFoot.displayName = 'TFoot'; -TFoot.propTypes = TFootPropTypes; export {TFoot}; diff --git a/packages/paste-core/components/table/src/THead.tsx b/packages/paste-core/components/table/src/THead.tsx index 2c8b36fa19..a0d8daec4e 100644 --- a/packages/paste-core/components/table/src/THead.tsx +++ b/packages/paste-core/components/table/src/THead.tsx @@ -4,7 +4,6 @@ import {styled, css} from '@twilio-paste/styling-library'; import type {BoxProps} from '@twilio-paste/box'; import type {THeadProps} from './types'; -import {THeadPropTypes} from './proptypes'; const getStickyStyles = ({stickyHeader}: {stickyHeader: THeadProps['stickyHeader']}): Partial => { if (!stickyHeader) return {}; @@ -41,6 +40,5 @@ const THead = React.forwardRef( ); THead.displayName = 'THead'; -THead.propTypes = THeadPropTypes; export {THead}; diff --git a/packages/paste-core/components/table/src/Table.tsx b/packages/paste-core/components/table/src/Table.tsx index b9ecd3f889..148eb0613d 100644 --- a/packages/paste-core/components/table/src/Table.tsx +++ b/packages/paste-core/components/table/src/Table.tsx @@ -3,7 +3,6 @@ import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {TableContext} from './TableContext'; import type {TableProps} from './types'; -import {TablePropTypes} from './proptypes'; const Table = React.forwardRef( ( @@ -53,6 +52,5 @@ const Table = React.forwardRef( ); Table.displayName = 'Table'; -Table.propTypes = TablePropTypes; export {Table}; diff --git a/packages/paste-core/components/table/src/Td.tsx b/packages/paste-core/components/table/src/Td.tsx index 78470cbd45..a6888ded06 100644 --- a/packages/paste-core/components/table/src/Td.tsx +++ b/packages/paste-core/components/table/src/Td.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {TdProps} from './types'; -import {TdPropTypes} from './proptypes'; const Td = React.forwardRef(({element = 'TD', textAlign = 'left', ...props}, ref) => { return ( @@ -28,6 +27,5 @@ const Td = React.forwardRef(({element = 'TD', tex }); Td.displayName = 'Td'; -Td.propTypes = TdPropTypes; export {Td}; diff --git a/packages/paste-core/components/table/src/Th.tsx b/packages/paste-core/components/table/src/Th.tsx index d9b6a49637..ddb607aac9 100644 --- a/packages/paste-core/components/table/src/Th.tsx +++ b/packages/paste-core/components/table/src/Th.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {ThProps} from './types'; -import {ThPropTypes} from './proptypes'; const Th = React.forwardRef( ({element = 'TH', textAlign = 'left', width, ...props}, ref) => { @@ -34,6 +33,5 @@ const Th = React.forwardRef( ); Th.displayName = 'Th'; -Th.propTypes = ThPropTypes; export {Th}; diff --git a/packages/paste-core/components/table/src/Tr.tsx b/packages/paste-core/components/table/src/Tr.tsx index 38a4da63d2..b03a80fb41 100644 --- a/packages/paste-core/components/table/src/Tr.tsx +++ b/packages/paste-core/components/table/src/Tr.tsx @@ -3,7 +3,6 @@ import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {TableContext} from './TableContext'; import type {TrProps} from './types'; -import {TrPropTypes} from './proptypes'; const Tr = React.forwardRef( ({element = 'TR', verticalAlign = 'middle', ...props}, ref) => { @@ -23,6 +22,5 @@ const Tr = React.forwardRef( ); Tr.displayName = 'Tr'; -Tr.propTypes = TrPropTypes; export {Tr}; diff --git a/packages/paste-core/components/table/src/index.tsx b/packages/paste-core/components/table/src/index.tsx index 0a926615be..f2aebb1996 100644 --- a/packages/paste-core/components/table/src/index.tsx +++ b/packages/paste-core/components/table/src/index.tsx @@ -6,4 +6,3 @@ export {Tr} from './Tr'; export {Td} from './Td'; export {Th} from './Th'; export type {TBodyProps, TFootProps, THeadProps, TableProps, TdProps, ThProps, TrProps} from './types'; -export * from './proptypes'; diff --git a/packages/paste-core/components/table/src/proptypes.ts b/packages/paste-core/components/table/src/proptypes.ts deleted file mode 100644 index 124bcbf967..0000000000 --- a/packages/paste-core/components/table/src/proptypes.ts +++ /dev/null @@ -1,43 +0,0 @@ -import PropTypes from 'prop-types'; -import {isWidthTokenProp} from '@twilio-paste/style-props'; - -import {TableAlignmentObject, TableLayoutObject, TableVariantObject, TableVerticalAlignmentObject} from './constants'; - -export const TablePropTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - isActionable: PropTypes.bool, - scrollHorizontally: PropTypes.bool, - noWrap: PropTypes.bool, - striped: PropTypes.bool, - tableLayout: PropTypes.oneOf(Object.values(TableLayoutObject)), - variant: PropTypes.oneOf(Object.values(TableVariantObject)), -}; - -export const THeadPropTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; -export const TBodyPropTypes = THeadPropTypes; -export const TFootPropTypes = THeadPropTypes; - -export const TrPropTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - verticalAlign: PropTypes.oneOf(Object.values(TableVerticalAlignmentObject)), -}; - -export const ThPropTypes = { - children: PropTypes.node, - element: PropTypes.string, - textAlign: PropTypes.oneOf(Object.values(TableAlignmentObject)), - width: isWidthTokenProp, - colSpan: PropTypes.number, -}; - -export const TdPropTypes = { - colSpan: PropTypes.number, - children: PropTypes.node, - element: PropTypes.string, - textAlign: PropTypes.oneOf(Object.values(TableAlignmentObject)), -}; diff --git a/packages/paste-core/components/tabs/package.json b/packages/paste-core/components/tabs/package.json index bf04c7edeb..f5dfa0ba26 100644 --- a/packages/paste-core/components/tabs/package.json +++ b/packages/paste-core/components/tabs/package.json @@ -38,7 +38,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/tabs/src/Tab.tsx b/packages/paste-core/components/tabs/src/Tab.tsx index 839b8385a4..87b5472af4 100644 --- a/packages/paste-core/components/tabs/src/Tab.tsx +++ b/packages/paste-core/components/tabs/src/Tab.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxStyleProps, BoxProps} from '@twilio-paste/box'; import {TabPrimitive} from '@twilio-paste/tabs-primitive'; @@ -164,12 +163,6 @@ const Tab = React.forwardRef(({children, element, ...t ); }); -Tab.propTypes = { - id: PropTypes.string, - focusable: PropTypes.bool, - disabled: PropTypes.bool, -}; - Tab.displayName = 'Tab'; export {Tab}; diff --git a/packages/paste-core/components/tabs/src/TabList.tsx b/packages/paste-core/components/tabs/src/TabList.tsx index 93553cdc93..1ba93a3a78 100644 --- a/packages/paste-core/components/tabs/src/TabList.tsx +++ b/packages/paste-core/components/tabs/src/TabList.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {TabPrimitiveList} from '@twilio-paste/tabs-primitive'; @@ -63,12 +62,5 @@ const TabList = React.forwardRef(({children, eleme ); }); -TabList.propTypes = { - 'aria-label': PropTypes.string.isRequired, - focusable: PropTypes.bool, - disabled: PropTypes.bool, - element: PropTypes.string, -}; - TabList.displayName = 'TabList'; export {TabList}; diff --git a/packages/paste-core/components/tabs/src/TabPanel.tsx b/packages/paste-core/components/tabs/src/TabPanel.tsx index d5c6a0e33f..4f34660e2e 100644 --- a/packages/paste-core/components/tabs/src/TabPanel.tsx +++ b/packages/paste-core/components/tabs/src/TabPanel.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import {TabPrimitivePanel} from '@twilio-paste/tabs-primitive'; @@ -40,13 +39,5 @@ const TabPanel = React.forwardRef( } ); -if (process.env.NODE_ENV === 'development') { - TabPanel.propTypes = { - element: PropTypes.string, - id: PropTypes.string, - tabId: PropTypes.string, - }; -} - TabPanel.displayName = 'TabPanel'; export {TabPanel}; diff --git a/packages/paste-core/components/tabs/src/TabPanels.tsx b/packages/paste-core/components/tabs/src/TabPanels.tsx index 62ed15847c..bfa907d886 100644 --- a/packages/paste-core/components/tabs/src/TabPanels.tsx +++ b/packages/paste-core/components/tabs/src/TabPanels.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -21,11 +20,5 @@ const TabPanels = React.forwardRef(({children, e ); }); -if (process.env.NODE_ENV === 'development') { - TabPanels.propTypes = { - element: PropTypes.string, - }; -} - TabPanels.displayName = 'TabPanels'; export {TabPanels}; diff --git a/packages/paste-core/components/tabs/src/Tabs.tsx b/packages/paste-core/components/tabs/src/Tabs.tsx index fc9f501e65..7450f5609d 100644 --- a/packages/paste-core/components/tabs/src/Tabs.tsx +++ b/packages/paste-core/components/tabs/src/Tabs.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {BoxProps} from '@twilio-paste/box'; import {Flex} from '@twilio-paste/flex'; import {Box} from '@twilio-paste/box'; @@ -46,13 +45,6 @@ const Tabs = React.forwardRef( } ); -Tabs.propTypes = { - element: PropTypes.string, - selectedId: PropTypes.string, - orientation: PropTypes.oneOf(['horizontal', 'vertical', undefined]), - variant: PropTypes.oneOf(['fitted', 'inverse', 'inverse_fitted', null]), -}; - Tabs.displayName = 'Tabs'; export {Tabs}; diff --git a/packages/paste-core/components/tabs/stories/index.stories.tsx b/packages/paste-core/components/tabs/stories/index.stories.tsx index be7a8d326e..998da302b9 100644 --- a/packages/paste-core/components/tabs/stories/index.stories.tsx +++ b/packages/paste-core/components/tabs/stories/index.stories.tsx @@ -66,8 +66,6 @@ export const HorizontalTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -HorizontalTabs.storyName = 'Horizontal Tabs'; export const FittedTabs = (): JSX.Element => { const selectedId = useUID(); @@ -122,8 +120,6 @@ export const FittedTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -FittedTabs.storyName = 'Fitted Tabs'; export const VerticalTabs = (): JSX.Element => { const selectedId = useUID(); @@ -178,8 +174,6 @@ export const VerticalTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -VerticalTabs.storyName = 'Vertical Tabs'; export const HorizontalInverseTabs = (): JSX.Element => { const selectedId = useUID(); @@ -224,8 +218,6 @@ export const HorizontalInverseTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -HorizontalInverseTabs.storyName = 'Horizontal Inverse Tabs'; export const InverseFittedTabs = (): JSX.Element => { const selectedId = useUID(); @@ -270,8 +262,6 @@ export const InverseFittedTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -InverseFittedTabs.storyName = 'Inverse Fitted Tabs'; export const VerticalInverseTabs = (): JSX.Element => { const selectedId = useUID(); @@ -321,8 +311,6 @@ export const VerticalInverseTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -VerticalInverseTabs.storyName = 'Vertical Inverse Tabs'; const useButtonClickTabState = (uniqueBaseID: string): TabStateReturn => { const tab = useTabState(); @@ -359,8 +347,6 @@ export const StateHookTabs = (): JSX.Element => { ); }; -// @ts-expect-error story -StateHookTabs.storyName = 'State hook example'; export const CenterAlignTabTest = (): JSX.Element => { return ( @@ -382,8 +368,6 @@ export const CenterAlignTabTest = (): JSX.Element => { ); }; -// @ts-expect-error story -CenterAlignTabTest.storyName = 'Testing Center Alignment'; export const CustomHorizontalTabs: StoryFn = (_args, {parameters: {isTestEnvironment}}) => { const currentTheme = useTheme(); diff --git a/packages/paste-core/components/textarea/package.json b/packages/paste-core/components/textarea/package.json index ddc818c631..21a985cba6 100644 --- a/packages/paste-core/components/textarea/package.json +++ b/packages/paste-core/components/textarea/package.json @@ -38,7 +38,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -57,7 +56,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/textarea/src/TextArea.tsx b/packages/paste-core/components/textarea/src/TextArea.tsx index c2e39c9586..0ad435f985 100644 --- a/packages/paste-core/components/textarea/src/TextArea.tsx +++ b/packages/paste-core/components/textarea/src/TextArea.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import TextareaAutosize from '@twilio-paste/react-textarea-autosize-library'; import {styled, css} from '@twilio-paste/styling-library'; import {safelySpreadBoxProps, getCustomElementStyles} from '@twilio-paste/box'; @@ -123,18 +122,4 @@ const TextArea = React.forwardRef( TextArea.displayName = 'TextArea'; -TextArea.propTypes = { - disabled: PropTypes.bool, - element: PropTypes.string, - hasError: PropTypes.bool, - id: PropTypes.string, - name: PropTypes.string, - onBlur: PropTypes.func, - onChange: PropTypes.func, - onFocus: PropTypes.func, - placeholder: PropTypes.string, - readOnly: PropTypes.bool, - required: PropTypes.bool, -}; - export {TextArea}; diff --git a/packages/paste-core/components/time-picker/package.json b/packages/paste-core/components/time-picker/package.json index 92d1ad9bb8..5e653d929a 100644 --- a/packages/paste-core/components/time-picker/package.json +++ b/packages/paste-core/components/time-picker/package.json @@ -47,7 +47,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -72,7 +71,6 @@ "@twilio-paste/utils": "^5.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/time-picker/src/TimePicker.tsx b/packages/paste-core/components/time-picker/src/TimePicker.tsx index 1fc325420c..30b453008f 100644 --- a/packages/paste-core/components/time-picker/src/TimePicker.tsx +++ b/packages/paste-core/components/time-picker/src/TimePicker.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {InputProps} from '@twilio-paste/input'; import {Input} from '@twilio-paste/input'; @@ -14,19 +13,4 @@ const TimePicker = React.forwardRef( TimePicker.displayName = 'TimePicker'; -TimePicker.propTypes = { - disabled: PropTypes.bool, - element: PropTypes.string, - hasError: PropTypes.bool, - id: PropTypes.string, - name: PropTypes.string, - onBlur: PropTypes.func, - onChange: PropTypes.func, - onFocus: PropTypes.func, - placeholder: PropTypes.string, - readOnly: PropTypes.bool, - required: PropTypes.bool, - value: PropTypes.string, -}; - export {TimePicker}; diff --git a/packages/paste-core/components/toast/package.json b/packages/paste-core/components/toast/package.json index 596cba9c55..eccf91a1b5 100644 --- a/packages/paste-core/components/toast/package.json +++ b/packages/paste-core/components/toast/package.json @@ -44,7 +44,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -69,7 +68,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/toast/src/ErrorToast.tsx b/packages/paste-core/components/toast/src/ErrorToast.tsx index 8ebf027f0d..6e5d638755 100644 --- a/packages/paste-core/components/toast/src/ErrorToast.tsx +++ b/packages/paste-core/components/toast/src/ErrorToast.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ToastPropTypes} from './propTypes'; import type {ToastProps} from './types'; const ErrorToast = React.forwardRef(({element = 'TOAST', variant, ...props}, ref) => { @@ -28,6 +27,4 @@ const ErrorToast = React.forwardRef(({element = 'TOA ErrorToast.displayName = 'ErrorToast'; -ErrorToast.propTypes = ToastPropTypes; - export {ErrorToast}; diff --git a/packages/paste-core/components/toast/src/NeutralToast.tsx b/packages/paste-core/components/toast/src/NeutralToast.tsx index 411de54521..b5792b3446 100644 --- a/packages/paste-core/components/toast/src/NeutralToast.tsx +++ b/packages/paste-core/components/toast/src/NeutralToast.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ToastPropTypes} from './propTypes'; import type {ToastProps} from './types'; const NeutralToast = React.forwardRef(({element = 'TOAST', variant, ...props}, ref) => { @@ -28,6 +27,4 @@ const NeutralToast = React.forwardRef(({element = 'T NeutralToast.displayName = 'NeutralToast'; -NeutralToast.propTypes = ToastPropTypes; - export {NeutralToast}; diff --git a/packages/paste-core/components/toast/src/SuccessToast.tsx b/packages/paste-core/components/toast/src/SuccessToast.tsx index 380abffb63..32d9418e22 100644 --- a/packages/paste-core/components/toast/src/SuccessToast.tsx +++ b/packages/paste-core/components/toast/src/SuccessToast.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ToastPropTypes} from './propTypes'; import type {ToastProps} from './types'; const SuccessToast = React.forwardRef(({element = 'TOAST', variant, ...props}, ref) => { @@ -28,6 +27,4 @@ const SuccessToast = React.forwardRef(({element = 'T SuccessToast.displayName = 'SuccessToast'; -SuccessToast.propTypes = ToastPropTypes; - export {SuccessToast}; diff --git a/packages/paste-core/components/toast/src/Toast.tsx b/packages/paste-core/components/toast/src/Toast.tsx index 3d04cfd561..da073fd3ae 100644 --- a/packages/paste-core/components/toast/src/Toast.tsx +++ b/packages/paste-core/components/toast/src/Toast.tsx @@ -12,7 +12,6 @@ import {ErrorToast} from './ErrorToast'; import {NeutralToast} from './NeutralToast'; import {SuccessToast} from './SuccessToast'; import {WarningToast} from './WarningToast'; -import {ToastPropTypes} from './propTypes'; import type {ToastProps, ToastVariants} from './types'; import {ToastVariantObject} from './constants'; @@ -132,6 +131,4 @@ const Toast = React.forwardRef( Toast.displayName = 'Toast'; -Toast.propTypes = ToastPropTypes; - export {Toast}; diff --git a/packages/paste-core/components/toast/src/ToastContainer.tsx b/packages/paste-core/components/toast/src/ToastContainer.tsx index ca22b1f127..7bf8f4d662 100644 --- a/packages/paste-core/components/toast/src/ToastContainer.tsx +++ b/packages/paste-core/components/toast/src/ToastContainer.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import {Stack} from '@twilio-paste/stack'; import {ToastPortal} from './ToastPortal'; -import {ToastContainerPropTypes} from './propTypes'; import type {ToastContainerProps} from './types'; const ToastContainer = React.forwardRef(({children, ...props}, ref) => { @@ -17,6 +16,4 @@ const ToastContainer = React.forwardRef(({c ToastContainer.displayName = 'ToastContainer'; -ToastContainer.propTypes = ToastContainerPropTypes; - export {ToastContainer}; diff --git a/packages/paste-core/components/toast/src/ToastPortal.tsx b/packages/paste-core/components/toast/src/ToastPortal.tsx index 353c515e43..60afd78737 100644 --- a/packages/paste-core/components/toast/src/ToastPortal.tsx +++ b/packages/paste-core/components/toast/src/ToastPortal.tsx @@ -3,7 +3,6 @@ import {StyledBase} from '@twilio-paste/theme'; import {Portal} from '@twilio-paste/reakit-library'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ToastPortalPropTypes} from './propTypes'; import type {ToastPortalProps} from './types'; const ToastPortal = React.forwardRef(({children, left, ...props}, ref) => { @@ -29,8 +28,4 @@ const ToastPortal = React.forwardRef(({childre ToastPortal.displayName = 'ToastPortal'; -if (process.env.NODE_ENV === 'development') { - ToastPortal.propTypes = ToastPortalPropTypes; -} - export {ToastPortal}; diff --git a/packages/paste-core/components/toast/src/Toaster.tsx b/packages/paste-core/components/toast/src/Toaster.tsx index d6eaace7d3..93bef8e557 100644 --- a/packages/paste-core/components/toast/src/Toaster.tsx +++ b/packages/paste-core/components/toast/src/Toaster.tsx @@ -5,7 +5,6 @@ import {Box} from '@twilio-paste/box'; import {Toast} from './Toast'; import {ToastPortal} from './ToastPortal'; -import {ToasterPropTypes} from './propTypes'; import type {ToasterProps} from './types'; export const AnimatedToast = animated(Box); @@ -132,6 +131,4 @@ const Toaster: React.FC> = ({toasts, pop, Toaster.displayName = 'Toaster'; -Toaster.propTypes = ToasterPropTypes; - export {Toaster}; diff --git a/packages/paste-core/components/toast/src/WarningToast.tsx b/packages/paste-core/components/toast/src/WarningToast.tsx index 5c8731499b..becf3a0913 100644 --- a/packages/paste-core/components/toast/src/WarningToast.tsx +++ b/packages/paste-core/components/toast/src/WarningToast.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ToastPropTypes} from './propTypes'; import type {ToastProps} from './types'; const WarningToast = React.forwardRef(({element = 'TOAST', variant, ...props}, ref) => { @@ -28,6 +27,4 @@ const WarningToast = React.forwardRef(({element = 'T WarningToast.displayName = 'WarningToast'; -WarningToast.propTypes = ToastPropTypes; - export {WarningToast}; diff --git a/packages/paste-core/components/toast/src/propTypes.ts b/packages/paste-core/components/toast/src/propTypes.ts deleted file mode 100644 index 7a9dfa809b..0000000000 --- a/packages/paste-core/components/toast/src/propTypes.ts +++ /dev/null @@ -1,35 +0,0 @@ -import PropTypes from 'prop-types'; - -import {ToastVariantObject} from './constants'; - -export const ToastPropTypes = { - children: PropTypes.node.isRequired, - onDismiss: PropTypes.func, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - variant: PropTypes.oneOf(['error', 'neutral', 'success', 'warning']) as any, - i18nDismissLabel: PropTypes.string, - i18nErrorLabel: PropTypes.string, - i18nNeutralLabel: PropTypes.string, - i18nSuccessLabel: PropTypes.string, - i18nWarningLabel: PropTypes.string, -}; - -export const ToastPortalPropTypes = { - children: PropTypes.node.isRequired, -}; - -export const ToastContainerPropTypes = { - children: PropTypes.node.isRequired, -}; - -export const ToasterPropTypes = { - toasts: PropTypes.arrayOf( - PropTypes.shape({ - id: PropTypes.string.isRequired, - message: PropTypes.node.isRequired, - setFocus: PropTypes.bool, - variant: PropTypes.oneOf(Object.values(ToastVariantObject)).isRequired, - }) - ).isRequired as any, - pop: PropTypes.func.isRequired, -}; diff --git a/packages/paste-core/components/tooltip/package.json b/packages/paste-core/components/tooltip/package.json index 2eecb14173..9e75c8f38c 100644 --- a/packages/paste-core/components/tooltip/package.json +++ b/packages/paste-core/components/tooltip/package.json @@ -41,7 +41,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -63,7 +62,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/tooltip/src/index.tsx b/packages/paste-core/components/tooltip/src/index.tsx index dd86aa12f5..3997a1a8fd 100644 --- a/packages/paste-core/components/tooltip/src/index.tsx +++ b/packages/paste-core/components/tooltip/src/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useUID} from '@twilio-paste/uid-library'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; @@ -78,14 +77,6 @@ const Tooltip = React.forwardRef( } ); -if (process.env.NODE_ENV === 'development') { - Tooltip.propTypes = { - children: PropTypes.element.isRequired, - text: PropTypes.string.isRequired, - element: PropTypes.string, - }; -} - Tooltip.displayName = 'Tooltip'; export {Tooltip}; diff --git a/packages/paste-core/components/topbar/package.json b/packages/paste-core/components/topbar/package.json index 2955b66928..07c818a547 100644 --- a/packages/paste-core/components/topbar/package.json +++ b/packages/paste-core/components/topbar/package.json @@ -48,7 +48,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -77,7 +76,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/topbar/src/Topbar.tsx b/packages/paste-core/components/topbar/src/Topbar.tsx index 0fd64d7bb4..27de2ef96e 100644 --- a/packages/paste-core/components/topbar/src/Topbar.tsx +++ b/packages/paste-core/components/topbar/src/Topbar.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -41,9 +40,3 @@ export const Topbar = React.forwardRef( } ); Topbar.displayName = 'Topbar'; - -Topbar.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - id: PropTypes.string.isRequired, -}; diff --git a/packages/paste-core/components/topbar/src/TopbarActions.tsx b/packages/paste-core/components/topbar/src/TopbarActions.tsx index 881838a30d..cda9e5f59d 100644 --- a/packages/paste-core/components/topbar/src/TopbarActions.tsx +++ b/packages/paste-core/components/topbar/src/TopbarActions.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxElementProps} from '@twilio-paste/box'; import type {ResponsiveValue} from '@twilio-paste/styling-library'; @@ -33,10 +32,4 @@ const TopbarActions = React.forwardRef( ); TopbarActions.displayName = 'TopbarActions'; -TopbarActions.propTypes = { - children: PropTypes.node.isRequired, - element: PropTypes.string, - justify: PropTypes.oneOf(['start', 'end'] as Justify[]), -}; - export {TopbarActions}; diff --git a/packages/paste-core/components/truncate/package.json b/packages/paste-core/components/truncate/package.json index c49b10f144..d9dd1cdfda 100644 --- a/packages/paste-core/components/truncate/package.json +++ b/packages/paste-core/components/truncate/package.json @@ -37,7 +37,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -55,7 +54,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/truncate/src/index.tsx b/packages/paste-core/components/truncate/src/index.tsx index 20a417f5da..2e4eb8d2ea 100644 --- a/packages/paste-core/components/truncate/src/index.tsx +++ b/packages/paste-core/components/truncate/src/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -29,9 +28,4 @@ const Truncate = React.forwardRef(({children, .. }); Truncate.displayName = 'Truncate'; -Truncate.propTypes = { - children: PropTypes.node.isRequired, - title: PropTypes.string.isRequired, -}; - export {Truncate}; diff --git a/packages/paste-core/components/user-dialog/package.json b/packages/paste-core/components/user-dialog/package.json index f109ba59d8..95a6320f04 100644 --- a/packages/paste-core/components/user-dialog/package.json +++ b/packages/paste-core/components/user-dialog/package.json @@ -48,7 +48,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -77,7 +76,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/components/user-dialog/src/UserDialog.tsx b/packages/paste-core/components/user-dialog/src/UserDialog.tsx index ecc733e0d5..e5a83747a5 100644 --- a/packages/paste-core/components/user-dialog/src/UserDialog.tsx +++ b/packages/paste-core/components/user-dialog/src/UserDialog.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import {Avatar} from '@twilio-paste/avatar'; import {Button} from '@twilio-paste/button'; @@ -93,9 +92,3 @@ export const UserDialog = React.forwardRef( } ); UserDialog.displayName = 'UserDialog'; - -UserDialog.propTypes = { - 'aria-label': PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - element: PropTypes.string, -}; diff --git a/packages/paste-core/components/user-dialog/src/UserDialogContainer.tsx b/packages/paste-core/components/user-dialog/src/UserDialogContainer.tsx index e639b2e0c0..4d8a4069dd 100644 --- a/packages/paste-core/components/user-dialog/src/UserDialogContainer.tsx +++ b/packages/paste-core/components/user-dialog/src/UserDialogContainer.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useNonModalDialogPrimitiveState} from '@twilio-paste/non-modal-dialog-primitive'; import type { NonModalDialogPrimitiveStateReturn, @@ -36,15 +35,6 @@ export const UserDialogContainer: React.FC = ({ }; UserDialogContainer.displayName = 'UserDialogContainer'; -UserDialogContainer.propTypes = { - name: PropTypes.string.isRequired, - src: PropTypes.string, - icon: (props) => { - if (typeof props.icon !== 'function') new Error('[Paste User Dialog]: icon prop must be a Paste Icon'); - return null; - }, -}; - export const useUserDialogState = ( props?: NonModalDialogPrimitivePopoverInitialState ): NonModalDialogPrimitiveStateReturn => { diff --git a/packages/paste-core/components/user-dialog/src/UserDialogList.tsx b/packages/paste-core/components/user-dialog/src/UserDialogList.tsx index 84a5c58be2..5a763a301a 100644 --- a/packages/paste-core/components/user-dialog/src/UserDialogList.tsx +++ b/packages/paste-core/components/user-dialog/src/UserDialogList.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {ListboxPrimitiveInitialState, ListboxPrimitiveStateReturn} from '@twilio-paste/listbox-primitive'; import {useListboxPrimitiveState, ListboxPrimitive} from '@twilio-paste/listbox-primitive'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; @@ -33,10 +32,6 @@ export const UserDialogList = React.forwardRef { return useListboxPrimitiveState({...props, orientation: 'vertical'}); }; diff --git a/packages/paste-core/components/user-dialog/src/UserDialogListItem.tsx b/packages/paste-core/components/user-dialog/src/UserDialogListItem.tsx index 71d5ebe4ae..0e4957bb77 100644 --- a/packages/paste-core/components/user-dialog/src/UserDialogListItem.tsx +++ b/packages/paste-core/components/user-dialog/src/UserDialogListItem.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {ListboxPrimitiveItem} from '@twilio-paste/listbox-primitive'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; @@ -59,7 +58,3 @@ export const UserDialogListItem = React.forwardRef((props, r AspectRatio.displayName = 'AspectRatio'; -if (process.env.NODE_ENV === 'development') { - AspectRatio.propTypes = { - children: PropTypes.node.isRequired, - ratio: PropTypes.string.isRequired, - }; -} - export {AspectRatio}; diff --git a/packages/paste-core/layout/flex/package.json b/packages/paste-core/layout/flex/package.json index 5877b2b326..5d5c8b4627 100644 --- a/packages/paste-core/layout/flex/package.json +++ b/packages/paste-core/layout/flex/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/layout/flex/src/index.tsx b/packages/paste-core/layout/flex/src/index.tsx index 13520d29e8..0d337caaab 100644 --- a/packages/paste-core/layout/flex/src/index.tsx +++ b/packages/paste-core/layout/flex/src/index.tsx @@ -1,17 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import { - ResponsiveProp, - isWidthTokenProp, - isMinWidthTokenProp, - isMaxWidthTokenProp, - isHeightTokenProp, - isMinHeightTokenProp, - isMaxHeightTokenProp, - isPaddingTokenProp, - isMarginTokenProp, -} from '@twilio-paste/style-props'; import type {FlexboxProps} from '@twilio-paste/style-props'; import type {FlexProps} from './types'; @@ -140,40 +128,6 @@ Flex.defaultProps = { display: 'flex', }; -Flex.propTypes = { - as: PropTypes.string as any, - display: ResponsiveProp(PropTypes.oneOf(['flex', 'inline-flex'])), - element: PropTypes.string, - vertical: ResponsiveProp(PropTypes.bool), - vAlignContent: ResponsiveProp(PropTypes.oneOf(['top', 'center', 'bottom', 'stretch'])), - hAlignContent: ResponsiveProp(PropTypes.oneOf(['left', 'center', 'right', 'around', 'between'])), - grow: ResponsiveProp(PropTypes.oneOfType([PropTypes.bool, PropTypes.number])), - shrink: ResponsiveProp(PropTypes.oneOfType([PropTypes.bool, PropTypes.number])), - basis: ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), - wrap: ResponsiveProp(PropTypes.bool), - width: isWidthTokenProp, - minWidth: isMinWidthTokenProp, - maxWidth: isMaxWidthTokenProp, - height: isHeightTokenProp, - minHeight: isMinHeightTokenProp, - maxHeight: isMaxHeightTokenProp, - size: isWidthTokenProp, - margin: isMarginTokenProp, - marginTop: isMarginTokenProp, - marginRight: isMarginTokenProp, - marginBottom: isMarginTokenProp, - marginLeft: isMarginTokenProp, - marginX: isMarginTokenProp, - marginY: isMarginTokenProp, - padding: isPaddingTokenProp, - paddingTop: isPaddingTokenProp, - paddingRight: isPaddingTokenProp, - paddingBottom: isPaddingTokenProp, - paddingLeft: isPaddingTokenProp, - paddingX: isPaddingTokenProp, - paddingY: isPaddingTokenProp, -}; - export {Flex}; export * from './types'; diff --git a/packages/paste-core/layout/grid/package.json b/packages/paste-core/layout/grid/package.json index 4dc4bdef62..32e0121139 100644 --- a/packages/paste-core/layout/grid/package.json +++ b/packages/paste-core/layout/grid/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/layout/grid/src/Column.tsx b/packages/paste-core/layout/grid/src/Column.tsx index f78f3dd255..47b1caca58 100644 --- a/packages/paste-core/layout/grid/src/Column.tsx +++ b/packages/paste-core/layout/grid/src/Column.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; -import {ResponsiveProp} from '@twilio-paste/style-props'; import type {Space} from '@twilio-paste/style-props'; import type {ColumnProps, ColumnStyleProps} from './types'; @@ -53,11 +51,4 @@ const Column = React.forwardRef( Column.displayName = 'Column'; -Column.propTypes = { - as: PropTypes.string as any, - element: PropTypes.string, - offset: ResponsiveProp(PropTypes.number), - span: ResponsiveProp(PropTypes.number), -}; - export {Column}; diff --git a/packages/paste-core/layout/grid/src/Grid.tsx b/packages/paste-core/layout/grid/src/Grid.tsx index 9f6b59c1af..6f862ff96a 100644 --- a/packages/paste-core/layout/grid/src/Grid.tsx +++ b/packages/paste-core/layout/grid/src/Grid.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import type {MarginProps, Space} from '@twilio-paste/style-props'; -import {ResponsiveProp} from '@twilio-paste/style-props'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {ColumnProps, GridProps} from './types'; @@ -85,12 +83,4 @@ const Grid = React.forwardRef( Grid.displayName = 'Grid'; -Grid.propTypes = { - as: PropTypes.string as any, - children: PropTypes.node.isRequired, - equalColumnHeights: PropTypes.bool, - element: PropTypes.string, - vertical: ResponsiveProp(PropTypes.bool), -}; - export {Grid}; diff --git a/packages/paste-core/layout/media-object/package.json b/packages/paste-core/layout/media-object/package.json index c1525990db..6b9623f173 100644 --- a/packages/paste-core/layout/media-object/package.json +++ b/packages/paste-core/layout/media-object/package.json @@ -35,7 +35,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -51,7 +50,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/layout/media-object/src/MediaBody.tsx b/packages/paste-core/layout/media-object/src/MediaBody.tsx index ea08224e21..cf5e9b143f 100644 --- a/packages/paste-core/layout/media-object/src/MediaBody.tsx +++ b/packages/paste-core/layout/media-object/src/MediaBody.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -20,8 +19,4 @@ const MediaBody = React.forwardRef( MediaBody.displayName = 'MediaBody'; -MediaBody.propTypes = { - children: PropTypes.node.isRequired, -}; - export {MediaBody}; diff --git a/packages/paste-core/layout/media-object/src/MediaFigure.tsx b/packages/paste-core/layout/media-object/src/MediaFigure.tsx index 7667c9e90b..9b73e28760 100644 --- a/packages/paste-core/layout/media-object/src/MediaFigure.tsx +++ b/packages/paste-core/layout/media-object/src/MediaFigure.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; -import {isMarginTokenProp} from '@twilio-paste/style-props'; import type {Space} from '@twilio-paste/style-props'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -33,10 +31,4 @@ const MediaFigure = React.forwardRef( MediaFigure.displayName = 'MediaFigure'; -MediaFigure.propTypes = { - align: PropTypes.oneOf(['start', 'end']), - children: PropTypes.node.isRequired, - spacing: isMarginTokenProp, -}; - export {MediaFigure}; diff --git a/packages/paste-core/layout/media-object/src/MediaObject.tsx b/packages/paste-core/layout/media-object/src/MediaObject.tsx index a55b138ff3..696d78a7a2 100644 --- a/packages/paste-core/layout/media-object/src/MediaObject.tsx +++ b/packages/paste-core/layout/media-object/src/MediaObject.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; import type {BoxProps} from '@twilio-paste/box'; import type {HTMLPasteProps} from '@twilio-paste/types'; @@ -35,9 +34,4 @@ const MediaObject = React.forwardRef( MediaObject.displayName = 'MediaObject'; -MediaObject.propTypes = { - children: PropTypes.node.isRequired, - verticalAlign: PropTypes.oneOf(['center', 'top']), -}; - export {MediaObject}; diff --git a/packages/paste-core/layout/stack/package.json b/packages/paste-core/layout/stack/package.json index ed8c38fa8c..738b0f5a81 100644 --- a/packages/paste-core/layout/stack/package.json +++ b/packages/paste-core/layout/stack/package.json @@ -36,7 +36,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -53,7 +52,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/layout/stack/src/index.tsx b/packages/paste-core/layout/stack/src/index.tsx index 48903736bc..28117f4352 100644 --- a/packages/paste-core/layout/stack/src/index.tsx +++ b/packages/paste-core/layout/stack/src/index.tsx @@ -1,9 +1,7 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {useUIDSeed} from '@twilio-paste/uid-library'; import type {ResponsiveValue} from '@twilio-paste/styling-library'; import type {LayoutProps, FlexboxProps, MarginProps, SpaceOptions} from '@twilio-paste/style-props'; -import {isSpaceTokenProp, ResponsiveProp} from '@twilio-paste/style-props'; import type {BoxElementProps} from '@twilio-paste/box'; import {Box, safelySpreadBoxProps} from '@twilio-paste/box'; @@ -108,10 +106,4 @@ const Stack = React.forwardRef( Stack.displayName = 'Stack'; -Stack.propTypes = { - orientation: ResponsiveProp(PropTypes.oneOf(['horizontal', 'vertical'])).isRequired, - spacing: isSpaceTokenProp, - element: PropTypes.string, -}; - export {Stack}; diff --git a/packages/paste-core/primitives/box/__fixtures__/CustomizableBox.tsx b/packages/paste-core/primitives/box/__fixtures__/CustomizableBox.tsx index 9834e069f9..af0d0acc46 100644 --- a/packages/paste-core/primitives/box/__fixtures__/CustomizableBox.tsx +++ b/packages/paste-core/primitives/box/__fixtures__/CustomizableBox.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; - import {Box} from '../src'; import type {BoxStyleProps} from '../src'; diff --git a/packages/paste-core/primitives/box/package.json b/packages/paste-core/primitives/box/package.json index 5a98beabd0..678502314e 100644 --- a/packages/paste-core/primitives/box/package.json +++ b/packages/paste-core/primitives/box/package.json @@ -37,7 +37,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -52,7 +51,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/primitives/combobox/package.json b/packages/paste-core/primitives/combobox/package.json index b4064072ab..d39ab8796a 100644 --- a/packages/paste-core/primitives/combobox/package.json +++ b/packages/paste-core/primitives/combobox/package.json @@ -25,13 +25,11 @@ }, "peerDependencies": { "@twilio-paste/dropdown-library": "^3.0.0", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, "devDependencies": { "@twilio-paste/dropdown-library": "^3.0.0", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/primitives/disclosure/package.json b/packages/paste-core/primitives/disclosure/package.json index cfb777edaa..ff3b79672b 100644 --- a/packages/paste-core/primitives/disclosure/package.json +++ b/packages/paste-core/primitives/disclosure/package.json @@ -25,13 +25,11 @@ }, "peerDependencies": { "@twilio-paste/reakit-library": "^2.0.0", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, "devDependencies": { "@twilio-paste/reakit-library": "^2.0.0", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/primitives/sibling-box/package.json b/packages/paste-core/primitives/sibling-box/package.json index eec006fe6e..3af35b49b5 100644 --- a/packages/paste-core/primitives/sibling-box/package.json +++ b/packages/paste-core/primitives/sibling-box/package.json @@ -36,7 +36,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -53,7 +52,6 @@ "@twilio-paste/uid-library": "^2.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "typescript": "^4.9.4" diff --git a/packages/paste-core/primitives/sibling-box/src/index.tsx b/packages/paste-core/primitives/sibling-box/src/index.tsx index be5274a0ed..390123444d 100644 --- a/packages/paste-core/primitives/sibling-box/src/index.tsx +++ b/packages/paste-core/primitives/sibling-box/src/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; import {styled, css} from '@twilio-paste/styling-library'; import {Box} from '@twilio-paste/box'; import type {BoxProps, BoxStyleProps} from '@twilio-paste/box'; @@ -117,8 +116,4 @@ const SiblingBox = React.forwardRef { - it('should return correctly based on passed props', (): void => { - const mockProps = { - marginTop: '2px', // bad - marginRight: 'space20', // good - marginBottom: ['space20', '0px'], // bad - marginLeft: ['space20', 'space30'], // good - }; - // Shorthand call function - const run = (prop: string): Error | null => isSpaceTokenProp(mockProps, prop, mockComponentName); - - expect(run('marginTop') instanceof Error).toBe(true); - expect(run('marginRight') == null).toBe(true); - expect(run('marginBottom') instanceof Error).toBe(true); - expect(run('marginLeft') == null).toBe(true); - }); -}); diff --git a/packages/paste-style-props/__tests__/responsivePropValidator.test.ts b/packages/paste-style-props/__tests__/responsivePropValidator.test.ts deleted file mode 100644 index 582d26316c..0000000000 --- a/packages/paste-style-props/__tests__/responsivePropValidator.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import PropTypes from 'prop-types'; - -import {ResponsiveProp} from '../src/proptypes/utils/responsivePropValidator'; - -const isDimensionProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); - -const mockPropTypes = {width: isDimensionProp}; -const mockComponentName = 'TestComponent'; - -/* - * prop-types recommends testing with checkPropTypes and not by running the validator directly - * https://github.com/facebook/prop-types/blob/main/README.md#proptypescheckproptypes - */ -const run = (props: Record): void => - PropTypes.checkPropTypes(mockPropTypes, props, 'prop', mockComponentName); - -describe('responsivePropValidator', () => { - it('should return correctly based on the passed props', () => { - const spy = jest.spyOn(console, 'error').mockImplementation(() => {}); - - run({width: '100%'}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(0); - - run({width: 50}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(0); - - run({width: ['100%', 50]}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(0); - - run({width: true}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(1); - // PropTypes.checkPropTypes only errors a message once, so need to clear it after each invalid proptype - PropTypes.resetWarningCache(); - - run({width: [true, false]}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(2); - // PropTypes.checkPropTypes only errors a message once, so need to clear it after each invalid proptype - PropTypes.resetWarningCache(); - - run({width: {foo: 'inherit'}}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(3); - // PropTypes.checkPropTypes only errors a message once, so need to clear it after each invalid proptype - PropTypes.resetWarningCache(); - - run({width: [['foo'], []]}); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledTimes(4); - // PropTypes.checkPropTypes only errors a message once, so need to clear it after each invalid proptype - PropTypes.resetWarningCache(); - - spy.mockRestore(); - }); -}); diff --git a/packages/paste-style-props/package.json b/packages/paste-style-props/package.json index cc93e05d19..ae158ed17e 100644 --- a/packages/paste-style-props/package.json +++ b/packages/paste-style-props/package.json @@ -34,7 +34,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^16.8.6 || ^17.0.2 || ^18.0.27", "@types/react-dom": "^16.8.6 || ^17.0.2 || ^18.0.10", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -47,7 +46,6 @@ "@twilio-paste/types": "^6.0.0", "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0" } diff --git a/packages/paste-style-props/src/index.ts b/packages/paste-style-props/src/index.ts index 305c9e4ab8..7de1ffec3f 100644 --- a/packages/paste-style-props/src/index.ts +++ b/packages/paste-style-props/src/index.ts @@ -10,5 +10,3 @@ export * from './typography'; // TS types export * from './types'; -// PropTypes -export * from './proptypes'; diff --git a/packages/paste-style-props/src/proptypes/background.ts b/packages/paste-style-props/src/proptypes/background.ts deleted file mode 100644 index b85a16b8d3..0000000000 --- a/packages/paste-style-props/src/proptypes/background.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const BackgroundColorOptions = ['none', 'transparent', ...Object.keys(DefaultTheme.backgroundColors)]; - -export const isBackgroundColorTokenProp = propValidator(BackgroundColorOptions); diff --git a/packages/paste-style-props/src/proptypes/border.ts b/packages/paste-style-props/src/proptypes/border.ts deleted file mode 100644 index 488659158f..0000000000 --- a/packages/paste-style-props/src/proptypes/border.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const BorderRadiusOptions = Object.keys(DefaultTheme.radii); -const BorderWidthOptions = Object.keys(DefaultTheme.borderWidths); -const BorderColorOptions = ['transparent', ...Object.keys(DefaultTheme.borderColors)]; - -export const isBorderRadiusTokenProp = propValidator(BorderRadiusOptions); -export const isBorderWidthTokenProp = propValidator(BorderWidthOptions); -export const isBorderColorTokenProp = propValidator(BorderColorOptions); diff --git a/packages/paste-style-props/src/proptypes/helpers.ts b/packages/paste-style-props/src/proptypes/helpers.ts deleted file mode 100644 index 1266e62675..0000000000 --- a/packages/paste-style-props/src/proptypes/helpers.ts +++ /dev/null @@ -1,3 +0,0 @@ -import PropTypes from 'prop-types'; - -export const StyleResetProp = PropTypes.oneOf(['none', 'inherit', 'initial', 'unset']); diff --git a/packages/paste-style-props/src/proptypes/index.ts b/packages/paste-style-props/src/proptypes/index.ts deleted file mode 100644 index d941847137..0000000000 --- a/packages/paste-style-props/src/proptypes/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -export {isBackgroundColorTokenProp} from './background'; -export {isBorderColorTokenProp, isBorderRadiusTokenProp, isBorderWidthTokenProp} from './border'; -export { - isHeightTokenProp, - isMaxHeightTokenProp, - isMinHeightTokenProp, - isWidthTokenProp, - isMaxWidthTokenProp, - isMinWidthTokenProp, - isIconSizeTokenProp, -} from './layout'; -export {isZIndexTokenProp} from './position'; -export {isBoxShadowTokenProp} from './shadow'; -export {isSpaceTokenProp, isMarginTokenProp, isPaddingTokenProp, isGapTokenProp} from './space'; -export { - isFontFamilyTokenProp, - isFontSizeTokenProp, - isFontWeightTokenProp, - isLineHeightTokenProp, - isTextColorTokenProp, -} from './typography'; -export {StyleResetProp} from './helpers'; -export {ResponsiveProp} from './utils/responsivePropValidator'; diff --git a/packages/paste-style-props/src/proptypes/layout.ts b/packages/paste-style-props/src/proptypes/layout.ts deleted file mode 100644 index 4a2b377eb8..0000000000 --- a/packages/paste-style-props/src/proptypes/layout.ts +++ /dev/null @@ -1,16 +0,0 @@ -import PropTypes from 'prop-types'; -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; -import {ResponsiveProp} from './utils/responsivePropValidator'; - -// Tokens -const IconSizeOptions = Object.keys(DefaultTheme.iconSizes); - -export const isWidthTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isMinWidthTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isMaxWidthTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isHeightTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isMinHeightTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isMaxHeightTokenProp = ResponsiveProp(PropTypes.oneOfType([PropTypes.string, PropTypes.number])); -export const isIconSizeTokenProp = propValidator(IconSizeOptions); diff --git a/packages/paste-style-props/src/proptypes/position.ts b/packages/paste-style-props/src/proptypes/position.ts deleted file mode 100644 index fd0c680df9..0000000000 --- a/packages/paste-style-props/src/proptypes/position.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const ZIndexOptions = Object.keys(DefaultTheme.zIndices); - -export const isZIndexTokenProp = propValidator(ZIndexOptions); diff --git a/packages/paste-style-props/src/proptypes/shadow.ts b/packages/paste-style-props/src/proptypes/shadow.ts deleted file mode 100644 index e0e67e7314..0000000000 --- a/packages/paste-style-props/src/proptypes/shadow.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const BoxShadowOptions = ['none', ...Object.keys(DefaultTheme.shadows)]; - -export const isBoxShadowTokenProp = propValidator(BoxShadowOptions); diff --git a/packages/paste-style-props/src/proptypes/space.ts b/packages/paste-style-props/src/proptypes/space.ts deleted file mode 100644 index d3fe5565c8..0000000000 --- a/packages/paste-style-props/src/proptypes/space.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const SpaceOptions = Object.keys(DefaultTheme.space); -const MarginOptions = ['auto', ...Object.keys(DefaultTheme.space)]; - -export const isSpaceTokenProp = propValidator(SpaceOptions); -export const isPaddingTokenProp = propValidator(SpaceOptions); -export const isMarginTokenProp = propValidator(MarginOptions); -export const isGapTokenProp = propValidator(SpaceOptions); diff --git a/packages/paste-style-props/src/proptypes/typography.ts b/packages/paste-style-props/src/proptypes/typography.ts deleted file mode 100644 index 0a5bd66ace..0000000000 --- a/packages/paste-style-props/src/proptypes/typography.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {DefaultTheme} from '@twilio-paste/theme'; - -import {propValidator} from './utils/propValidator'; - -// Tokens -const FontFamilyOptions = ['inherit', ...Object.keys(DefaultTheme.fonts)]; -const FontSizeOptions = ['100%', 'inherit', ...Object.keys(DefaultTheme.fontSizes)]; -const FontWeightOptions = ['inherit', ...Object.keys(DefaultTheme.fontWeights)]; -const LineHeightOptions = ['unset', 'inherit', ...Object.keys(DefaultTheme.lineHeights)]; -const TextColorOptions = ['currentColor', 'inherit', ...Object.keys(DefaultTheme.textColors)]; - -export const isFontFamilyTokenProp = propValidator(FontFamilyOptions); -export const isFontSizeTokenProp = propValidator(FontSizeOptions); -export const isFontWeightTokenProp = propValidator(FontWeightOptions); -export const isLineHeightTokenProp = propValidator(LineHeightOptions); -export const isTextColorTokenProp = propValidator(TextColorOptions); diff --git a/packages/paste-style-props/src/proptypes/utils/propValidator.ts b/packages/paste-style-props/src/proptypes/utils/propValidator.ts deleted file mode 100644 index 10ae795e24..0000000000 --- a/packages/paste-style-props/src/proptypes/utils/propValidator.ts +++ /dev/null @@ -1,27 +0,0 @@ -type PropFunctionSignature = (props: {[key: string]: any}, propName: string, componentName: string) => Error | null; - -export const propValidator = (optionsList: string[]): PropFunctionSignature => { - return (props: {[key: string]: any}, propName: string, componentName: string): Error | null => { - const suppliedValue = props[propName]; - const propError = new Error( - `[${componentName}]: invalid prop supplied "${propName}=${suppliedValue}", expected a token value. See https://paste.twilio.design/tokens for available options.` - ); - - // eslint-disable-next-line unicorn/consistent-function-scoping - const isInvalidToken = (value: string): boolean => !optionsList.includes(value); - - if (suppliedValue != null) { - // If it's an array of tokens, loop through each and check if all values are tokens - if (Array.isArray(suppliedValue)) { - for (const value of suppliedValue) { - if (isInvalidToken(value)) { - return propError; - } - } - } else if (isInvalidToken(suppliedValue)) { - return propError; - } - } - return null; - }; -}; diff --git a/packages/paste-style-props/src/proptypes/utils/responsivePropValidator.ts b/packages/paste-style-props/src/proptypes/utils/responsivePropValidator.ts deleted file mode 100644 index 1e774029a7..0000000000 --- a/packages/paste-style-props/src/proptypes/utils/responsivePropValidator.ts +++ /dev/null @@ -1,6 +0,0 @@ -import PropTypes from 'prop-types'; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const ResponsiveProp = (type: PropTypes.Validator): PropTypes.Requireable => { - return PropTypes.oneOfType([type, PropTypes.arrayOf(type)]); -}; diff --git a/packages/paste-token-contrast-checker/package.json b/packages/paste-token-contrast-checker/package.json index 83f98a59eb..6a78c21fb6 100644 --- a/packages/paste-token-contrast-checker/package.json +++ b/packages/paste-token-contrast-checker/package.json @@ -6,7 +6,6 @@ "@twilio-paste/core": "^20.0.0", "@twilio-paste/icons": "^12.0.0", "lodash": "4.17.21", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "react-scripts": "5.0.0", diff --git a/packages/paste-website/package.json b/packages/paste-website/package.json index 4f2cbf9fd6..de9dc7adb4 100644 --- a/packages/paste-website/package.json +++ b/packages/paste-website/package.json @@ -148,7 +148,6 @@ "next": "^13.1.6", "pretty-format": "^28.1.0", "prism-react-renderer": "^1.3.5", - "prop-types": "^15.7.2", "puppeteer-core": "^19.6.1", "react": "^18.0.0", "react-color": "^2.19.3", diff --git a/packages/paste-website/src/pages/core/upgrade-guide.mdx b/packages/paste-website/src/pages/core/upgrade-guide.mdx index 9a509c95b5..68ba8b8227 100644 --- a/packages/paste-website/src/pages/core/upgrade-guide.mdx +++ b/packages/paste-website/src/pages/core/upgrade-guide.mdx @@ -37,7 +37,7 @@ export const getStaticProps = async () => { -### Core 20.0.0 - August '23' +### Core 20.0.0 - August 2023 Updated the compilation target of our JavaScript bundles to be `browser` and not `node`. This has resulted in a small `24.5 kB` reduction in file size across the entire Core library. @@ -45,7 +45,7 @@ Updated the compilation target of our JavaScript bundles to be `browser` and not See [the full change list](/core/changelog#20-0-0) -### Core 19.0.0 - March '23 +### Core 19.0.0 - March 2023 - We have moved `@types/react` and `@types/react-dom` to peer dependencies of the library. This should allow for greater control and backwards compatibility with older versions of React as Paste is no longer bundling the type libraries. Your application likely has both of these as dependencies anyway, but it is now up to you to manage that version number. @@ -59,7 +59,7 @@ Ensure `@types/react` and `@types/react-dom` are installed as dependencies of yo See [the full change list](/core/changelog#19-0-0) and the [documentation snapshot](https://release-v19--paste-docs.netlify.app/). -### Core 18.0.0 - February '23 +### Core 18.0.0 - February 2023 - Adds [support for React 18](https://github.com/twilio-labs/paste/pull/2965). This should "just work" and remains backwards compatible. [Let us know if you have any issues](https://github.com/twilio-labs/paste/discussions). - This major version included listing all the missing peer dependencies for each Paste package. @@ -72,7 +72,7 @@ install all the missing peer dependencies. See [the full change list](/core/changelog#18-0-0) and the [documentation snapshot](https://release-v18--paste-docs.netlify.app/). -### Core 17.0.0 - October '22' +### Core 17.0.0 - October 2022 - [Switch] Updated Switch component API to match other form components in Paste. @@ -100,7 +100,7 @@ See [the full change list](/core/changelog#18-0-0) and the [documentation snapsh See [the full change list](/core/changelog#17-0-0) and the [documentation snapshot](https://deploy-preview-2779--paste-docs.netlify.app/). -### Core 16.0.0 - October '22 +### Core 16.0.0 - October 2022 - [Modal] We removed the `\_\_console_patch`` prop because it is no longer necessary. It was a hack needed for the legacy Console application, which is no longer in use. [See PR #2697](https://github.com/twilio-labs/paste/pull/2697) @@ -108,7 +108,7 @@ See [the full change list](/core/changelog#17-0-0) and the [documentation snapsh See [the full change list](https://github.com/twilio-labs/paste/pull/2687) and the [documentation snapshot](https://deploy-preview-2687--paste-docs.netlify.app/). -### Core 15.0.0 - August '22 +### Core 15.0.0 - August 2022 - [Design tokens] Created a new category of design token, Data Visualization, and subsequently relocated all of the Data Visualization tokens from the generic Color category. If you are using categorized Data @@ -118,7 +118,7 @@ See [the full change list](https://github.com/twilio-labs/paste/pull/2687) and t See [the full change list](https://github.com/twilio-labs/paste/pull/2579/files) and the [documentation snapshot](https://deploy-preview-2579--paste-docs.netlify.app/). -### Core 14.0.0 - June '22 +### Core 14.0.0 - June 2022 - [Textarea] Update Textarea to use `@twilio-paste/react-autosize-textarea` library and add the `resize` prop which allows users to resize the Textarea height. diff --git a/packages/paste-website/src/pages/introduction/for-engineers/manual-installation/index.mdx b/packages/paste-website/src/pages/introduction/for-engineers/manual-installation/index.mdx index 64ef000382..ba178c5cf0 100644 --- a/packages/paste-website/src/pages/introduction/for-engineers/manual-installation/index.mdx +++ b/packages/paste-website/src/pages/introduction/for-engineers/manual-installation/index.mdx @@ -70,10 +70,6 @@ To start using Paste, you must first install the following third party dependenc @types/react-dom {CorePkgJson.peerDependencies['@types/react-dom']} - - prop-types - {CorePkgJson.peerDependencies['prop-types']} - @@ -82,10 +78,10 @@ Install them in your project folder using either of these terminal commands: ```bash # yarn -yarn add react react-dom prop-types +yarn add react react-dom # npm -npm install react react-dom prop-types +npm install react react-dom ``` ## Paste Packages diff --git a/templates/paste-nextjs-template/package.json b/templates/paste-nextjs-template/package.json index fa55ec2084..64f630d5b1 100644 --- a/templates/paste-nextjs-template/package.json +++ b/templates/paste-nextjs-template/package.json @@ -13,7 +13,6 @@ "@twilio-paste/core": "^20.0.0", "@twilio-paste/icons": "^12.0.0", "next": "^13.1.6", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/tools/build/__tests__/compiledImports.test.ts b/tools/build/__tests__/compiledImports.test.ts index d4c9337ad8..6ec31eb6be 100644 --- a/tools/build/__tests__/compiledImports.test.ts +++ b/tools/build/__tests__/compiledImports.test.ts @@ -26,7 +26,6 @@ describe('esbuild config', () => { '@twilio-paste/design-tokens': '^7.0.0', '@twilio-paste/styling-library': '^0.3.1', '@twilio-paste/theme': '^6.0.0', - 'prop-types': '^15.7.2', react: '^16.8.6 || ^17.0.2 || ^18.0.0', 'react-dom': '^16.8.6 || ^17.0.2 || ^18.0.0', }, @@ -34,7 +33,6 @@ describe('esbuild config', () => { '@twilio-paste/design-tokens': '^7.1.0', '@twilio-paste/styling-library': '^0.3.6', '@twilio-paste/theme': '^6.0.1', - 'prop-types': '^15.7.2', react: '^18.0.0', 'react-dom': '^18.0.0', }, diff --git a/tools/plop-templates/component-component.hbs b/tools/plop-templates/component-component.hbs index c1f83a1967..734532e5a8 100644 --- a/tools/plop-templates/component-component.hbs +++ b/tools/plop-templates/component-component.hbs @@ -1,5 +1,4 @@ import * as React from 'react'; -import PropTypes from 'prop-types'; export interface {{pascalCase component-name}}Props extends Omit, 'children'> { children?: React.ReactNode; diff --git a/tools/plop-templates/package.hbs b/tools/plop-templates/package.hbs index 21d029027b..407c57942b 100644 --- a/tools/plop-templates/package.hbs +++ b/tools/plop-templates/package.hbs @@ -33,7 +33,6 @@ "@twilio-paste/styling-library": "^2.0.2", "@twilio-paste/theme": "^10.0.2", "@twilio-paste/types": "^5.0.0", - "prop-types": "^15.7.2", "react": "^16.8.6 || ^17.0.2 || ^18.0.0", "react-dom": "^16.8.6 || ^17.0.2 || ^18.0.0" }, @@ -46,7 +45,6 @@ "@twilio-paste/styling-library": "^2.0.2", "@twilio-paste/theme": "^10.0.2", "@twilio-paste/types": "^5.0.0", - "prop-types": "^15.7.2", "react": "^18.0.0", "react-dom": "^18.0.0", "tsx": "^3.12.8", diff --git a/yarn.lock b/yarn.lock index 84a6c0361a..e18b00b1ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12671,7 +12671,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -12701,7 +12700,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12734,7 +12732,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -12762,7 +12759,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12791,7 +12787,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -12815,7 +12810,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12838,7 +12832,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 tsx: ^3.12.10 @@ -12857,7 +12850,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12892,7 +12884,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -12908,7 +12899,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12934,7 +12924,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 "@types/react-is": 17.0.3 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 react-is: 18.0.0 @@ -12955,7 +12944,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -12981,7 +12969,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13002,7 +12989,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13032,7 +13018,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13057,7 +13042,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13078,7 +13062,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13093,7 +13076,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13118,7 +13100,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13138,7 +13119,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13160,7 +13140,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13176,7 +13155,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13203,7 +13181,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 tsx: ^3.12.10 @@ -13225,7 +13202,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13250,7 +13226,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13270,7 +13245,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13291,7 +13265,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13307,7 +13280,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13330,7 +13302,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13347,7 +13318,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^17.0.2 || ^18.0.0 react-dom: ^17.0.2 || ^18.0.0 languageName: unknown @@ -13378,7 +13348,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13404,7 +13373,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13436,7 +13404,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13463,7 +13430,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13514,7 +13480,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13547,7 +13512,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13605,13 +13569,11 @@ __metadata: resolution: "@twilio-paste/combobox-primitive@workspace:packages/paste-core/primitives/combobox" dependencies: "@twilio-paste/dropdown-library": ^3.0.0 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 peerDependencies: "@twilio-paste/dropdown-library": ^3.0.0 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13653,7 +13615,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 react-virtual: 2.10.4 @@ -13689,7 +13650,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13807,7 +13767,6 @@ __metadata: "@twilio-paste/visual-picker": ^2.0.1 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 tsx: ^3.12.10 @@ -13816,7 +13775,6 @@ __metadata: "@twilio-paste/icons": ^12.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13836,7 +13794,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13850,7 +13807,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13882,7 +13838,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13908,7 +13863,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -13971,7 +13925,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 date-fns: 2.21.3 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -13996,7 +13949,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14017,7 +13969,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14033,7 +13984,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14070,7 +14020,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14086,7 +14035,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14097,13 +14045,11 @@ __metadata: resolution: "@twilio-paste/disclosure-primitive@workspace:packages/paste-core/primitives/disclosure" dependencies: "@twilio-paste/reakit-library": ^2.0.0 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 peerDependencies: "@twilio-paste/reakit-library": ^2.0.0 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14131,7 +14077,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14154,7 +14099,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14176,7 +14120,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14193,7 +14136,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14217,7 +14159,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14236,7 +14177,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14285,7 +14225,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14316,7 +14255,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14345,7 +14283,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14369,7 +14306,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14402,7 +14338,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14429,7 +14364,6 @@ __metadata: "@twilio-paste/uid-library": 2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14450,7 +14384,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14466,7 +14399,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14492,7 +14424,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14512,7 +14443,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14536,7 +14466,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14555,7 +14484,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14576,7 +14504,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14592,7 +14519,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14613,7 +14539,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14629,7 +14554,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14652,7 +14576,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14670,7 +14593,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14693,7 +14615,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 tsx: ^3.12.10 @@ -14710,7 +14631,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14734,7 +14654,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14753,7 +14672,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14774,7 +14692,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14790,7 +14707,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14819,7 +14735,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14843,7 +14758,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14865,7 +14779,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14882,7 +14795,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14911,7 +14823,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14935,7 +14846,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -14960,7 +14870,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -14980,7 +14889,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15016,7 +14924,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15032,7 +14939,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15068,7 +14974,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15084,7 +14989,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15133,7 +15037,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15162,7 +15065,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15190,7 +15092,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15213,7 +15114,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15243,7 +15143,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15268,7 +15167,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15314,7 +15212,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15341,7 +15238,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15356,7 +15252,6 @@ __metadata: "@types/node": ^18.11.13 eslint: ^8.29.0 next: ^13.1.6 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15396,7 +15291,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15415,7 +15309,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15436,7 +15329,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15452,7 +15344,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15500,7 +15391,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15527,7 +15417,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15562,7 +15451,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15592,7 +15480,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15620,7 +15507,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 peerDependencies: @@ -15642,7 +15528,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15665,7 +15550,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15683,7 +15567,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15718,7 +15601,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15748,7 +15630,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15780,7 +15661,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15807,7 +15687,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15878,7 +15757,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15896,7 +15774,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15920,7 +15797,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15939,7 +15815,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15960,7 +15835,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -15976,7 +15850,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -15998,7 +15871,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16015,7 +15887,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16047,7 +15918,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16074,7 +15944,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16108,7 +15977,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16137,7 +16005,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16158,7 +16025,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16174,7 +16040,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16200,7 +16065,6 @@ __metadata: "@twilio-paste/utils": 5.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 peerDependencies: @@ -16220,7 +16084,6 @@ __metadata: "@twilio-paste/utils": 5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16243,7 +16106,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16261,7 +16123,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16283,7 +16144,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16300,7 +16160,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16335,7 +16194,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16365,7 +16223,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16385,7 +16242,6 @@ __metadata: "@types/react-dom": ^18.0.10 csstype: 3.0.11 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 peerDependencies: @@ -16397,7 +16253,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16451,7 +16306,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16477,7 +16331,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16512,7 +16365,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 tsx: ^3.12.10 @@ -16529,7 +16381,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16568,7 +16419,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16587,7 +16437,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16608,7 +16457,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 deepmerge: 4.2.2 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16623,7 +16471,6 @@ __metadata: "@twilio-paste/types": ^6.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16647,7 +16494,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16666,7 +16512,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16739,7 +16584,6 @@ __metadata: "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 date-fns: 2.21.3 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16764,7 +16608,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16794,7 +16637,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16819,7 +16661,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16832,7 +16673,6 @@ __metadata: "@twilio-paste/core": ^20.0.0 "@twilio-paste/icons": ^12.0.0 lodash: 4.17.21 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 react-scripts: 5.0.0 @@ -16876,7 +16716,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16898,7 +16737,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16932,7 +16770,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -16961,7 +16798,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -16984,7 +16820,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -17002,7 +16837,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -17063,7 +16897,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -17092,7 +16925,6 @@ __metadata: "@twilio-paste/uid-library": ^2.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -17156,7 +16988,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^18.0.27 "@types/react-dom": ^18.0.10 - prop-types: ^15.7.2 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.4 @@ -17186,7 +17017,6 @@ __metadata: "@twilio-paste/utils": ^5.0.0 "@types/react": ^16.8.6 || ^17.0.2 || ^18.0.27 "@types/react-dom": ^16.8.6 || ^17.0.2 || ^18.0.10 - prop-types: ^15.7.2 react: ^16.8.6 || ^17.0.2 || ^18.0.0 react-dom: ^16.8.6 || ^17.0.2 || ^18.0.0 languageName: unknown @@ -17329,7 +17159,6 @@ __metadata: next: ^13.1.6 pretty-format: ^28.1.0 prism-react-renderer: ^1.3.5 - prop-types: ^15.7.2 puppeteer-core: ^19.6.1 react: ^18.0.0 react-color: ^2.19.3 @@ -18187,13 +18016,6 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:^15.7.5": - version: 15.7.5 - resolution: "@types/prop-types@npm:15.7.5" - checksum: 5b43b8b15415e1f298243165f1d44390403bb2bd42e662bca3b5b5633fdd39c938e91b7fce3a9483699db0f7a715d08cef220c121f723a634972fdf596aec980 - languageName: node - linkType: hard - "@types/q@npm:^1.5.1": version: 1.5.2 resolution: "@types/q@npm:1.5.2" @@ -38445,7 +38267,6 @@ fsevents@^1.2.7: "@types/color": ^3.0.0 "@types/jest": ^24.0.18 "@types/node": ^18.11.13 - "@types/prop-types": ^15.7.5 "@types/react": ^18.0.27 "@types/react-color": ^3.0.6 "@types/react-github-button": ^0.1.1 @@ -38507,7 +38328,6 @@ fsevents@^1.2.7: plop: ^2.7.4 precise-commits: ^1.0.2 prettier: ^2.8.1 - prop-types: ^15.7.2 puppeteer-core: ^19.6.1 react: ^18.0.0 react-dom: ^18.0.0