From c3c498be808d78b228e14f5775a2efb831b5c8d5 Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Sun, 11 Aug 2024 12:12:49 +0300 Subject: [PATCH 1/3] chore: cleanup --- .../__stories__/accordionItem.stories.tmp | 29 ------------------- .../AlertBannerLink/AlertBannerLink.tsx | 1 - .../components/AttentionBox/AttentionBox.tsx | 5 ++-- .../src/components/Avatar/AvatarBadge.tsx | 4 --- .../BreadcrumbContent/BreadcrumbContent.tsx | 1 - .../src/components/Clickable/Clickable.tsx | 5 ++-- .../core/src/components/Combobox/Combobox.tsx | 1 - .../ComboboxHelpers/ComboboxHelpers.tsx | 1 - .../components/Combobox/ComboboxService.ts | 2 -- .../__tests__/Combobox.interactions.js | 12 -------- .../DatePicker/YearPicker/YearsList.tsx | 1 - .../core/src/components/Dialog/Dialog.tsx | 1 - .../Dialog/DialogContent/DialogContent.tsx | 2 +- .../components/Dropdown/Dropdown.styles.js | 1 - .../core/src/components/Dropdown/Dropdown.tsx | 1 - .../__tests__/Dropdown.snapshot.test.js | 1 - .../components/Dropdown/__tests__/driver.js | 1 - .../ClearIndicator/ClearIndicator.jsx | 1 - .../DropdownIndicator/DropdownIndicator.jsx | 1 - .../MultiValueContainer.jsx | 2 +- .../components/singleValue/singleValue.jsx | 1 - .../ExpandCollapse/ExpandCollapse.module.scss | 16 ---------- .../src/components/FieldLabel/FieldLabel.tsx | 13 +-------- packages/core/src/components/Icon/Icon.tsx | 6 ++-- .../Link/__tests__/Link.snapshot.test.tsx | 1 - .../components/Link/__tests__/Link.test.tsx | 1 - .../core/src/components/ListItem/ListItem.tsx | 1 - .../Menu/Menu/__stories__/Menu.stories.tsx | 1 - .../src/components/Menu/MenuItem/MenuItem.tsx | 4 +-- .../MenuItem/__stories__/MenuItem.stories.tsx | 1 - .../BaseMenuItem/BaseMenuItem.types.ts | 3 +- .../MenuItemIcon/MenuItemIcon.types.ts | 2 +- .../MenuItemSubMenu/MenuItemSubMenu.types.ts | 3 +- .../Menu/MenuItemButton/MenuItemButton.tsx | 1 - .../core/src/components/Modal/ModalHelper.ts | 1 - .../StepIndicator/StepIndicator.tsx | 1 - .../LinearProgressBar/LinearProgressBar.tsx | 1 - .../core/src/components/Steps/StepsHeader.tsx | 3 +- .../__stories__/Steps.stories.helpers.tsx | 1 - packages/core/src/components/Tabs/Tab/Tab.tsx | 2 +- .../src/components/TextField/TextField.tsx | 2 +- .../ThemeProvider.stories.helpers.tsx | 1 - .../Typography/Typography.module.scss | 2 +- .../VirtualizedList.stories.helpers.js | 1 - packages/core/src/constants/common.ts | 7 ----- packages/core/src/constants/index.ts | 1 - .../backwardCompatibilityForProperties.ts | 8 ----- .../useActiveDescendantListFocus/index.ts | 4 +-- .../useIsOverflowing/useIsOverflowing.ts | 1 - packages/core/src/hooks/useMergeRefs.ts | 3 +- packages/core/src/hooks/usePopover.ts | 1 - packages/core/src/hooks/useSetFocus/index.ts | 2 +- .../core/src/hooks/useThrottledCallback.ts | 2 +- .../clickable-description.jsx | 1 - packages/core/src/utils/function-utils.ts | 1 - 55 files changed, 22 insertions(+), 151 deletions(-) delete mode 100644 packages/core/src/components/Accordion/AccordionItem/__stories__/accordionItem.stories.tmp delete mode 100644 packages/core/src/constants/common.ts delete mode 100644 packages/core/src/helpers/backwardCompatibilityForProperties.ts diff --git a/packages/core/src/components/Accordion/AccordionItem/__stories__/accordionItem.stories.tmp b/packages/core/src/components/Accordion/AccordionItem/__stories__/accordionItem.stories.tmp deleted file mode 100644 index 7bfc255cf7..0000000000 --- a/packages/core/src/components/Accordion/AccordionItem/__stories__/accordionItem.stories.tmp +++ /dev/null @@ -1,29 +0,0 @@ -import React, { useState } from "react"; -import { withPerformance } from "storybook-addon-performance"; -import AccordionItem from "../AccordionItem"; - -// TODO not being used - should be removed or converted to mdx and displayed? -export const Sandbox = () => { - const [isOpen, setIsOpen] = useState(false); - - const width = 300; - const height = 200; - - const onClick = () => { - setIsOpen(!isOpen); - }; - - return ( -
- -

Any component you want

-
-
- ); -}; - -export default { - title: "Components|AccordionItem", - component: AccordionItem, - decorators: [withPerformance] -}; diff --git a/packages/core/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.tsx b/packages/core/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.tsx index 78fa11c1cd..e5d7cd2ad2 100644 --- a/packages/core/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.tsx +++ b/packages/core/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import cx from "classnames"; import { ComponentDefaultTestId, getTestId } from "../../../tests/test-ids-utils"; import React, { FC, useContext } from "react"; diff --git a/packages/core/src/components/AttentionBox/AttentionBox.tsx b/packages/core/src/components/AttentionBox/AttentionBox.tsx index 7a6903590b..4225b70690 100644 --- a/packages/core/src/components/AttentionBox/AttentionBox.tsx +++ b/packages/core/src/components/AttentionBox/AttentionBox.tsx @@ -18,7 +18,7 @@ import styles from "./AttentionBox.module.scss"; export interface AttentionBoxProps extends VibeComponentProps { className?: string; - // Will remove when releasing version 2 as BREAKING CHANGES + // TODO: [breaking] remove prop withIconWithoutHeader?: boolean; /** we support 5 types of attention boxes */ type?: AttentionBoxType; @@ -28,6 +28,7 @@ export interface AttentionBoxProps extends VibeComponentProps { title?: string; text?: string; children?: ElementContent; + // TODO: [breaking] remove prop withoutIcon?: boolean; onClose?: (event: React.MouseEvent) => void; compact?: boolean; @@ -39,7 +40,6 @@ const AttentionBox: React.FC & { iconTypes?: typeof IconTypeEnum; } = ({ className, - // TODO Remove in next major as breaking change withIconWithoutHeader = false, type = "primary", icon, @@ -47,7 +47,6 @@ const AttentionBox: React.FC & { title, text, children, - // TODO Remove in next major as breaking change withoutIcon = false, onClose, compact = false, diff --git a/packages/core/src/components/Avatar/AvatarBadge.tsx b/packages/core/src/components/Avatar/AvatarBadge.tsx index b0672b983c..e8e9d88c04 100644 --- a/packages/core/src/components/Avatar/AvatarBadge.tsx +++ b/packages/core/src/components/Avatar/AvatarBadge.tsx @@ -17,8 +17,6 @@ export interface AvatarBadgeProps extends VibeComponentProps { * Use to provide SVG Components */ icon?: SubIcon; - // TODO Remove in next major as breaking change - ariaLabel?: string; tabIndex?: string | number; className?: string; size?: AvatarSize; @@ -29,8 +27,6 @@ export const AvatarBadge: React.FC & { } = ({ src, icon, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ariaLabel, tabIndex = 0, className, size = "large", diff --git a/packages/core/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.tsx b/packages/core/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.tsx index da61d530cd..27e6358986 100644 --- a/packages/core/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.tsx +++ b/packages/core/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/no-noninteractive-tabindex */ import React, { ForwardedRef, forwardRef, useCallback, useMemo } from "react"; import { keyCodes } from "../../../../constants"; import { SubIcon, VibeComponentProps } from "../../../../types"; diff --git a/packages/core/src/components/Clickable/Clickable.tsx b/packages/core/src/components/Clickable/Clickable.tsx index f9760c5e85..5c1ee29537 100644 --- a/packages/core/src/components/Clickable/Clickable.tsx +++ b/packages/core/src/components/Clickable/Clickable.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/no-noninteractive-tabindex */ import cx from "classnames"; import React, { AriaRole, forwardRef } from "react"; import { noop as NOOP } from "lodash-es"; @@ -26,10 +25,10 @@ export interface ClickableProps extends VibeComponentProps { * Is the element and its content should be hidden from screen readers and other assistive technologies */ ariaHidden?: boolean; - // TODO remove string in Vibe 2.0 + // TODO: [breaking] remove string type ariaHasPopup?: boolean | string; ariaExpanded?: boolean; - // TODO remove string in Vibe 2.0 + // TODO: [breaking] remove string type tabIndex?: string | number; disabled?: boolean; style?: React.CSSProperties; diff --git a/packages/core/src/components/Combobox/Combobox.tsx b/packages/core/src/components/Combobox/Combobox.tsx index 1debe00c44..d777e1537a 100644 --- a/packages/core/src/components/Combobox/Combobox.tsx +++ b/packages/core/src/components/Combobox/Combobox.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/click-events-have-key-events */ import { camelCase } from "lodash-es"; import cx from "classnames"; import React, { useRef, useState, forwardRef, useMemo, useCallback } from "react"; diff --git a/packages/core/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.tsx b/packages/core/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.tsx index 296f189e7f..7786d918d1 100644 --- a/packages/core/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.tsx +++ b/packages/core/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.tsx @@ -201,7 +201,6 @@ export function comboboxItemRenderer({ item: IComboboxItem; style: CSSProperties; optionEvents: IComboboxOptionEvents; - // eslint-disable-next-line @typescript-eslint/no-explicit-any optionRenderData: any; isVirtualized: boolean; stickyCategories?: boolean; diff --git a/packages/core/src/components/Combobox/ComboboxService.ts b/packages/core/src/components/Combobox/ComboboxService.ts index e7cfa95a22..e6b011c155 100644 --- a/packages/core/src/components/Combobox/ComboboxService.ts +++ b/packages/core/src/components/Combobox/ComboboxService.ts @@ -18,7 +18,6 @@ export const getOptionsByCategories = ( if (result[categoryId]) { result[categoryId].push(option); } else { - // eslint-disable-next-line no-param-reassign result[categoryId] = [option]; } @@ -27,7 +26,6 @@ export const getOptionsByCategories = ( // reorder the keys according to the categories order return Object.keys(categories).reduce((result: OptionsByCategories, categoryId) => { - // eslint-disable-next-line no-param-reassign if (optionsByCategories[categoryId]) result[categoryId] = optionsByCategories[categoryId]; return result; diff --git a/packages/core/src/components/Combobox/__tests__/Combobox.interactions.js b/packages/core/src/components/Combobox/__tests__/Combobox.interactions.js index 6006d38ddb..54f27f73ce 100644 --- a/packages/core/src/components/Combobox/__tests__/Combobox.interactions.js +++ b/packages/core/src/components/Combobox/__tests__/Combobox.interactions.js @@ -37,18 +37,6 @@ async function onSelectExistFilterClearsFilterTest(canvas) { expect(option1).toBeInTheDocument(); } -// there is no story which is not overview which activate this ability -// eslint-disable-next-line no-unused-vars -async function onSelectOptionClearsFilterTest(canvas) { - const { comboboxElement, searchElement } = await getComponentElements(canvas); - await typeText(searchElement, "Option"); - const optionToClick = getByText(comboboxElement, "Option 1"); - await clickElement(optionToClick); - expect(searchElement).toHaveValue(""); - const option1 = getByText("Option 1"); - expect(option1).toBeTruthy(); -} - async function onNavigateBetweenOptionsByArrowsAriaUpdates(canvas) { const { comboboxElement, searchElement } = await getComponentElements(canvas); diff --git a/packages/core/src/components/DatePicker/YearPicker/YearsList.tsx b/packages/core/src/components/DatePicker/YearPicker/YearsList.tsx index dab8568671..3500e1c623 100644 --- a/packages/core/src/components/DatePicker/YearPicker/YearsList.tsx +++ b/packages/core/src/components/DatePicker/YearPicker/YearsList.tsx @@ -2,7 +2,6 @@ import React from "react"; import Button from "../../Button/Button"; import styles from "./YearPicker.module.scss"; -// eslint-disable-next-line @typescript-eslint/no-empty-function const NOOP = () => {}; export interface YearsListProps { diff --git a/packages/core/src/components/Dialog/Dialog.tsx b/packages/core/src/components/Dialog/Dialog.tsx index 5f6942467c..fa9e7057e6 100644 --- a/packages/core/src/components/Dialog/Dialog.tsx +++ b/packages/core/src/components/Dialog/Dialog.tsx @@ -556,7 +556,6 @@ export default class Dialog extends PureComponent { enabled: true, phase: "write", fn({ state }) { - // eslint-disable-next-line no-param-reassign if (!state.styles.arrow) { return state; } diff --git a/packages/core/src/components/Dialog/DialogContent/DialogContent.tsx b/packages/core/src/components/Dialog/DialogContent/DialogContent.tsx index 24a10ba8b9..79b5c1c3ae 100644 --- a/packages/core/src/components/Dialog/DialogContent/DialogContent.tsx +++ b/packages/core/src/components/Dialog/DialogContent/DialogContent.tsx @@ -22,7 +22,7 @@ export interface DialogContentProps extends VibeComponentProps { position?: PopperJS.Placement; wrapperClassName?: string; isOpen?: boolean; - // TODO breaking change convert to enum + // TODO: [breaking] use type startingEdge?: any; animationType?: DialogAnimationType; onEsc?: (event: React.KeyboardEvent) => void; diff --git a/packages/core/src/components/Dropdown/Dropdown.styles.js b/packages/core/src/components/Dropdown/Dropdown.styles.js index fdb2fa62d1..d7108f98f5 100644 --- a/packages/core/src/components/Dropdown/Dropdown.styles.js +++ b/packages/core/src/components/Dropdown/Dropdown.styles.js @@ -1,4 +1,3 @@ -/* eslint-disable no-param-reassign */ import { SIZES } from "../../constants/sizes"; import { getCSSVar } from "../../services/themes"; import { getScrollableParent } from "../../utils/dom-utils"; diff --git a/packages/core/src/components/Dropdown/Dropdown.tsx b/packages/core/src/components/Dropdown/Dropdown.tsx index 7a69e9d839..126bf4d828 100644 --- a/packages/core/src/components/Dropdown/Dropdown.tsx +++ b/packages/core/src/components/Dropdown/Dropdown.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/require-default-props,react/forbid-prop-types */ import { ComponentDefaultTestId, getTestId } from "../../tests/test-ids-utils"; import cx from "classnames"; import { BaseSizes, SIZES_VALUES } from "../../constants"; diff --git a/packages/core/src/components/Dropdown/__tests__/Dropdown.snapshot.test.js b/packages/core/src/components/Dropdown/__tests__/Dropdown.snapshot.test.js index 6c0fed0334..8c7e7f7d81 100644 --- a/packages/core/src/components/Dropdown/__tests__/Dropdown.snapshot.test.js +++ b/packages/core/src/components/Dropdown/__tests__/Dropdown.snapshot.test.js @@ -136,7 +136,6 @@ describe("Dropdown renders correctly", () => { }); it("with tabIndex", () => { - // eslint-disable-next-line jsx-a11y/tabindex-no-positive const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); diff --git a/packages/core/src/components/Dropdown/__tests__/driver.js b/packages/core/src/components/Dropdown/__tests__/driver.js index 123d55282a..c02928721c 100644 --- a/packages/core/src/components/Dropdown/__tests__/driver.js +++ b/packages/core/src/components/Dropdown/__tests__/driver.js @@ -17,7 +17,6 @@ export default class DropdownDriver { constructor() { this.props = { className: "dropdown-story" }; - // eslint-disable-next-line no-constructor-return return this; } diff --git a/packages/core/src/components/Dropdown/components/ClearIndicator/ClearIndicator.jsx b/packages/core/src/components/Dropdown/components/ClearIndicator/ClearIndicator.jsx index fb522baddb..e5a9d1077a 100644 --- a/packages/core/src/components/Dropdown/components/ClearIndicator/ClearIndicator.jsx +++ b/packages/core/src/components/Dropdown/components/ClearIndicator/ClearIndicator.jsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import React from "react"; import { components } from "react-select"; import Icon from "../../../Icon/Icon"; diff --git a/packages/core/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.jsx b/packages/core/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.jsx index a72105b438..162620b828 100644 --- a/packages/core/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.jsx +++ b/packages/core/src/components/Dropdown/components/DropdownIndicator/DropdownIndicator.jsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import React from "react"; import { components } from "react-select"; import Icon from "../../../Icon/Icon"; diff --git a/packages/core/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.jsx b/packages/core/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.jsx index 40e42b39df..783d27700a 100644 --- a/packages/core/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.jsx +++ b/packages/core/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.jsx @@ -1,4 +1,3 @@ -/* eslint-disable react/no-unstable-nested-components */ import React, { useCallback, useEffect, useState } from "react"; import { components } from "react-select"; import cx from "classnames"; @@ -79,6 +78,7 @@ export default function Container({ children, selectProps, ...otherProps }) { /> ) : null; }), + // eslint-disable-next-line react-hooks/exhaustive-deps [selectedOptions, chipClassName, isDisabled, readOnly, withMandatoryDefaultOptions, onDelete, size] ); diff --git a/packages/core/src/components/Dropdown/components/singleValue/singleValue.jsx b/packages/core/src/components/Dropdown/components/singleValue/singleValue.jsx index a07963fb9a..11c64610e4 100644 --- a/packages/core/src/components/Dropdown/components/singleValue/singleValue.jsx +++ b/packages/core/src/components/Dropdown/components/singleValue/singleValue.jsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import React from "react"; import cx from "classnames"; import { components } from "react-select"; diff --git a/packages/core/src/components/ExpandCollapse/ExpandCollapse.module.scss b/packages/core/src/components/ExpandCollapse/ExpandCollapse.module.scss index b81354120a..c2700e2c4e 100644 --- a/packages/core/src/components/ExpandCollapse/ExpandCollapse.module.scss +++ b/packages/core/src/components/ExpandCollapse/ExpandCollapse.module.scss @@ -69,19 +69,3 @@ transform: rotate(-360deg); transition: transform var(--motion-expressive-short) var(--motion-timing-transition); } - -// TODO add some other animation here or remove completely - causing flickering cause of intersection with the header -.animateExpandCollapseContent { - //animation: expandContentAnimation var(--motion-productive-medium) var(--motion-timing-enter); -} - -//@keyframes expandContentAnimation { -// 0% { -// opacity: 0; -// transform: translateY(var(--dropdown-menu-fadinY, -75px)); -// } -// 100% { -// opacity: 1; -// transform: translateY(0px); -// } -//} diff --git a/packages/core/src/components/FieldLabel/FieldLabel.tsx b/packages/core/src/components/FieldLabel/FieldLabel.tsx index 8af7fee45e..8960f18257 100644 --- a/packages/core/src/components/FieldLabel/FieldLabel.tsx +++ b/packages/core/src/components/FieldLabel/FieldLabel.tsx @@ -6,8 +6,6 @@ import styles from "./FieldLabel.module.scss"; export interface FieldLabelProps extends VibeComponentProps { icon?: string | React.FunctionComponent | null; - /// TODO Remove in next major as breaking change - iconLabel?: string; labelText?: string; labelFor?: string; iconClassName?: string; @@ -17,16 +15,7 @@ export interface FieldLabelProps extends VibeComponentProps { const FieldLabel: FC = forwardRef( ( - { - icon = "", - // eslint-disable-next-line @typescript-eslint/no-unused-vars - iconLabel = "", - labelText = "", - labelFor = "", - iconClassName = "", - labelClassName = "", - required = false - }, + { icon = "", labelText = "", labelFor = "", iconClassName = "", labelClassName = "", required = false }, ref: ForwardedRef ) => { if (!labelText) { diff --git a/packages/core/src/components/Icon/Icon.tsx b/packages/core/src/components/Icon/Icon.tsx index 6f1a6ff77b..4014f61e9d 100644 --- a/packages/core/src/components/Icon/Icon.tsx +++ b/packages/core/src/components/Icon/Icon.tsx @@ -9,7 +9,6 @@ import FontIcon from "./FontIcon/FontIcon"; import useIconProps from "./hooks/useIconProps"; import { VibeComponentProps, VibeComponent, MouseEventCallBack, SubIcon, withStaticProps } from "../../types"; -// eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function const CLICK_NOOP = (_event: React.MouseEvent) => {}; export interface IconSubComponentProps { @@ -28,7 +27,6 @@ function renderIcon(Icon: SubIcon, props: IconSubComponentProps) { } export interface IconProps extends VibeComponentProps { - // eslint-disable-next-line no-unused-vars onClick?: (event: React.MouseEvent) => void; /** * We support three types of icons - SVG, FONT and SRC (classname) so this prop is either the name of the icon or the component @@ -111,12 +109,12 @@ const Icon: VibeComponent & { type?: typeof IconTypeEnum return null; } - // Replace in major version change with more accurate check + // TODO: [breaking] make more accurate check const isFunctionType = typeof icon === "function"; const overrideDataTestId = dataTestId || getTestId(ComponentDefaultTestId.ICON, id); - // Replace in major version change with more accurate check + // TODO: [breaking] make more accurate check if (iconType === "svg" || isFunctionType || typeof icon === "object") { return renderIcon(icon, { id, diff --git a/packages/core/src/components/Link/__tests__/Link.snapshot.test.tsx b/packages/core/src/components/Link/__tests__/Link.snapshot.test.tsx index 8454bfc09f..c87f82aba3 100644 --- a/packages/core/src/components/Link/__tests__/Link.snapshot.test.tsx +++ b/packages/core/src/components/Link/__tests__/Link.snapshot.test.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import React from "react"; import renderer from "react-test-renderer"; import Link from "../Link"; diff --git a/packages/core/src/components/Link/__tests__/Link.test.tsx b/packages/core/src/components/Link/__tests__/Link.test.tsx index 75e36bfe0c..d0f5097a0c 100644 --- a/packages/core/src/components/Link/__tests__/Link.test.tsx +++ b/packages/core/src/components/Link/__tests__/Link.test.tsx @@ -38,7 +38,6 @@ describe("Link", () => { }); it("should have the correct target", () => { - // eslint-disable-next-line jsx-a11y/anchor-is-valid const { getByText } = render(); const element = getByText("test text").closest("a"); expect(element.target).toBe("_self"); diff --git a/packages/core/src/components/ListItem/ListItem.tsx b/packages/core/src/components/ListItem/ListItem.tsx index 558be94dc2..2e0c2a1c01 100644 --- a/packages/core/src/components/ListItem/ListItem.tsx +++ b/packages/core/src/components/ListItem/ListItem.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/role-supports-aria-props,jsx-a11y/no-noninteractive-element-interactions */ import cx from "classnames"; import React, { AriaAttributes, forwardRef, useCallback, useContext, useEffect, useRef } from "react"; import { camelCase } from "lodash-es"; diff --git a/packages/core/src/components/Menu/Menu/__stories__/Menu.stories.tsx b/packages/core/src/components/Menu/Menu/__stories__/Menu.stories.tsx index 4e1c1ef118..8b5b96fa91 100644 --- a/packages/core/src/components/Menu/Menu/__stories__/Menu.stories.tsx +++ b/packages/core/src/components/Menu/Menu/__stories__/Menu.stories.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import React from "react"; import { Activity, Code, Delete, Email, Emoji, Favorite, Feedback, Info, Invite, Settings } from "../../../Icon/Icons"; import { DialogContentContainer, Menu, MenuDivider, MenuGridItem, MenuItem, MenuTitle } from "../../.."; diff --git a/packages/core/src/components/Menu/MenuItem/MenuItem.tsx b/packages/core/src/components/Menu/MenuItem/MenuItem.tsx index 7f1ce9f679..686223cfb9 100644 --- a/packages/core/src/components/Menu/MenuItem/MenuItem.tsx +++ b/packages/core/src/components/Menu/MenuItem/MenuItem.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import React, { AriaAttributes, ForwardedRef, ReactElement, forwardRef, useMemo, useRef } from "react"; import Tooltip, { TooltipProps } from "../../../components/Tooltip/Tooltip"; import Icon from "../../../components/Icon/Icon"; @@ -46,8 +45,7 @@ export interface MenuItemProps extends VibeComponentProps { shouldScrollMenu?: boolean; closeMenu?: (option: CloseMenuOption) => void; menuRef?: React.RefObject; - // TODO MenuItem can accept only Menu element as first level child, it accepts MenuChild[] as children even though it is not valid. - // Should be fixed in next major version + //// TODO: [breaking] MenuItem can accept only Menu element as first level child, it accepts MenuChild[] as children even though it is not valid children?: MenuChild | MenuChild[]; /** * Type of menu item with sub menu, which has two click/hover options- diff --git a/packages/core/src/components/Menu/MenuItem/__stories__/MenuItem.stories.tsx b/packages/core/src/components/Menu/MenuItem/__stories__/MenuItem.stories.tsx index c0496df462..1a3626fe8d 100644 --- a/packages/core/src/components/Menu/MenuItem/__stories__/MenuItem.stories.tsx +++ b/packages/core/src/components/Menu/MenuItem/__stories__/MenuItem.stories.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import React from "react"; import MenuItem, { MenuItemProps } from "../MenuItem"; import Menu from "../../Menu/Menu"; diff --git a/packages/core/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.ts b/packages/core/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.ts index 9df03f3e4d..1969089030 100644 --- a/packages/core/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.ts +++ b/packages/core/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.ts @@ -24,8 +24,7 @@ export type LossMenuItemProps = Omit< >; export interface BaseMenuItemProps extends LossMenuItemProps, VibeComponentProps { - // TODO MenuItem can accept only Menu element as first level, it accepts MenuChild[] as subMenu even though it is not valid. - // Should be fixed in next major version + // TODO: [breaking] MenuItem can accept only Menu element as first level, it accepts MenuChild[] as subMenu even though it is not valid. subMenu?: MenuChild | MenuChild[]; children: React.ReactNode; } diff --git a/packages/core/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.ts b/packages/core/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.ts index 4baaacd895..82f575bb4f 100644 --- a/packages/core/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.ts +++ b/packages/core/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.ts @@ -13,7 +13,7 @@ export interface MenuItemIconProps { /** * Label for the icon, used for accessibility. */ - // TODO remove in next major + // TODO: [breaking] remove in next major label?: string; /** * Indicates whether the icon is disabled. Disabled icons appear faded and do not respond to user interactions. diff --git a/packages/core/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.ts b/packages/core/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.ts index 3a9ab99364..b92895fc93 100644 --- a/packages/core/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.ts +++ b/packages/core/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.ts @@ -21,8 +21,7 @@ export interface MenuItemSubMenuProps { * The function may accept an optional object with a `propagate` property, which can be used to control whether the close event should also propagate up to parent menus. */ onClose?: (option?: CloseMenuOption) => void; - // TODO MenuItem can accept only Menu element as first level child, it accepts MenuChild[] as children even though it is not valid. - // Should be fixed in next major version + //// TODO: [breaking] MenuItem can accept only Menu element as first level child, it accepts MenuChild[] as children even though it is not valid // Should be fixed in next major version /** * The children elements of the submenu, should be a Menu component. */ diff --git a/packages/core/src/components/Menu/MenuItemButton/MenuItemButton.tsx b/packages/core/src/components/Menu/MenuItemButton/MenuItemButton.tsx index 2922ac7a2a..7125f9eaef 100644 --- a/packages/core/src/components/Menu/MenuItemButton/MenuItemButton.tsx +++ b/packages/core/src/components/Menu/MenuItemButton/MenuItemButton.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import cx from "classnames"; import React, { FC, useRef } from "react"; import { ComponentDefaultTestId, getTestId } from "../../../tests/test-ids-utils"; diff --git a/packages/core/src/components/Modal/ModalHelper.ts b/packages/core/src/components/Modal/ModalHelper.ts index 506f38d845..cb435b9f04 100644 --- a/packages/core/src/components/Modal/ModalHelper.ts +++ b/packages/core/src/components/Modal/ModalHelper.ts @@ -13,7 +13,6 @@ export enum ModalWidth { } // the type A11yDialog is not exported from a11y-dialog, so mocking it with any for now -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type A11yDialogType = any; export const isModalHeader = (child: ReactElement) => child.type === ModalHeader; diff --git a/packages/core/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.tsx b/packages/core/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.tsx index 44d07c9898..65bf3a78b1 100644 --- a/packages/core/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.tsx +++ b/packages/core/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/default-props-match-prop-types,react/require-default-props */ import { camelCase } from "lodash-es"; import { getStyle } from "../../../../helpers/typesciptCssModulesHelper"; import { ComponentDefaultTestId, getTestId } from "../../../../tests/test-ids-utils"; diff --git a/packages/core/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.tsx b/packages/core/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.tsx index 28241b87eb..2a32c11278 100644 --- a/packages/core/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.tsx +++ b/packages/core/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.tsx @@ -141,7 +141,6 @@ const LinearProgressBar: VibeComponent & color={color} min={min} max={max} - /* eslint-disable-next-line react/no-array-index-key */ id={`bar_${color}_${i}`} key={`bar_${color}_${i}`} /> diff --git a/packages/core/src/components/Steps/StepsHeader.tsx b/packages/core/src/components/Steps/StepsHeader.tsx index 2c2eeb1f3c..8ab4b98c63 100644 --- a/packages/core/src/components/Steps/StepsHeader.tsx +++ b/packages/core/src/components/Steps/StepsHeader.tsx @@ -40,7 +40,7 @@ export const StepsHeader: FC = ({ const SubHeaderComponent: FC = type === "gallery" ? StepsGalleryHeader : StepsNumbersHeader; - // TODO: make finish button as default in next major + // TODO: [breaking] make finish button as default in next major const showFinishButton = useMemo(() => { if (!onFinish) { return; @@ -70,7 +70,6 @@ export const StepsHeader: FC = ({ {areNavigationButtonsHidden ? null : ( <> {showFinishButton ? ( - // @ts-ignore diff --git a/packages/core/src/components/Steps/__stories__/Steps.stories.helpers.tsx b/packages/core/src/components/Steps/__stories__/Steps.stories.helpers.tsx index 713ad506c7..f9007824a9 100644 --- a/packages/core/src/components/Steps/__stories__/Steps.stories.helpers.tsx +++ b/packages/core/src/components/Steps/__stories__/Steps.stories.helpers.tsx @@ -1,7 +1,6 @@ import React, { useCallback, useState } from "react"; import Steps from "../Steps"; -// eslint-disable-next-line react/jsx-key const steps6 = [
,
,
,
,
,
]; export const modifiers = [ diff --git a/packages/core/src/components/Tabs/Tab/Tab.tsx b/packages/core/src/components/Tabs/Tab/Tab.tsx index 9ae453dc53..eb7d890ccc 100644 --- a/packages/core/src/components/Tabs/Tab/Tab.tsx +++ b/packages/core/src/components/Tabs/Tab/Tab.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events */ import cx from "classnames"; import React, { FC, forwardRef, ReactElement, useRef } from "react"; import { noop as NOOP } from "lodash-es"; @@ -93,6 +92,7 @@ const Tab: FC = forwardRef( aria-disabled={disabled} data-testid={dataTestId || getTestId(ComponentDefaultTestId.TAB, id)} > + {/* eslint-disable-next-line jsx-a11y/anchor-is-valid,jsx-a11y/click-events-have-key-events */} !disabled && onClick(value)}> {renderIconAndChildren()} diff --git a/packages/core/src/components/TextField/TextField.tsx b/packages/core/src/components/TextField/TextField.tsx index 24bc5e44c3..cee50cd7cd 100644 --- a/packages/core/src/components/TextField/TextField.tsx +++ b/packages/core/src/components/TextField/TextField.tsx @@ -69,7 +69,7 @@ export interface TextFieldProps extends VibeComponentProps { searchResultsContainerId?: string; activeDescendant?: string; /** Icon names labels for a11y */ - /// TODO Remove layout in next major + /// TODO: [breaking] remove layout iconsNames?: { layout: string; primary: string; diff --git a/packages/core/src/components/ThemeProvider/__stories__/ThemeProvider.stories.helpers.tsx b/packages/core/src/components/ThemeProvider/__stories__/ThemeProvider.stories.helpers.tsx index 3939d99ca5..cbd0b29d4d 100644 --- a/packages/core/src/components/ThemeProvider/__stories__/ThemeProvider.stories.helpers.tsx +++ b/packages/core/src/components/ThemeProvider/__stories__/ThemeProvider.stories.helpers.tsx @@ -95,7 +95,6 @@ export const ThemeProviderProductThemingTemplate = (_args: JSX.IntrinsicAttribut a { text-decoration: none; color: var(--link-color); diff --git a/packages/core/src/components/VirtualizedList/__stories__/VirtualizedList.stories.helpers.js b/packages/core/src/components/VirtualizedList/__stories__/VirtualizedList.stories.helpers.js index 4aa265d882..15a5f5626e 100644 --- a/packages/core/src/components/VirtualizedList/__stories__/VirtualizedList.stories.helpers.js +++ b/packages/core/src/components/VirtualizedList/__stories__/VirtualizedList.stories.helpers.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line default-param-last import React from "react"; import { Tip } from "vibe-storybook-components"; diff --git a/packages/core/src/constants/common.ts b/packages/core/src/constants/common.ts deleted file mode 100644 index 32d45ec47e..0000000000 --- a/packages/core/src/constants/common.ts +++ /dev/null @@ -1,7 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const EMPTY_ARR: any[] = []; - -// TODO replace EMPTY_OBJECT declarations -// export const EMPTY_OBJECT: any = {}; - -// TODO move NOOP here? diff --git a/packages/core/src/constants/index.ts b/packages/core/src/constants/index.ts index 233f1a779b..7ece556b18 100644 --- a/packages/core/src/constants/index.ts +++ b/packages/core/src/constants/index.ts @@ -1,3 +1,2 @@ export * from "./keyCodes"; export * from "./sizes"; -export * from "./common"; diff --git a/packages/core/src/helpers/backwardCompatibilityForProperties.ts b/packages/core/src/helpers/backwardCompatibilityForProperties.ts deleted file mode 100644 index 672eea31e1..0000000000 --- a/packages/core/src/helpers/backwardCompatibilityForProperties.ts +++ /dev/null @@ -1,8 +0,0 @@ -// eslint-disable-next-line default-param-last -export function backwardCompatibilityForProperties(valuesArrayByMostUpdateNaming: Array = [], defaultValue?: T) { - const value = valuesArrayByMostUpdateNaming.find(currentValue => currentValue !== undefined); - if (value === undefined) { - return defaultValue; - } - return value; -} diff --git a/packages/core/src/hooks/useActiveDescendantListFocus/index.ts b/packages/core/src/hooks/useActiveDescendantListFocus/index.ts index ad830caa4b..1c9c5affdb 100644 --- a/packages/core/src/hooks/useActiveDescendantListFocus/index.ts +++ b/packages/core/src/hooks/useActiveDescendantListFocus/index.ts @@ -108,7 +108,7 @@ function useActiveDescendantListFocus({ useCleanVisualFocusOnBlur({ focusedElementRef, visualFocusItemIndex, setVisualFocusItemIndex }); // this callback function is not needed anymore (the developer does not need to replace the element's on click with this callback). - // we keep it for backward compatibility + // TODO: [breaking] remove backward compatibility support const backwardCompatibilityCreateOnClickCallback = useCallback( (itemIndex: number) => (event: React.KeyboardEvent | React.MouseEvent) => onItemClick(event, itemIndex), [onItemClick] @@ -121,7 +121,7 @@ function useActiveDescendantListFocus({ role: focusedElementRole }, // this callback function is not needed anymore (the developer does not need to replace the element's on click with this callback). - // we keep it for backward compatibility + // TODO: [breaking] remove backward compatibility support onItemClickCallback: onItemClick, createOnItemClickCallback: backwardCompatibilityCreateOnClickCallback, setVisualFocusItemId diff --git a/packages/core/src/hooks/useIsOverflowing/useIsOverflowing.ts b/packages/core/src/hooks/useIsOverflowing/useIsOverflowing.ts index a5ade3e352..e0f3614fbe 100644 --- a/packages/core/src/hooks/useIsOverflowing/useIsOverflowing.ts +++ b/packages/core/src/hooks/useIsOverflowing/useIsOverflowing.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-param-reassign */ import { RefObject, useCallback, useState } from "react"; import useResizeObserver from "../useResizeObserver"; diff --git a/packages/core/src/hooks/useMergeRefs.ts b/packages/core/src/hooks/useMergeRefs.ts index f2359feffa..4cb35dbdcf 100644 --- a/packages/core/src/hooks/useMergeRefs.ts +++ b/packages/core/src/hooks/useMergeRefs.ts @@ -8,7 +8,7 @@ import { LegacyRef, MutableRefObject, useMemo } from "react"; * }); */ -// TODO deprecate / replace with useMergeRef in next major version - https://monday.monday.com/boards/3532714909/pulses/5657904659 +// TODO: [breaking] deprecate / replace with useMergeRef in next major version - https://monday.monday.com/boards/3532714909/pulses/5657904659 /** * Returns a single ref callback that merges multiple ref callbacks * @deprecated - for internal usage - use `useMergeRef` hook instead @@ -35,7 +35,6 @@ function assignRef(ref: MutableRefObject | LegacyRef, value: HTMLEleme } try { - // eslint-disable-next-line no-param-reassign (ref as MutableRefObject).current = value; } catch (error) { console.error(error); diff --git a/packages/core/src/hooks/usePopover.ts b/packages/core/src/hooks/usePopover.ts index 7ca38fcec1..e09b483338 100644 --- a/packages/core/src/hooks/usePopover.ts +++ b/packages/core/src/hooks/usePopover.ts @@ -42,7 +42,6 @@ export default function usePopover( enabled: true, phase: "write", fn: ({ state }: { state: State }) => { - // eslint-disable-next-line no-param-reassign state.styles.popper.visibility = isOpen ? "visible" : "hidden"; return state; } diff --git a/packages/core/src/hooks/useSetFocus/index.ts b/packages/core/src/hooks/useSetFocus/index.ts index e6b1b53b6a..17ecae78a4 100644 --- a/packages/core/src/hooks/useSetFocus/index.ts +++ b/packages/core/src/hooks/useSetFocus/index.ts @@ -2,7 +2,7 @@ import { RefObject, useCallback, useEffect, useState } from "react"; import useEventListener from "../useEventListener"; import usePrevious from "../../hooks/usePrevious"; -// TODO Vibe 2.0: rename to useFocus? and maybe change signature to be like useHover? +// TODO: [breaking] rename to useFocus? and maybe change signature to be like useHover? export default function useSetFocus({ ref, focusCallback, diff --git a/packages/core/src/hooks/useThrottledCallback.ts b/packages/core/src/hooks/useThrottledCallback.ts index 2641a6e808..de96e7c4c1 100644 --- a/packages/core/src/hooks/useThrottledCallback.ts +++ b/packages/core/src/hooks/useThrottledCallback.ts @@ -1,4 +1,3 @@ -/* eslint-disable react-hooks/exhaustive-deps */ import { useMemo, useCallback } from "react"; import { throttle } from "lodash-es"; @@ -9,6 +8,7 @@ export default function useThrottledCallback( ) { const throttledFunction = useMemo(() => { return throttle(callback, wait, { trailing }); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [wait, trailing, ...dependencies]); const throttledCallback = useCallback(throttledFunction, [throttledFunction]); diff --git a/packages/core/src/storybook/components/related-components/descriptions/clickable-description/clickable-description.jsx b/packages/core/src/storybook/components/related-components/descriptions/clickable-description/clickable-description.jsx index bc7488f142..b8821b57a3 100644 --- a/packages/core/src/storybook/components/related-components/descriptions/clickable-description/clickable-description.jsx +++ b/packages/core/src/storybook/components/related-components/descriptions/clickable-description/clickable-description.jsx @@ -1,4 +1,3 @@ -/* eslint-disable no-alert */ import React, { useMemo } from "react"; import { RelatedComponent } from "vibe-storybook-components"; import Clickable from "../../../../../components/Clickable/Clickable"; diff --git a/packages/core/src/utils/function-utils.ts b/packages/core/src/utils/function-utils.ts index a37e803b1c..e4f92253d6 100644 --- a/packages/core/src/utils/function-utils.ts +++ b/packages/core/src/utils/function-utils.ts @@ -28,7 +28,6 @@ export function chainRefFunctions( export function chainFunctions(funcs: Array<(args: any) => void | boolean>, allowBreak = false) { return (args: any) => { - // eslint-disable-next-line no-restricted-syntax for (let i = 0; i < funcs.length; i++) { const func = funcs[i]; try { From 845ee900c8ce88799cf894c9ae1d4ed7bd69f1fc Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Sun, 11 Aug 2024 17:30:43 +0300 Subject: [PATCH 2/3] chore: remove enumPropNamesArray --- .../plop/general/component-stories-js.txt | 1 - .../Avatar/__stories__/Avatar.stories.tsx | 1 - .../Badge/__stories__/Badge.stories.tsx | 3 -- .../Box/__stories__/Box.stories.tsx | 28 +------------------ .../__stories__/BreadcrumbsBar.stories.tsx | 1 - .../Button/__stories__/Button.stories.tsx | 1 - .../__stories__/ButtonGroup.stories.tsx | 1 - .../Chips/__stories__/Chips.stories.tsx | 1 - .../__stories__/ColorPicker.stories.tsx | 1 - .../Combobox/__stories__/Combobox.stories.tsx | 1 - .../Counter/__stories__/Counter.stories.tsx | 3 +- .../Dialog/__stories__/Dialog.stories.tsx | 5 +--- .../DialogContentContainer.stories.tsx | 1 - .../Divider/__stories__/Divider.stories.tsx | 3 +- .../Dropdown/__stories__/Dropdown.stories.js | 1 - .../EditableHeading/EditableHeading.tsx | 2 -- .../__stories__/EditableHeading.stories.tsx | 1 - .../components/EditableText/EditableText.tsx | 2 -- .../__stories__/EditableText.stories.tsx | 1 - .../__stories__/ExpandCollapse.stories.tsx | 3 -- .../Flex/__stories__/Flex.stories.tsx | 1 - .../Heading/__stories__/Heading.stories.tsx | 4 +-- .../src/components/IconButton/IconButton.tsx | 2 +- .../__stories__/IconButton.stories.tsx | 1 - .../Label/__stories__/Label.stories.tsx | 3 +- .../Link/__stories__/Link.stories.tsx | 1 - .../Loader/__stories__/Loader.stories.tsx | 3 +- .../__stories__/MenuGridItem.stories.tsx | 5 +--- .../MenuItem/__stories__/MenuItem.stories.tsx | 1 - .../__stories__/MenuItemButton.stories.tsx | 1 - .../__stories__/MenuTitle.stories.tsx | 3 +- .../Modal/__stories__/Modal.stories.tsx | 3 +- .../__stories__/LinearProgressBar.stories.tsx | 3 +- .../Slider/__stories__/Slider.stories.tsx | 3 +- .../__stories__/SplitButton.stories.tsx | 9 +----- .../Steps/__stories__/Steps.stories.tsx | 1 - .../__stories__/TabPanels.stories.tsx | 3 +- .../Text/__stories__/Text.stories.tsx | 5 +--- .../__stories__/TextField.stories.tsx | 1 - .../__stories__/ThemeProvider.stories.tsx | 5 +--- .../Tipseen/__stories__/Tipseen.stories.tsx | 3 +- .../Toast/__stories__/Toast.stories.tsx | 1 - .../Toggle/__stories__/Toggle.stories.tsx | 2 -- 43 files changed, 18 insertions(+), 107 deletions(-) diff --git a/packages/core/plop/general/component-stories-js.txt b/packages/core/plop/general/component-stories-js.txt index cba680b4dc..9adadb6d60 100644 --- a/packages/core/plop/general/component-stories-js.txt +++ b/packages/core/plop/general/component-stories-js.txt @@ -5,7 +5,6 @@ import styles from "./{{properCase componentName}}.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: {{properCase componentName}}, - enumPropNamesArray: [], // List enum props here iconPropNamesArray: [], // List props that are typed as icons here actionPropsArray: [] // List the component's actions here }); diff --git a/packages/core/src/components/Avatar/__stories__/Avatar.stories.tsx b/packages/core/src/components/Avatar/__stories__/Avatar.stories.tsx index 138bc8bd28..1169bef1a4 100644 --- a/packages/core/src/components/Avatar/__stories__/Avatar.stories.tsx +++ b/packages/core/src/components/Avatar/__stories__/Avatar.stories.tsx @@ -11,7 +11,6 @@ import "./Avatar.stories.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: Avatar, - enumPropNamesArray: ["type", "size"], iconPropNamesArray: ["icon"] }); diff --git a/packages/core/src/components/Badge/__stories__/Badge.stories.tsx b/packages/core/src/components/Badge/__stories__/Badge.stories.tsx index be095be819..770e121d96 100644 --- a/packages/core/src/components/Badge/__stories__/Badge.stories.tsx +++ b/packages/core/src/components/Badge/__stories__/Badge.stories.tsx @@ -11,9 +11,6 @@ import { createComponentTemplate, StoryDescription } from "vibe-storybook-compon const metaSettings = createStoryMetaSettingsDecorator({ component: Badge, - enumPropNamesArray: ["anchor", "alignment", "type"], - iconPropNamesArray: [], - actionPropsArray: [], ignoreControlsPropNamesArray: ["children"] }); diff --git a/packages/core/src/components/Box/__stories__/Box.stories.tsx b/packages/core/src/components/Box/__stories__/Box.stories.tsx index 80ac98108e..301073b895 100644 --- a/packages/core/src/components/Box/__stories__/Box.stories.tsx +++ b/packages/core/src/components/Box/__stories__/Box.stories.tsx @@ -4,33 +4,7 @@ import { createStoryMetaSettingsDecorator } from "../../../storybook"; import styles from "./Box.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ - component: Box, - enumPropNamesArray: [ - "className", - "id", - "children", - "disabled", - "border", - "borderColor", - "rounded", - "shadow", - "margin", - "marginX", - "marginY", - "marginTop", - "marginEnd", - "marginBottom", - "marginStart", - "padding", - "paddingX", - "paddingY", - "paddingTop", - "paddingEnd", - "paddingBottom", - "paddingStart", - "backgroundColor", - "textColor" - ] + component: Box }); export default { diff --git a/packages/core/src/components/BreadcrumbsBar/__stories__/BreadcrumbsBar.stories.tsx b/packages/core/src/components/BreadcrumbsBar/__stories__/BreadcrumbsBar.stories.tsx index c6631f30fd..cfd8dae3e7 100644 --- a/packages/core/src/components/BreadcrumbsBar/__stories__/BreadcrumbsBar.stories.tsx +++ b/packages/core/src/components/BreadcrumbsBar/__stories__/BreadcrumbsBar.stories.tsx @@ -9,7 +9,6 @@ import "./BreadcrumbsBar.stories.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: BreadcrumbsBar, - enumPropNamesArray: ["type"] }); const breadcrumbsBarTemplate = (args: BreadcrumbBarProps) => { diff --git a/packages/core/src/components/Button/__stories__/Button.stories.tsx b/packages/core/src/components/Button/__stories__/Button.stories.tsx index a094227356..90190b4262 100644 --- a/packages/core/src/components/Button/__stories__/Button.stories.tsx +++ b/packages/core/src/components/Button/__stories__/Button.stories.tsx @@ -11,7 +11,6 @@ type Story = StoryObj; const metaSettings = createStoryMetaSettingsDecorator({ component: Button, - enumPropNamesArray: ["kind", "size", "color", "type"], iconPropNamesArray: ["leftIcon", "rightIcon", "successIcon"], actionPropsArray: ["onClick"] }); diff --git a/packages/core/src/components/ButtonGroup/__stories__/ButtonGroup.stories.tsx b/packages/core/src/components/ButtonGroup/__stories__/ButtonGroup.stories.tsx index c85327d50c..ef071b1b69 100644 --- a/packages/core/src/components/ButtonGroup/__stories__/ButtonGroup.stories.tsx +++ b/packages/core/src/components/ButtonGroup/__stories__/ButtonGroup.stories.tsx @@ -9,7 +9,6 @@ type Story = StoryObj; const metaSettings = createStoryMetaSettingsDecorator({ component: ButtonGroup, - enumPropNamesArray: ["kind", "size"], actionPropsArray: ["onSelect"] }); diff --git a/packages/core/src/components/Chips/__stories__/Chips.stories.tsx b/packages/core/src/components/Chips/__stories__/Chips.stories.tsx index f76fd65d1f..b4d3edb47b 100644 --- a/packages/core/src/components/Chips/__stories__/Chips.stories.tsx +++ b/packages/core/src/components/Chips/__stories__/Chips.stories.tsx @@ -16,7 +16,6 @@ import styles from "./Chips.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: Chips, - enumPropNamesArray: ["color"], iconPropNamesArray: ["rightIcon", "leftIcon"], actionPropsArray: ["onDelete", "onMouseDown", "onClick"] }); diff --git a/packages/core/src/components/ColorPicker/__stories__/ColorPicker.stories.tsx b/packages/core/src/components/ColorPicker/__stories__/ColorPicker.stories.tsx index e2eba7b355..465233efb5 100644 --- a/packages/core/src/components/ColorPicker/__stories__/ColorPicker.stories.tsx +++ b/packages/core/src/components/ColorPicker/__stories__/ColorPicker.stories.tsx @@ -7,7 +7,6 @@ import { createComponentTemplate } from "vibe-storybook-components"; const metaSettings = createStoryMetaSettingsDecorator({ component: ColorPicker, - enumPropNamesArray: ["colorStyle", "colorSize", "colorShape"], iconPropNamesArray: ["ColorIndicatorIcon", "SelectedIndicatorIcon", "NoColorIcon"], actionPropsArray: [{ name: "onSave", linkedToPropValue: "value" }] }); diff --git a/packages/core/src/components/Combobox/__stories__/Combobox.stories.tsx b/packages/core/src/components/Combobox/__stories__/Combobox.stories.tsx index 9df57757f7..b7479889a9 100644 --- a/packages/core/src/components/Combobox/__stories__/Combobox.stories.tsx +++ b/packages/core/src/components/Combobox/__stories__/Combobox.stories.tsx @@ -18,7 +18,6 @@ import "./Combobox.stories.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: Combobox, - enumPropNamesArray: ["size"], iconPropNamesArray: ["searchIcon"], actionPropsArray: ["onOptionHover", "onOptionLeave", "onFilterChanged"] }); diff --git a/packages/core/src/components/Counter/__stories__/Counter.stories.tsx b/packages/core/src/components/Counter/__stories__/Counter.stories.tsx index 6fb846e5ac..4e9b87905b 100644 --- a/packages/core/src/components/Counter/__stories__/Counter.stories.tsx +++ b/packages/core/src/components/Counter/__stories__/Counter.stories.tsx @@ -10,8 +10,7 @@ import Avatar from "../../Avatar/Avatar"; import "./Counter.stories.scss"; const metaSettings = createStoryMetaSettingsDecorator({ - component: Counter, - enumPropNamesArray: ["size", "color", "kind"] + component: Counter }); const counterTemplate = createComponentTemplate(Counter); diff --git a/packages/core/src/components/Dialog/__stories__/Dialog.stories.tsx b/packages/core/src/components/Dialog/__stories__/Dialog.stories.tsx index 9b02452349..2d8cd126a5 100644 --- a/packages/core/src/components/Dialog/__stories__/Dialog.stories.tsx +++ b/packages/core/src/components/Dialog/__stories__/Dialog.stories.tsx @@ -16,10 +16,7 @@ import { HideShowEvent } from "../DialogConstants"; import { DialogProps } from "../Dialog"; const metaSettings = createStoryMetaSettingsDecorator({ - component: Dialog, - enumPropNamesArray: [], // List enum props here - iconPropNamesArray: [], // List props that are typed as icons here - actionPropsArray: [] // List the component's actions here + component: Dialog }); const showHideArgTypes = { diff --git a/packages/core/src/components/DialogContentContainer/__stories__/DialogContentContainer.stories.tsx b/packages/core/src/components/DialogContentContainer/__stories__/DialogContentContainer.stories.tsx index c400be8700..45d97b0213 100644 --- a/packages/core/src/components/DialogContentContainer/__stories__/DialogContentContainer.stories.tsx +++ b/packages/core/src/components/DialogContentContainer/__stories__/DialogContentContainer.stories.tsx @@ -6,7 +6,6 @@ import DialogContentContainerExample from "./DialogContentContainerExample"; const metaSettings = createStoryMetaSettingsDecorator({ component: DialogContentContainer, - enumPropNamesArray: ["type", "size"], ignoreControlsPropNamesArray: ["children"] }); diff --git a/packages/core/src/components/Divider/__stories__/Divider.stories.tsx b/packages/core/src/components/Divider/__stories__/Divider.stories.tsx index 940f928155..a6e88181cd 100644 --- a/packages/core/src/components/Divider/__stories__/Divider.stories.tsx +++ b/packages/core/src/components/Divider/__stories__/Divider.stories.tsx @@ -4,8 +4,7 @@ import { createStoryMetaSettingsDecorator } from "../../../storybook"; import styles from "./Divider.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ - component: Divider, - enumPropNamesArray: ["direction"] + component: Divider }); const dividerTemplate = (args: DividerProps) => ( diff --git a/packages/core/src/components/Dropdown/__stories__/Dropdown.stories.js b/packages/core/src/components/Dropdown/__stories__/Dropdown.stories.js index 50fd17daa0..4c77258470 100644 --- a/packages/core/src/components/Dropdown/__stories__/Dropdown.stories.js +++ b/packages/core/src/components/Dropdown/__stories__/Dropdown.stories.js @@ -14,7 +14,6 @@ import { fakeFetchUsers } from "./Dropdown.stories.helpers"; const metaSettings = createStoryMetaSettingsDecorator({ component: Dropdown, - enumPropNamesArray: ["size", "menuPosition", "menuPlacement"], actionPropsArray: [ "onMenuOpen", "onMenuClose", diff --git a/packages/core/src/components/EditableHeading/EditableHeading.tsx b/packages/core/src/components/EditableHeading/EditableHeading.tsx index b2e8dcc45b..dce0e3034b 100644 --- a/packages/core/src/components/EditableHeading/EditableHeading.tsx +++ b/packages/core/src/components/EditableHeading/EditableHeading.tsx @@ -12,11 +12,9 @@ import EditableTypography, { EditableTypographyImplementationProps } from "../Ed export interface EditableHeadingProps extends VibeComponentProps, EditableTypographyImplementationProps { /** * Sets the Heading type - * @type {HeadingType} * */ type?: HeadingType; /** Sets the Heading weight - * @type {HeadingWeight} */ weight?: HeadingWeight; } diff --git a/packages/core/src/components/EditableHeading/__stories__/EditableHeading.stories.tsx b/packages/core/src/components/EditableHeading/__stories__/EditableHeading.stories.tsx index 723196cafa..f6507504b3 100644 --- a/packages/core/src/components/EditableHeading/__stories__/EditableHeading.stories.tsx +++ b/packages/core/src/components/EditableHeading/__stories__/EditableHeading.stories.tsx @@ -7,7 +7,6 @@ import styles from "./EditableHeading.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: EditableHeading, - enumPropNamesArray: ["weight", "type"], actionPropsArray: ["onChange"] }); diff --git a/packages/core/src/components/EditableText/EditableText.tsx b/packages/core/src/components/EditableText/EditableText.tsx index ade4ca9ce6..dd251887e2 100644 --- a/packages/core/src/components/EditableText/EditableText.tsx +++ b/packages/core/src/components/EditableText/EditableText.tsx @@ -13,11 +13,9 @@ import cx from "classnames"; export interface EditableTextProps extends VibeComponentProps, EditableTypographyImplementationProps { /** * Sets the Text type - * @type {TextType} * */ type?: TextType; /** Sets the Text weight - * @type {TextWeight} */ weight?: TextWeight; } diff --git a/packages/core/src/components/EditableText/__stories__/EditableText.stories.tsx b/packages/core/src/components/EditableText/__stories__/EditableText.stories.tsx index cf8718c2de..e895ca9d3b 100644 --- a/packages/core/src/components/EditableText/__stories__/EditableText.stories.tsx +++ b/packages/core/src/components/EditableText/__stories__/EditableText.stories.tsx @@ -7,7 +7,6 @@ import styles from "./EditableText.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: EditableText, - enumPropNamesArray: ["weight", "type"], actionPropsArray: ["onChange"] }); diff --git a/packages/core/src/components/ExpandCollapse/__stories__/ExpandCollapse.stories.tsx b/packages/core/src/components/ExpandCollapse/__stories__/ExpandCollapse.stories.tsx index d67f1e3608..dcff081a5c 100644 --- a/packages/core/src/components/ExpandCollapse/__stories__/ExpandCollapse.stories.tsx +++ b/packages/core/src/components/ExpandCollapse/__stories__/ExpandCollapse.stories.tsx @@ -10,9 +10,6 @@ import styles from "./ExpandCollapse.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: ExpandCollapse, - enumPropNamesArray: [], - iconPropNamesArray: [], - actionPropsArray: [], ignoreControlsPropNamesArray: ["headerComponentRenderer"] }); diff --git a/packages/core/src/components/Flex/__stories__/Flex.stories.tsx b/packages/core/src/components/Flex/__stories__/Flex.stories.tsx index f6e060819a..fca54d8585 100644 --- a/packages/core/src/components/Flex/__stories__/Flex.stories.tsx +++ b/packages/core/src/components/Flex/__stories__/Flex.stories.tsx @@ -9,7 +9,6 @@ import styles from "./Flex.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: Flex, - enumPropNamesArray: ["justify", "align"], actionPropsArray: ["onClick"] }); diff --git a/packages/core/src/components/Heading/__stories__/Heading.stories.tsx b/packages/core/src/components/Heading/__stories__/Heading.stories.tsx index 7bfcefa2bd..b3d65761ab 100644 --- a/packages/core/src/components/Heading/__stories__/Heading.stories.tsx +++ b/packages/core/src/components/Heading/__stories__/Heading.stories.tsx @@ -13,9 +13,7 @@ import { Custom } from "../../Icon/Icons"; import styles from "./Heading.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ - component: Heading, - iconPropNamesArray: [], // List props that are typed as icons here - actionPropsArray: [] // List the component's actions here + component: Heading }); const textTemplate = createComponentTemplate(Heading); diff --git a/packages/core/src/components/IconButton/IconButton.tsx b/packages/core/src/components/IconButton/IconButton.tsx index 38a70455db..b0457dd21f 100644 --- a/packages/core/src/components/IconButton/IconButton.tsx +++ b/packages/core/src/components/IconButton/IconButton.tsx @@ -78,7 +78,7 @@ export interface IconButtonProps extends VibeComponentProps { */ tooltipContent?: string; /** - * Kind of button - like