diff --git a/.changeset/three-coins-tie.md b/.changeset/three-coins-tie.md new file mode 100644 index 0000000000..af9472e9fd --- /dev/null +++ b/.changeset/three-coins-tie.md @@ -0,0 +1,6 @@ +--- +'@toptal/picasso-rich-text-editor': patch +'@toptal/picasso': patch +--- + +- rename files according to guidelines diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/index.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/index.ts index cf7aa185a1..9e2e602ec1 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/index.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/index.ts @@ -1 +1 @@ -export { default } from './useOnFocus' +export { default } from './use-on-focus' diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/test.ts index 14c85b3eb6..22e5635123 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/test.ts @@ -1,6 +1,6 @@ import { renderHook, act } from '@testing-library/react-hooks' -import useOnFocus from './useOnFocus' +import useOnFocus from './use-on-focus' let mockEvent: React.FocusEvent diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/useOnFocus.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/use-on-focus.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/useOnFocus.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useOnFocus/use-on-focus.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/index.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/index.ts index 0f8fe671cd..f75838016d 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/index.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/index.ts @@ -1 +1 @@ -export { default } from './useTypographyClasses' +export { default } from './use-typography-classes' diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/test.ts index f2d0c38d3e..b44f0fa39f 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/test.ts @@ -2,7 +2,7 @@ import { renderHook } from '@testing-library/react-hooks' import { getTypographyClassName } from '@toptal/picasso' import type { TypographyOptions } from '@toptal/picasso' -import useTypographyClasses from './useTypographyClasses' +import useTypographyClasses from './use-typography-classes' jest.mock('@toptal/picasso', () => ({ __esModule: true, diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/useTypographyClasses.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/use-typography-classes.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/useTypographyClasses.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/hooks/useTypographyClasses/use-typography-classes.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanupHtmlOutput.test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanup-html-output.test.ts similarity index 96% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanupHtmlOutput.test.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanup-html-output.test.ts index 07e8931598..89c812c7ae 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanupHtmlOutput.test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanup-html-output.test.ts @@ -1,4 +1,4 @@ -import { cleanupHtmlOutput } from './cleanupHtmlOutput' +import { cleanupHtmlOutput } from './cleanup-html-output' // Test cases structure: // removeWhat (string), removeFrom (string), input (string), expected (string) diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanupHtmlOutput.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanup-html-output.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanupHtmlOutput.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/cleanup-html-output.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/createLexicalTheme.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/create-lexical-theme.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/createLexicalTheme.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/create-lexical-theme.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/getDomValue.test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-dom-value.test.ts similarity index 91% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/getDomValue.test.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-dom-value.test.ts index e019fd5291..4b77104bea 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/getDomValue.test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-dom-value.test.ts @@ -1,5 +1,5 @@ import type { ASTType } from '../../RichText' -import { getDomValue } from './getDomValue' +import { getDomValue } from './get-dom-value' describe('getDomValue', () => { it('returns DOM structure from AST', () => { diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/getDomValue.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-dom-value.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/getDomValue.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-dom-value.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/getLexicalNode.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-lexical-node.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/getLexicalNode.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-lexical-node.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/getSelectedNode.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-selected-node.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/getSelectedNode.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/get-selected-node.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/index.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/index.ts index e486f877c3..22a45b3af1 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/index.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/index.ts @@ -1,8 +1,8 @@ -export { registerLexicalEvents } from './registerLexicalEvents' -export { synchronizeToolbarState } from './synchronizeToolbarState' -export { toolbarStateReducer } from './toolbarState' -export { getLexicalNode } from './getLexicalNode' -export { createLexicalTheme } from './createLexicalTheme' -export { getDomValue } from './getDomValue' -export { setEditorValue } from './setEditorValue' -export { cleanupHtmlOutput } from './cleanupHtmlOutput' +export { registerLexicalEvents } from './register-lexical-events' +export { synchronizeToolbarState } from './synchronize-toolbar-state' +export { toolbarStateReducer } from './toolbar-state' +export { getLexicalNode } from './get-lexical-node' +export { createLexicalTheme } from './create-lexical-theme' +export { getDomValue } from './get-dom-value' +export { setEditorValue } from './set-editor-value' +export { cleanupHtmlOutput } from './cleanup-html-output' diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/registerLexicalEvents.test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/register-lexical-events.test.ts similarity index 90% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/registerLexicalEvents.test.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/register-lexical-events.test.ts index 2da24221ee..45908b05e5 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/registerLexicalEvents.test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/register-lexical-events.test.ts @@ -1,7 +1,7 @@ import { COMMAND_PRIORITY_CRITICAL, SELECTION_CHANGE_COMMAND } from 'lexical' -import { registerLexicalEvents } from './registerLexicalEvents' -import type { LexicalRegisterParams } from './registerLexicalEvents' +import { registerLexicalEvents } from './register-lexical-events' +import type { LexicalRegisterParams } from './register-lexical-events' jest.mock('@lexical/react/LexicalComposerContext', () => ({ useLexicalComposerContext: jest.fn().mockReturnValue([]), diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/registerLexicalEvents.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/register-lexical-events.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/registerLexicalEvents.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/register-lexical-events.ts diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/setEditorValue.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/set-editor-value.ts similarity index 95% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/setEditorValue.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/set-editor-value.ts index ac6ded1a1d..78fc3928eb 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/setEditorValue.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/set-editor-value.ts @@ -8,7 +8,7 @@ import { import { $generateNodesFromDOM } from '@lexical/html' import type { ASTType } from '../../RichText' -import { getDomValue } from './getDomValue' +import { getDomValue } from './get-dom-value' export const setEditorValue = (editor: LexicalEditorType, value?: ASTType) => { const root = $getRoot() diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.test.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.test.ts similarity index 96% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.test.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.test.ts index 37a62e1b48..92e4a4a60a 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.test.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.test.ts @@ -10,10 +10,10 @@ import { $isListNode } from '@lexical/list' import { $getNearestNodeOfType } from '@lexical/utils' import { $isHeadingNode } from '@lexical/rich-text' -import { ToolbarActions } from './toolbarState' -import { synchronizeToolbarState } from './synchronizeToolbarState' -import { getLexicalNode } from './getLexicalNode' -import { getSelectedNode } from './getSelectedNode' +import { ToolbarActions } from './toolbar-state' +import { synchronizeToolbarState } from './synchronize-toolbar-state' +import { getLexicalNode } from './get-lexical-node' +import { getSelectedNode } from './get-selected-node' jest.mock('lexical', () => ({ ...jest.requireActual('lexical'), @@ -36,12 +36,12 @@ jest.mock('@lexical/rich-text', () => ({ $isHeadingNode: jest.fn(), })) -jest.mock('./getLexicalNode', () => ({ +jest.mock('./get-lexical-node', () => ({ __esModule: true, getLexicalNode: jest.fn(), })) -jest.mock('./getSelectedNode', () => ({ +jest.mock('./get-selected-node', () => ({ __esModule: true, getSelectedNode: jest.fn(), })) diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.ts similarity index 90% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.ts index 94e865f4ea..921601223e 100644 --- a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronizeToolbarState.ts +++ b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/synchronize-toolbar-state.ts @@ -4,9 +4,9 @@ import { $isListNode, ListNode } from '@lexical/list' import { $getNearestNodeOfType } from '@lexical/utils' import { $isHeadingNode } from '@lexical/rich-text' -import { getLexicalNode } from './getLexicalNode' -import type { ToolbarAction, ToolbarState } from './toolbarState' -import { ToolbarActions } from './toolbarState' +import { getLexicalNode } from './get-lexical-node' +import type { ToolbarAction, ToolbarState } from './toolbar-state' +import { ToolbarActions } from './toolbar-state' import { ALLOWED_HEADER_TYPE } from '../../RichTextEditorToolbar' // Transfers updated Lexical selection state to the toolbar state diff --git a/packages/picasso-rich-text-editor/src/LexicalEditor/utils/toolbarState.ts b/packages/picasso-rich-text-editor/src/LexicalEditor/utils/toolbar-state.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/LexicalEditor/utils/toolbarState.ts rename to packages/picasso-rich-text-editor/src/LexicalEditor/utils/toolbar-state.ts diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/index.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/index.ts index 0f8fe671cd..f75838016d 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/index.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/index.ts @@ -1 +1 @@ -export { default } from './useTypographyClasses' +export { default } from './use-typography-classes' diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/useTypographyClasses.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/use-typography-classes.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/useTypographyClasses.ts rename to packages/picasso-rich-text-editor/src/RichTextEditor/hooks/useTypographyClasses/use-typography-classes.ts diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actionTypes.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/action-types.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actionTypes.ts rename to packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/action-types.ts diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actions.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actions.ts index 1a6ae93e82..dd13c650c8 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actions.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/actions.ts @@ -1,6 +1,6 @@ import type { Dispatch } from 'react' -import actionTypes from './actionTypes' +import actionTypes from './action-types' import type { SetBoldActionType, SetHeaderActionType, diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/index.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/index.ts index c7cecf8d34..309c1f5826 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/index.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/index.ts @@ -1,7 +1,7 @@ import actions from './actions' import reducer from './reducer' -import initialState from './initialState' -import actionTypes from './actionTypes' +import initialState from './initial-state' +import actionTypes from './action-types' export * from './types' export { actions, actionTypes, reducer, initialState } diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/initialState.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/initial-state.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/initialState.ts rename to packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/initial-state.ts diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/reducer.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/reducer.ts index 3f15fb0284..694ca445e0 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/reducer.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/reducer.ts @@ -1,6 +1,6 @@ -import actionTypes from './actionTypes' +import actionTypes from './action-types' import type { ToolbarReducerType } from './types' -import initialState from './initialState' +import initialState from './initial-state' const reducer: ToolbarReducerType = (state = initialState, action) => { switch (action.type) { diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/types.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/types.ts index 8b9f69f802..704b352e84 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/types.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/store/toolbar/types.ts @@ -1,4 +1,4 @@ -import type actionTypes from './actionTypes' +import type actionTypes from './action-types' export type HeaderValue = '3' | '' export type BoldValue = boolean diff --git a/packages/picasso-rich-text-editor/src/RichTextEditor/styles.ts b/packages/picasso-rich-text-editor/src/RichTextEditor/styles.ts index 591d9106b0..4c27ddb31a 100644 --- a/packages/picasso-rich-text-editor/src/RichTextEditor/styles.ts +++ b/packages/picasso-rich-text-editor/src/RichTextEditor/styles.ts @@ -1,7 +1,7 @@ import { outline } from '@toptal/picasso-shared' import type { Theme } from '@material-ui/core/styles' import { createStyles } from '@material-ui/core/styles' -import highlightAutofillStyles from '@toptal/picasso/InputBase/highlightStyles' +import highlightAutofillStyles from '@toptal/picasso/InputBase/highlight-styles' export default (theme: Theme) => { const { palette, sizes } = theme diff --git a/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/index.ts b/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/index.ts index acf8b1789f..cbf76a4e19 100644 --- a/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/index.ts +++ b/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/index.ts @@ -1 +1 @@ -export { replaceHeadingNodes } from './replaceHeadingNodes' +export { replaceHeadingNodes } from './replace-heading-nodes' diff --git a/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replaceHeadingNodes.test.ts b/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replace-heading-nodes.test.ts similarity index 97% rename from packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replaceHeadingNodes.test.ts rename to packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replace-heading-nodes.test.ts index cab8d8d20b..9932d97759 100644 --- a/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replaceHeadingNodes.test.ts +++ b/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replace-heading-nodes.test.ts @@ -2,7 +2,7 @@ import type { ParagraphNode, TextNode } from 'lexical' import type { HeadingNode } from '@lexical/rich-text' import { $createParagraphNode, $createTextNode } from 'lexical' -import { replaceHeadingNodes } from './replaceHeadingNodes' +import { replaceHeadingNodes } from './replace-heading-nodes' jest.mock('lexical', () => ({ __esModule: true, diff --git a/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replaceHeadingNodes.ts b/packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replace-heading-nodes.ts similarity index 100% rename from packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replaceHeadingNodes.ts rename to packages/picasso-rich-text-editor/src/plugins/HeadingsReplacementPlugin/utils/replace-heading-nodes.ts diff --git a/packages/picasso-rich-text-editor/src/plugins/LinkPlugin/LinkPluginButton.tsx b/packages/picasso-rich-text-editor/src/plugins/LinkPlugin/LinkPluginButton.tsx index e4f01ba2cf..f01d48d85c 100644 --- a/packages/picasso-rich-text-editor/src/plugins/LinkPlugin/LinkPluginButton.tsx +++ b/packages/picasso-rich-text-editor/src/plugins/LinkPlugin/LinkPluginButton.tsx @@ -8,7 +8,7 @@ import { Link16 } from '@toptal/picasso' import { $createTextNode, $getSelection, $isRangeSelection } from 'lexical' import React, { useCallback, useState } from 'react' -import { getSelectedNode } from '../../LexicalEditor/utils/getSelectedNode' +import { getSelectedNode } from '../../LexicalEditor/utils/get-selected-node' import { useRTEPluginContext, useRTEUpdate } from '../api' import RichTextEditorButton from '../../RichTextEditorButton' import { sanitizeUrl, validateUrl } from './utils/url' diff --git a/packages/picasso-rich-text-editor/src/plugins/api.tsx b/packages/picasso-rich-text-editor/src/plugins/api.tsx index 3c857b8b55..7b212cccc0 100644 --- a/packages/picasso-rich-text-editor/src/plugins/api.tsx +++ b/packages/picasso-rich-text-editor/src/plugins/api.tsx @@ -3,7 +3,7 @@ import type { Klass, LexicalNode } from 'lexical' import type { ReactElement, ReactNode } from 'react' import React, { createContext, useContext, useEffect } from 'react' -import { registerLexicalEvents } from '../LexicalEditor/utils/registerLexicalEvents' +import { registerLexicalEvents } from '../LexicalEditor/utils/register-lexical-events' import { ToolbarProvider } from './Toolbar/Toolbar' export const RTEPluginMeta = Symbol('PicassoRTEPluginMeta') diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/index.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/index.ts index f28571d07c..b9bb9290d5 100644 --- a/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/index.ts +++ b/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/index.ts @@ -1 +1 @@ -export { default } from './useAvatarStates' +export { default } from './use-avatar-states' diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/test.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/test.ts index 68b48f38a4..a8e2d48503 100644 --- a/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/test.ts +++ b/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react-hooks' -import useAvatarStates from './useAvatarStates' +import useAvatarStates from './use-avatar-states' describe('useAvatarStates', () => { it('returns hovered state as true', () => { diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/useAvatarStates.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-states/use-avatar-states.ts similarity index 100% rename from packages/picasso/src/AvatarUpload/hooks/use-avatar-states/useAvatarStates.ts rename to packages/picasso/src/AvatarUpload/hooks/use-avatar-states/use-avatar-states.ts diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/index.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/index.ts index cb6eef8db8..8ee509b454 100644 --- a/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/index.ts +++ b/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/index.ts @@ -1 +1 @@ -export { default } from './useAvatarUpload' +export { default } from './use-avatar-upload' diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/test.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/test.ts index 5927969f61..9007d0908b 100644 --- a/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/test.ts +++ b/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks' -import useAvatarUpload from './useAvatarUpload' +import useAvatarUpload from './use-avatar-upload' describe('useAvatarUpload', () => { describe('when src exist and uploading false', () => { diff --git a/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/useAvatarUpload.ts b/packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/use-avatar-upload.ts similarity index 100% rename from packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/useAvatarUpload.ts rename to packages/picasso/src/AvatarUpload/hooks/use-avatar-upload/use-avatar-upload.ts diff --git a/packages/picasso/src/Carousel/hooks/useAutoplay/index.ts b/packages/picasso/src/Carousel/hooks/useAutoplay/index.ts index a5bb6a8176..4acec816b0 100644 --- a/packages/picasso/src/Carousel/hooks/useAutoplay/index.ts +++ b/packages/picasso/src/Carousel/hooks/useAutoplay/index.ts @@ -1 +1 @@ -export { default } from './useAutoplay' +export { default } from './use-autoplay' diff --git a/packages/picasso/src/Carousel/hooks/useAutoplay/useAutoplay.ts b/packages/picasso/src/Carousel/hooks/useAutoplay/use-autoplay.ts similarity index 100% rename from packages/picasso/src/Carousel/hooks/useAutoplay/useAutoplay.ts rename to packages/picasso/src/Carousel/hooks/useAutoplay/use-autoplay.ts diff --git a/packages/picasso/src/Carousel/hooks/useCarousel/index.ts b/packages/picasso/src/Carousel/hooks/useCarousel/index.ts index 190051fd94..e4cd9b9a45 100644 --- a/packages/picasso/src/Carousel/hooks/useCarousel/index.ts +++ b/packages/picasso/src/Carousel/hooks/useCarousel/index.ts @@ -1 +1 @@ -export { default } from './useCarousel' +export { default } from './use-carousel' diff --git a/packages/picasso/src/Carousel/hooks/useCarousel/useCarousel.ts b/packages/picasso/src/Carousel/hooks/useCarousel/use-carousel.ts similarity index 98% rename from packages/picasso/src/Carousel/hooks/useCarousel/useCarousel.ts rename to packages/picasso/src/Carousel/hooks/useCarousel/use-carousel.ts index 81331da7b9..4ce9fe798b 100644 --- a/packages/picasso/src/Carousel/hooks/useCarousel/useCarousel.ts +++ b/packages/picasso/src/Carousel/hooks/useCarousel/use-carousel.ts @@ -1,7 +1,7 @@ import { useRef, useCallback, useState, useEffect } from 'react' import Glider from 'glider-js' -import isOnLastPage from '../../utils/isOnLastPage' +import isOnLastPage from '../../utils' import useAutoplay from '../useAutoplay' type Props = { diff --git a/packages/picasso/src/Carousel/utils/index.ts b/packages/picasso/src/Carousel/utils/index.ts new file mode 100644 index 0000000000..0656224510 --- /dev/null +++ b/packages/picasso/src/Carousel/utils/index.ts @@ -0,0 +1 @@ +export { default } from './is-on-last-page' diff --git a/packages/picasso/src/Carousel/utils/isOnLastPage/test.ts b/packages/picasso/src/Carousel/utils/is-on-last-page.test.ts similarity index 93% rename from packages/picasso/src/Carousel/utils/isOnLastPage/test.ts rename to packages/picasso/src/Carousel/utils/is-on-last-page.test.ts index 6e41bd5f64..cd0246c2bf 100644 --- a/packages/picasso/src/Carousel/utils/isOnLastPage/test.ts +++ b/packages/picasso/src/Carousel/utils/is-on-last-page.test.ts @@ -1,4 +1,4 @@ -import isOnLastPage from './isOnLastPage' +import isOnLastPage from './is-on-last-page' describe('isOnLastPage', () => { it('returns expected results', () => { diff --git a/packages/picasso/src/Carousel/utils/isOnLastPage/isOnLastPage.ts b/packages/picasso/src/Carousel/utils/is-on-last-page.ts similarity index 100% rename from packages/picasso/src/Carousel/utils/isOnLastPage/isOnLastPage.ts rename to packages/picasso/src/Carousel/utils/is-on-last-page.ts diff --git a/packages/picasso/src/Carousel/utils/isOnLastPage/index.ts b/packages/picasso/src/Carousel/utils/isOnLastPage/index.ts deleted file mode 100644 index 43ad6d4976..0000000000 --- a/packages/picasso/src/Carousel/utils/isOnLastPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './isOnLastPage' diff --git a/packages/picasso/src/CarouselGradient/CarouselGradient.tsx b/packages/picasso/src/CarouselGradient/CarouselGradient.tsx index 7a213b293f..5e8954767d 100644 --- a/packages/picasso/src/CarouselGradient/CarouselGradient.tsx +++ b/packages/picasso/src/CarouselGradient/CarouselGradient.tsx @@ -3,7 +3,7 @@ import cx from 'classnames' import type { Theme } from '@material-ui/core/styles' import { makeStyles } from '@material-ui/core/styles' -import gradientWidth from './utils/gradientWidth' +import gradientWidth from './utils/gradient-width' import styles from './styles' const useStyles = makeStyles(styles, { name: 'CarouselGradient' }) diff --git a/packages/picasso/src/CarouselGradient/utils/gradientWidth/test.ts b/packages/picasso/src/CarouselGradient/utils/gradient-width.test.ts similarity index 87% rename from packages/picasso/src/CarouselGradient/utils/gradientWidth/test.ts rename to packages/picasso/src/CarouselGradient/utils/gradient-width.test.ts index 631c2ed90b..d0fcc24f2e 100644 --- a/packages/picasso/src/CarouselGradient/utils/gradientWidth/test.ts +++ b/packages/picasso/src/CarouselGradient/utils/gradient-width.test.ts @@ -1,4 +1,4 @@ -import gradientWidth from './gradientWidth' +import gradientWidth from './gradient-width' describe('gradientWidth', () => { it('returns the expected gradient width', () => { diff --git a/packages/picasso/src/CarouselGradient/utils/gradientWidth/gradientWidth.ts b/packages/picasso/src/CarouselGradient/utils/gradient-width.ts similarity index 100% rename from packages/picasso/src/CarouselGradient/utils/gradientWidth/gradientWidth.ts rename to packages/picasso/src/CarouselGradient/utils/gradient-width.ts diff --git a/packages/picasso/src/CarouselGradient/utils/gradientWidth/index.ts b/packages/picasso/src/CarouselGradient/utils/gradientWidth/index.ts deleted file mode 100644 index 556291cc42..0000000000 --- a/packages/picasso/src/CarouselGradient/utils/gradientWidth/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './gradientWidth' diff --git a/packages/picasso/src/CarouselGradient/utils/index.ts b/packages/picasso/src/CarouselGradient/utils/index.ts new file mode 100644 index 0000000000..cbfbe7635c --- /dev/null +++ b/packages/picasso/src/CarouselGradient/utils/index.ts @@ -0,0 +1 @@ +export { default } from './gradient-width' diff --git a/packages/picasso/src/Input/styles.ts b/packages/picasso/src/Input/styles.ts index 3e9b4721c2..738909a45b 100644 --- a/packages/picasso/src/Input/styles.ts +++ b/packages/picasso/src/Input/styles.ts @@ -1,7 +1,7 @@ import type { Theme } from '@material-ui/core/styles' import { createStyles } from '@material-ui/core/styles' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' import '../InputBase/styles' import '../InputLabel/styles' import '../OutlinedInput/styles' diff --git a/packages/picasso/src/InputBase/highlightStyles.ts b/packages/picasso/src/InputBase/highlight-styles.ts similarity index 100% rename from packages/picasso/src/InputBase/highlightStyles.ts rename to packages/picasso/src/InputBase/highlight-styles.ts diff --git a/packages/picasso/src/NativeSelect/styles.ts b/packages/picasso/src/NativeSelect/styles.ts index 74bc66500c..01946a5b5c 100644 --- a/packages/picasso/src/NativeSelect/styles.ts +++ b/packages/picasso/src/NativeSelect/styles.ts @@ -5,7 +5,7 @@ import '../InputLabel/styles' import '../InputBase/styles' import '../Input/styles' import '../Loader/styles' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' export default (theme: Theme) => { const { palette } = theme diff --git a/packages/picasso/src/NonNativeSelect/styles.ts b/packages/picasso/src/NonNativeSelect/styles.ts index 9af4a6c5dc..dacc8fa49d 100644 --- a/packages/picasso/src/NonNativeSelect/styles.ts +++ b/packages/picasso/src/NonNativeSelect/styles.ts @@ -7,7 +7,7 @@ import '../Input/styles' import '../Menu/styles' import '../MenuItem/styles' import '../Loader/styles' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' export default (theme: Theme) => { const { palette } = theme diff --git a/packages/picasso/src/NumberInput/styles.ts b/packages/picasso/src/NumberInput/styles.ts index 00392e6097..d9eb17954d 100644 --- a/packages/picasso/src/NumberInput/styles.ts +++ b/packages/picasso/src/NumberInput/styles.ts @@ -1,7 +1,7 @@ import type { Theme } from '@material-ui/core/styles' import { createStyles } from '@material-ui/core/styles' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' export default (theme: Theme) => createStyles({ diff --git a/packages/picasso/src/PasswordInput/styles.ts b/packages/picasso/src/PasswordInput/styles.ts index d328dd2198..10f3e4be0e 100644 --- a/packages/picasso/src/PasswordInput/styles.ts +++ b/packages/picasso/src/PasswordInput/styles.ts @@ -1,7 +1,7 @@ import type { Theme } from '@material-ui/core/styles' import { createStyles } from '@material-ui/core/styles' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' export default (theme: Theme) => { const { spacing } = theme diff --git a/packages/picasso/src/SidebarItem/SidebarItemHeader.tsx b/packages/picasso/src/SidebarItem/SidebarItemHeader.tsx index f00781f866..5f020e63ff 100644 --- a/packages/picasso/src/SidebarItem/SidebarItemHeader.tsx +++ b/packages/picasso/src/SidebarItem/SidebarItemHeader.tsx @@ -8,8 +8,7 @@ import SidebarItemContent from '../SidebarItemContent' import styles from './styles' import type { Props } from './types' import { useSubMenuContext } from './SubMenuContextProvider' -import getBadgeProps from './utils/getBadgeProps/getBadgeProps' -import getTagProps from './utils/getTagProps/getTagProps' +import { getTagProps, getBadgeProps } from './utils' const useStyles = makeStyles(styles, { name: 'PicassoSidebarItemHeader', diff --git a/packages/picasso/src/SidebarItem/utils/getBadgeProps/test.ts b/packages/picasso/src/SidebarItem/utils/get-badge-props.test.ts similarity index 88% rename from packages/picasso/src/SidebarItem/utils/getBadgeProps/test.ts rename to packages/picasso/src/SidebarItem/utils/get-badge-props.test.ts index 9ccacb985b..5bbc3b4e4b 100644 --- a/packages/picasso/src/SidebarItem/utils/getBadgeProps/test.ts +++ b/packages/picasso/src/SidebarItem/utils/get-badge-props.test.ts @@ -1,5 +1,5 @@ -import getBadgeProps from './getBadgeProps' -import type { SidebarBadgeProps } from '../../../SidebarItemContent' +import getBadgeProps from './get-badge-props' +import type { SidebarBadgeProps } from '../../SidebarItemContent' describe('getBadgeProps', () => { describe('when number value is passed', () => { @@ -12,6 +12,7 @@ describe('getBadgeProps', () => { } ) }) + describe('when falsy input is passed', () => { it('returns the same value', () => { const value = undefined @@ -20,6 +21,7 @@ describe('getBadgeProps', () => { expect(props).toEqual(value) }) }) + describe('when badge props object is passed', () => { const values: SidebarBadgeProps[] = [ { content: 5 }, diff --git a/packages/picasso/src/SidebarItem/utils/getBadgeProps/getBadgeProps.ts b/packages/picasso/src/SidebarItem/utils/get-badge-props.ts similarity index 72% rename from packages/picasso/src/SidebarItem/utils/getBadgeProps/getBadgeProps.ts rename to packages/picasso/src/SidebarItem/utils/get-badge-props.ts index a300b806f0..394134ea31 100644 --- a/packages/picasso/src/SidebarItem/utils/getBadgeProps/getBadgeProps.ts +++ b/packages/picasso/src/SidebarItem/utils/get-badge-props.ts @@ -1,4 +1,4 @@ -import type { SidebarBadgeProps } from '../../../SidebarItemContent' +import type { SidebarBadgeProps } from '../../SidebarItemContent' const getBadgeProps = (badge?: number | SidebarBadgeProps) => { if (typeof badge === 'number') { diff --git a/packages/picasso/src/SidebarItem/utils/getTagProps/test.ts b/packages/picasso/src/SidebarItem/utils/get-tag-props.test.ts similarity index 88% rename from packages/picasso/src/SidebarItem/utils/getTagProps/test.ts rename to packages/picasso/src/SidebarItem/utils/get-tag-props.test.ts index abcdf479c4..81cfcfbd7c 100644 --- a/packages/picasso/src/SidebarItem/utils/getTagProps/test.ts +++ b/packages/picasso/src/SidebarItem/utils/get-tag-props.test.ts @@ -1,5 +1,5 @@ -import type { SidebarTagProps } from '../../../SidebarItemContent' -import getTagProps from './getTagProps' +import type { SidebarTagProps } from '../../SidebarItemContent' +import getTagProps from './get-tag-props' describe('getTagProps', () => { describe('when string value is passed', () => { diff --git a/packages/picasso/src/SidebarItem/utils/getTagProps/getTagProps.ts b/packages/picasso/src/SidebarItem/utils/get-tag-props.ts similarity index 71% rename from packages/picasso/src/SidebarItem/utils/getTagProps/getTagProps.ts rename to packages/picasso/src/SidebarItem/utils/get-tag-props.ts index 54c7bd2a10..009ad821a8 100644 --- a/packages/picasso/src/SidebarItem/utils/getTagProps/getTagProps.ts +++ b/packages/picasso/src/SidebarItem/utils/get-tag-props.ts @@ -1,4 +1,4 @@ -import type { SidebarTagProps } from '../../../SidebarItemContent' +import type { SidebarTagProps } from '../../SidebarItemContent' const getTagProps = (tag?: string | SidebarTagProps) => { if (typeof tag === 'string') { diff --git a/packages/picasso/src/SidebarItem/utils/index.ts b/packages/picasso/src/SidebarItem/utils/index.ts new file mode 100644 index 0000000000..c42ee8b6ba --- /dev/null +++ b/packages/picasso/src/SidebarItem/utils/index.ts @@ -0,0 +1,2 @@ +export { default as getBadgeProps } from './get-badge-props' +export { default as getTagProps } from './get-tag-props' diff --git a/packages/picasso/src/SidebarItemContent/SidebarItemContent.tsx b/packages/picasso/src/SidebarItemContent/SidebarItemContent.tsx index 6af3c4a62f..b8786b3987 100644 --- a/packages/picasso/src/SidebarItemContent/SidebarItemContent.tsx +++ b/packages/picasso/src/SidebarItemContent/SidebarItemContent.tsx @@ -14,7 +14,7 @@ import { getReactNodeTextContent } from '../utils' import styles from './styles' import type { Props, SidebarBadgeProps } from './types' import Indicator from '../Indicator' -import useIndicatorOnParentItem from './useIndicatorOnParentItem' +import useIndicatorOnParentItem from './use-indicator-on-parent-item' const useStyles = makeStyles(styles, { name: 'PicassoSidebarItemContent', diff --git a/packages/picasso/src/SidebarItemContent/useIndicatorOnParentItem.ts b/packages/picasso/src/SidebarItemContent/use-indicator-on-parent-item.ts similarity index 100% rename from packages/picasso/src/SidebarItemContent/useIndicatorOnParentItem.ts rename to packages/picasso/src/SidebarItemContent/use-indicator-on-parent-item.ts diff --git a/packages/picasso/src/StaticTreeView/StaticTreeView.tsx b/packages/picasso/src/StaticTreeView/StaticTreeView.tsx index 49cd7614e3..a959b90f7d 100644 --- a/packages/picasso/src/StaticTreeView/StaticTreeView.tsx +++ b/packages/picasso/src/StaticTreeView/StaticTreeView.tsx @@ -8,7 +8,7 @@ import { TreeViewSvg, useFinalMargins, } from '../TreeView/shared' -import { findExtremeNodes } from './utils/findExtremeNodes' +import { findExtremeNodes } from './utils/find-extreme-nodes' type SvgMeasurements = { width: number diff --git a/packages/picasso/src/StaticTreeView/utils/findExtremeNodes.ts b/packages/picasso/src/StaticTreeView/utils/find-extreme-nodes.ts similarity index 100% rename from packages/picasso/src/StaticTreeView/utils/findExtremeNodes.ts rename to packages/picasso/src/StaticTreeView/utils/find-extreme-nodes.ts diff --git a/packages/picasso/src/StaticTreeView/utils/test.ts b/packages/picasso/src/StaticTreeView/utils/test.ts index dcd7d50302..712c86ec2e 100644 --- a/packages/picasso/src/StaticTreeView/utils/test.ts +++ b/packages/picasso/src/StaticTreeView/utils/test.ts @@ -1,4 +1,4 @@ -import { findExtremeNodes } from './findExtremeNodes' +import { findExtremeNodes } from './find-extreme-nodes' describe('findExtremeNodes', () => { it('finds top-most and left-most nodes', () => { diff --git a/packages/picasso/src/TagSelectorInput/styles.ts b/packages/picasso/src/TagSelectorInput/styles.ts index 452ed6b73c..a6c60bef84 100644 --- a/packages/picasso/src/TagSelectorInput/styles.ts +++ b/packages/picasso/src/TagSelectorInput/styles.ts @@ -2,7 +2,7 @@ import type { Theme } from '@material-ui/core/styles' import { createStyles } from '@material-ui/core/styles' import { rem } from '@toptal/picasso-shared' -import highlightAutofillStyles from '../InputBase/highlightStyles' +import highlightAutofillStyles from '../InputBase/highlight-styles' export const TAG_SELECTOR_INPUT_GUTTER_SIZE = rem('4px') const END_ADORNMENT_PADDING = '0.625em' diff --git a/packages/picasso/src/Tooltip/Tooltip.tsx b/packages/picasso/src/Tooltip/Tooltip.tsx index 388ac113fc..0d2ce5e776 100644 --- a/packages/picasso/src/Tooltip/Tooltip.tsx +++ b/packages/picasso/src/Tooltip/Tooltip.tsx @@ -16,9 +16,9 @@ import { usePicassoRoot } from '@toptal/picasso-provider' import Typography from '../Typography' import styles from './styles' import type { ChildrenProps, ContainerValue } from './types' -import { useTooltipState } from './useTooltipState' -import { useTooltipHandlers } from './useTooltipHandlers' -import { useTooltipFollowCursor } from './useTooltipFollowCursor' +import { useTooltipState } from './use-tooltip-state' +import { useTooltipHandlers } from './use-tooltip-handlers' +import { useTooltipFollowCursor } from './use-tooltip-follow-cursor' export type DelayType = 'short' | 'long' diff --git a/packages/picasso/src/Tooltip/test.tsx b/packages/picasso/src/Tooltip/test.tsx index 31afffc318..1fdc2b4b65 100644 --- a/packages/picasso/src/Tooltip/test.tsx +++ b/packages/picasso/src/Tooltip/test.tsx @@ -9,7 +9,7 @@ import Tooltip from './Tooltip' import { mouseMoveDebounceTimeout, mouseMoveCloseTooltipDistance, -} from './useTooltipFollowCursor' +} from './use-tooltip-follow-cursor' const TOOLTIP_SHORT_DELAY = 200 const TOOLTIP_LONG_DELAY = 500 diff --git a/packages/picasso/src/Tooltip/useTooltipFollowCursor.ts b/packages/picasso/src/Tooltip/use-tooltip-follow-cursor.ts similarity index 98% rename from packages/picasso/src/Tooltip/useTooltipFollowCursor.ts rename to packages/picasso/src/Tooltip/use-tooltip-follow-cursor.ts index c89692567e..858b7e8c4a 100644 --- a/packages/picasso/src/Tooltip/useTooltipFollowCursor.ts +++ b/packages/picasso/src/Tooltip/use-tooltip-follow-cursor.ts @@ -3,7 +3,7 @@ import { useCallback, useRef } from 'react' import type PopperJs from 'popper.js' import debounce from 'debounce' -import type { TooltipState } from './useTooltipState' +import type { TooltipState } from './use-tooltip-state' interface UseTooltipFollowCursorOptions { followCursor: boolean diff --git a/packages/picasso/src/Tooltip/useTooltipHandlers.ts b/packages/picasso/src/Tooltip/use-tooltip-handlers.ts similarity index 97% rename from packages/picasso/src/Tooltip/useTooltipHandlers.ts rename to packages/picasso/src/Tooltip/use-tooltip-handlers.ts index 50d6e51401..74719f42d7 100644 --- a/packages/picasso/src/Tooltip/useTooltipHandlers.ts +++ b/packages/picasso/src/Tooltip/use-tooltip-handlers.ts @@ -1,7 +1,7 @@ import type { ChangeEvent, MouseEvent, ReactElement } from 'react' import { cloneElement, useState } from 'react' -import type { TooltipState } from './useTooltipState' +import type { TooltipState } from './use-tooltip-state' import type { ChildrenProps } from './types' interface UseTooltipHandlersOptions { diff --git a/packages/picasso/src/Tooltip/useTooltipState.ts b/packages/picasso/src/Tooltip/use-tooltip-state.ts similarity index 100% rename from packages/picasso/src/Tooltip/useTooltipState.ts rename to packages/picasso/src/Tooltip/use-tooltip-state.ts diff --git a/packages/picasso/src/TreeView/TreeView.tsx b/packages/picasso/src/TreeView/TreeView.tsx index 8407392031..56caefa4ab 100644 --- a/packages/picasso/src/TreeView/TreeView.tsx +++ b/packages/picasso/src/TreeView/TreeView.tsx @@ -9,10 +9,10 @@ import type { Theme } from '@material-ui/core/styles' import { makeStyles } from '@material-ui/core/styles' import { TreeViewContext } from './TreeViewContainer' -import { useTree } from './useTree' +import { useTree } from './use-tree' import Zoom from './Zoom' import styles from './styles' -import { useZoom } from './useZoom' +import { useZoom } from './use-zoom' import { DEFAULT_SCALE_EXTENT, ZERO_VECTOR2, @@ -20,7 +20,7 @@ import { } from './variables' import type { TreeViewPropsBase, Vector2 } from './types' import { TreeViewSvg } from './TreeViewSvg' -import { useFinalMargins } from './useFinalMargins' +import { useFinalMargins } from './use-final-margins' import { usePropDeprecationWarning } from '../utils/use-deprecation-warnings' export interface Props extends TreeViewPropsBase { diff --git a/packages/picasso/src/TreeView/index.ts b/packages/picasso/src/TreeView/index.ts index 405732b5b6..c0f2ca1c2d 100644 --- a/packages/picasso/src/TreeView/index.ts +++ b/packages/picasso/src/TreeView/index.ts @@ -1,5 +1,5 @@ export { default } from './TreeView' export { TreeViewContainer, TreeViewContext } from './TreeViewContainer' -export { useTreeView } from './useTreeView' +export { useTreeView } from './use-tree-view' export { TreeNodeAvatar } from './PointNode/TreeNodeAvatar' export type { TreeNodeInterface } from './types' diff --git a/packages/picasso/src/TreeView/shared.ts b/packages/picasso/src/TreeView/shared.ts index 9cb807118d..fb9c47bef8 100644 --- a/packages/picasso/src/TreeView/shared.ts +++ b/packages/picasso/src/TreeView/shared.ts @@ -1,5 +1,5 @@ -export { useTree } from './useTree' +export { useTree } from './use-tree' export { TreeViewSvg } from './TreeViewSvg' -export { useFinalMargins } from './useFinalMargins' +export { useFinalMargins } from './use-final-margins' export type { TreeViewPropsBase } from './types' export { TreeViewPropsDefaults } from './variables' diff --git a/packages/picasso/src/TreeView/useFinalMargins.ts b/packages/picasso/src/TreeView/use-final-margins.ts similarity index 100% rename from packages/picasso/src/TreeView/useFinalMargins.ts rename to packages/picasso/src/TreeView/use-final-margins.ts diff --git a/packages/picasso/src/TreeView/useNodes.ts b/packages/picasso/src/TreeView/use-nodes.ts similarity index 100% rename from packages/picasso/src/TreeView/useNodes.ts rename to packages/picasso/src/TreeView/use-nodes.ts diff --git a/packages/picasso/src/TreeView/useTreeView.ts b/packages/picasso/src/TreeView/use-tree-view.ts similarity index 100% rename from packages/picasso/src/TreeView/useTreeView.ts rename to packages/picasso/src/TreeView/use-tree-view.ts diff --git a/packages/picasso/src/TreeView/useTree.ts b/packages/picasso/src/TreeView/use-tree.ts similarity index 99% rename from packages/picasso/src/TreeView/useTree.ts rename to packages/picasso/src/TreeView/use-tree.ts index 2071b74801..28fd527203 100644 --- a/packages/picasso/src/TreeView/useTree.ts +++ b/packages/picasso/src/TreeView/use-tree.ts @@ -2,7 +2,7 @@ import { useMemo } from 'react' import type { HierarchyPointNode } from 'd3' import { hierarchy, tree } from 'd3' -import { useNodes } from './useNodes' +import { useNodes } from './use-nodes' import type { DirectionsType, DynamicPointLink, diff --git a/packages/picasso/src/TreeView/useZoom.ts b/packages/picasso/src/TreeView/use-zoom.ts similarity index 100% rename from packages/picasso/src/TreeView/useZoom.ts rename to packages/picasso/src/TreeView/use-zoom.ts