From fd115bc113c0777ed00c203ff2c9fa4ea4d72f50 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Tue, 14 Jun 2022 13:21:11 +0530 Subject: [PATCH] fix: sass deprecation warning (#1100) --- .../public/index.html | 42 +++++++++---------- .../src/app/hooks.ts | 2 +- .../src/app/store.ts | 2 +- .../src/common/components/ConfirmDialog.tsx | 2 +- .../src/common/components/icons/index.ts | 6 +-- .../src/common/components/index.ts | 4 +- .../src/common/utils.test.ts | 6 +-- .../features/settings/settings-slice.test.ts | 2 +- .../features/tasks/CompletedTasksActions.tsx | 2 +- .../src/features/tasks/CreateGroup.test.tsx | 2 +- .../src/features/tasks/CreateTask.tsx | 2 +- .../features/tasks/MergeTaskGroups.test.tsx | 2 +- .../src/features/tasks/MergeTaskGroups.tsx | 2 +- .../features/tasks/MigrateLegacyContent.tsx | 2 +- .../features/tasks/RenameTaskGroups.test.tsx | 2 +- .../src/features/tasks/RenameTaskGroups.tsx | 4 +- .../src/features/tasks/TaskGroup.test.tsx | 2 +- .../src/features/tasks/TaskGroup.tsx | 2 +- .../src/features/tasks/TaskGroupOptions.tsx | 6 +-- .../src/features/tasks/TaskItem.test.tsx | 2 +- .../src/features/tasks/TaskItem.tsx | 2 +- .../src/features/tasks/TaskItemList.tsx | 2 +- .../src/features/tasks/TasksContainer.tsx | 2 +- .../src/features/tasks/tasks-slice.test.ts | 16 +++---- .../src/index.tsx | 10 ++--- .../src/testUtils.tsx | 2 +- .../public/index.html | 36 ++++++++-------- .../tsconfig.json | 15 ++----- .../src/main.scss | 9 ++-- .../src/main.scss | 5 +-- .../src/main.scss | 5 +-- .../src/main.scss | 6 +-- .../src/main.scss | 21 +++++----- .../src/main.scss | 5 +-- packages/styles/src/Styles/_ui.scss | 16 +++---- 35 files changed, 118 insertions(+), 130 deletions(-) diff --git a/packages/components/src/org.standardnotes.advanced-checklist/public/index.html b/packages/components/src/org.standardnotes.advanced-checklist/public/index.html index dbf771fde..6c1d7ae89 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/public/index.html +++ b/packages/components/src/org.standardnotes.advanced-checklist/public/index.html @@ -1,20 +1,21 @@ - - - - - - - - - - - - Advanced Checklist - + Advanced Checklist + - - -
- - - - \ No newline at end of file + + diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/app/hooks.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/app/hooks.ts index 117d70d63..d2d8801f1 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/app/hooks.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/app/hooks.ts @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react' import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' -import type { RootState, AppDispatch } from './store' +import type { AppDispatch, RootState } from './store' export const useAppDispatch = () => useDispatch() export const useAppSelector: TypedUseSelectorHook = useSelector diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/app/store.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/app/store.ts index 7ff386c90..2f84eca1c 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/app/store.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/app/store.ts @@ -1,7 +1,7 @@ import { configureStore } from '@reduxjs/toolkit' -import tasksReducer from '../features/tasks/tasks-slice' import settingsReducer from '../features/settings/settings-slice' +import tasksReducer from '../features/tasks/tasks-slice' import listenerMiddleware from './listenerMiddleware' export const store = configureStore({ diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/ConfirmDialog.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/ConfirmDialog.tsx index d4ce31bf5..50372464c 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/ConfirmDialog.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/ConfirmDialog.tsx @@ -1,7 +1,7 @@ import '@reach/dialog/styles.css' +import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog' import React, { useRef } from 'react' -import { AlertDialog, AlertDialogLabel, AlertDialogDescription } from '@reach/alert-dialog' import { sanitizeHtmlString } from '@standardnotes/utils' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/icons/index.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/icons/index.ts index 50bd44bb3..16eb810b4 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/icons/index.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/icons/index.ts @@ -1,9 +1,9 @@ +export { AddIcon } from './AddIcon' export { ChevronDownIcon } from './ChevronDownIcon' export { ChevronUpIcon } from './ChevronUpIcon' +export { DottedCircleIcon } from './DottedCircleIcon' export { MergeIcon } from './MergeIcon' export { MoreIcon } from './MoreIcon' +export { RenameIcon } from './RenameIcon' export { ReorderIcon } from './ReorderIcon' export { TrashIcon } from './TrashIcon' -export { RenameIcon } from './RenameIcon' -export { AddIcon } from './AddIcon' -export { DottedCircleIcon } from './DottedCircleIcon' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/index.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/index.ts index 93b33dd3d..4caf5d4e7 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/index.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/common/components/index.ts @@ -1,10 +1,10 @@ -export * from './TextInput' export * from './CheckBoxInput' export * from './CircularProgressBar' +export * from './ConfirmDialog' export * from './GenericInlineText' export * from './MainTitle' export * from './RoundButton' export * from './SubTitle' export * from './TextAreaInput' +export * from './TextInput' export * from './WideButton' -export * from './ConfirmDialog' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/common/utils.test.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/common/utils.test.ts index 3a4971a54..23caa95fe 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/common/utils.test.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/common/utils.test.ts @@ -1,13 +1,13 @@ import { GroupPayload, TaskPayload } from '../features/tasks/tasks-slice' import { - arrayMoveMutable, arrayMoveImmutable, + arrayMoveMutable, getPercentage, - groupTasksByCompletedStatus, - truncateText, getPlainPreview, getTaskArrayFromGroupedTasks, + groupTasksByCompletedStatus, parseMarkdownTasks, + truncateText, } from './utils' describe('arrayMoveMutable', () => { diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/settings/settings-slice.test.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/features/settings/settings-slice.test.ts index 30e901909..b017e4d00 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/settings/settings-slice.test.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/settings/settings-slice.test.ts @@ -1,5 +1,5 @@ -import reducer, { setCanEdit, setIsRunningOnMobile, setSpellCheckerEnabled } from './settings-slice' import type { SettingsState } from './settings-slice' +import reducer, { setCanEdit, setIsRunningOnMobile, setSpellCheckerEnabled } from './settings-slice' it('should return the initial state', () => { return expect( diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CompletedTasksActions.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CompletedTasksActions.tsx index 5f999cf11..69a96df7e 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CompletedTasksActions.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CompletedTasksActions.tsx @@ -4,7 +4,7 @@ import styled from 'styled-components' import { useAppDispatch, useAppSelector } from '../../app/hooks' import { ConfirmDialog } from '../../common/components' -import { openAllCompleted, deleteAllCompleted } from './tasks-slice' +import { deleteAllCompleted, openAllCompleted } from './tasks-slice' const ActionButton = styled.button` background-color: var(--sn-stylekit-contrast-background-color); diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateGroup.test.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateGroup.test.tsx index 7955bd90f..82e563a44 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateGroup.test.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateGroup.test.tsx @@ -2,8 +2,8 @@ import { fireEvent, screen } from '@testing-library/react' import { RootState } from '../../app/store' import { testRender } from '../../testUtils' -import { tasksGroupAdded } from './tasks-slice' import CreateGroup from './CreateGroup' +import { tasksGroupAdded } from './tasks-slice' const defaultTasksState = { tasks: { diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateTask.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateTask.tsx index 2b8d5ac49..b1ac0ca5b 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateTask.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/CreateTask.tsx @@ -1,6 +1,6 @@ import { ChangeEvent, createRef, KeyboardEvent, useState } from 'react' -import { v4 as uuidv4 } from 'uuid' import styled from 'styled-components' +import { v4 as uuidv4 } from 'uuid' import { useAppDispatch, useAppSelector } from '../../app/hooks' import { GroupPayload, taskAdded, tasksGroupDraft } from './tasks-slice' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.test.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.test.tsx index 29d55c461..765459f0f 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.test.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.test.tsx @@ -1,4 +1,4 @@ -import { screen, fireEvent } from '@testing-library/react' +import { fireEvent, screen } from '@testing-library/react' import { RootState } from '../../app/store' import { testRender } from '../../testUtils' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.tsx index 858f034e8..5a943a567 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MergeTaskGroups.tsx @@ -1,7 +1,7 @@ import '@reach/dialog/styles.css' +import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog' import React, { useRef, useState } from 'react' -import { AlertDialog, AlertDialogLabel, AlertDialogDescription } from '@reach/alert-dialog' import { useAppDispatch, useAppSelector } from '../../app/hooks' import { tasksGroupMerged } from './tasks-slice' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MigrateLegacyContent.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MigrateLegacyContent.tsx index fde7804e2..c73288561 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MigrateLegacyContent.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/MigrateLegacyContent.tsx @@ -1,7 +1,7 @@ import '@reach/dialog/styles.css' -import React, { useRef } from 'react' import { AlertDialog, AlertDialogLabel } from '@reach/alert-dialog' +import React, { useRef } from 'react' import { useAppDispatch } from '../../app/hooks' import { tasksLegacyContentMigrated } from './tasks-slice' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.test.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.test.tsx index af799fa08..ac5233a6d 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.test.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.test.tsx @@ -1,4 +1,4 @@ -import { screen, fireEvent } from '@testing-library/react' +import { fireEvent, screen } from '@testing-library/react' import { RootState } from '../../app/store' import { testRender } from '../../testUtils' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.tsx index 5902a3359..4e03d529e 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/RenameTaskGroups.tsx @@ -1,11 +1,11 @@ import '@reach/dialog/styles.css' +import { AlertDialog, AlertDialogDescription, AlertDialogLabel } from '@reach/alert-dialog' import React, { KeyboardEvent, useRef, useState } from 'react' -import { AlertDialog, AlertDialogLabel, AlertDialogDescription } from '@reach/alert-dialog' import { useAppDispatch } from '../../app/hooks' -import { tasksGroupRenamed } from './tasks-slice' import { TextInput } from '../../common/components' +import { tasksGroupRenamed } from './tasks-slice' type RenameTaskGroupsProps = { groupName: string diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.test.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.test.tsx index f1317c0ad..e470fe5f7 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.test.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.test.tsx @@ -1,4 +1,4 @@ -import { screen, fireEvent } from '@testing-library/react' +import { fireEvent, screen } from '@testing-library/react' import { RootState } from '../../app/store' import { testRender } from '../../testUtils' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.tsx index 2819a5f6c..08a2f5123 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroup.tsx @@ -11,7 +11,7 @@ import TaskItemList from './TaskItemList' import TaskGroupOptions from './TaskGroupOptions' import { CircularProgressBar, GenericInlineText, MainTitle, RoundButton } from '../../common/components' -import { ChevronDownIcon, ReorderIcon, ChevronUpIcon } from '../../common/components/icons' +import { ChevronDownIcon, ChevronUpIcon, ReorderIcon } from '../../common/components/icons' const TaskGroupContainer = styled.div<{ isLast?: boolean }>` background-color: var(--sn-stylekit-background-color); diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroupOptions.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroupOptions.tsx index c7851f9ea..d52c66119 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroupOptions.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskGroupOptions.tsx @@ -1,11 +1,11 @@ -import { useState } from 'react' -import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button' +import { Menu, MenuButton, MenuItem, MenuList } from '@reach/menu-button' import VisuallyHidden from '@reach/visually-hidden' +import { useState } from 'react' import { useAppDispatch } from '../../app/hooks' import { tasksGroupDeleted } from './tasks-slice' -import { MoreIcon, MergeIcon, TrashIcon, RenameIcon } from '../../common/components/icons' +import { MergeIcon, MoreIcon, RenameIcon, TrashIcon } from '../../common/components/icons' import { ConfirmDialog } from '../../common/components' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.test.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.test.tsx index f86859306..acad2a532 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.test.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.test.tsx @@ -1,8 +1,8 @@ import { fireEvent, screen, waitFor } from '@testing-library/react' -import { taskDeleted, taskModified, TaskPayload, taskToggled } from './tasks-slice' import { testRender } from '../../testUtils' import TaskItem from './TaskItem' +import { taskDeleted, taskModified, TaskPayload, taskToggled } from './tasks-slice' const groupName = 'default group' const task: TaskPayload = { diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.tsx index 6ae57ce33..6fea164d5 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItem.tsx @@ -3,8 +3,8 @@ import './TaskItem.scss' import { ChangeEvent, createRef, KeyboardEvent, useEffect, useState } from 'react' import styled from 'styled-components' -import { taskDeleted, taskModified, TaskPayload, taskToggled } from './tasks-slice' import { useAppDispatch, useAppSelector, useDidMount } from '../../app/hooks' +import { taskDeleted, taskModified, TaskPayload, taskToggled } from './tasks-slice' import { CheckBoxInput, TextAreaInput } from '../../common/components' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItemList.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItemList.tsx index 877ff364b..068e5e1fc 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItemList.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TaskItemList.tsx @@ -6,8 +6,8 @@ import { useAppDispatch } from '../../app/hooks' import { groupTasksByCompletedStatus } from '../../common/utils' import { GroupPayload, tasksReordered } from './tasks-slice' -import TasksContainer from './TasksContainer' import CompletedTasksActions from './CompletedTasksActions' +import TasksContainer from './TasksContainer' const Container = styled.div` position: relative; diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TasksContainer.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TasksContainer.tsx index 320848af8..3ce56f354 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TasksContainer.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/TasksContainer.tsx @@ -2,8 +2,8 @@ import './TasksContainer.scss' import React from 'react' import { Draggable, DraggingStyle, Droppable, NotDraggingStyle } from 'react-beautiful-dnd' -import styled from 'styled-components' import { CSSTransition, TransitionGroup } from 'react-transition-group' +import styled from 'styled-components' import { useAppSelector } from '../../app/hooks' import { SubTitle } from '../../common/components' diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/tasks-slice.test.ts b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/tasks-slice.test.ts index 649dfa17a..b46cdbfe2 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/tasks-slice.test.ts +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/features/tasks/tasks-slice.test.ts @@ -1,22 +1,22 @@ +import type { TasksState } from './tasks-slice' import reducer, { - openAllCompleted, deleteAllCompleted, + openAllCompleted, taskAdded, taskDeleted, taskModified, - tasksLoaded, - taskToggled, tasksGroupAdded, - tasksReordered, - tasksGroupReordered, - tasksGroupDeleted, - tasksGroupMerged, tasksGroupCollapsed, + tasksGroupDeleted, tasksGroupDraft, tasksGroupLastActive, + tasksGroupMerged, tasksGroupRenamed, + tasksGroupReordered, + tasksLoaded, + tasksReordered, + taskToggled, } from './tasks-slice' -import type { TasksState } from './tasks-slice' it('should return the initial state', () => { return expect( diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/index.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/index.tsx index dcc7a8b41..c3952e2cd 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/index.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/index.tsx @@ -1,24 +1,24 @@ import './stylesheets/main.scss' +import EditorKit, { EditorKitDelegate } from '@standardnotes/editor-kit' import React, { useCallback, useEffect, useRef } from 'react' import ReactDOM from 'react-dom' import { renderToString } from 'react-dom/server' import { Provider } from 'react-redux' -import EditorKit, { EditorKitDelegate } from '@standardnotes/editor-kit' import styled from 'styled-components' -import { store } from './app/store' import { useAppDispatch, useAppSelector } from './app/hooks' -import CreateGroup from './features/tasks/CreateGroup' +import { store } from './app/store' import { setCanEdit, setIsRunningOnMobile, setSpellCheckerEnabled } from './features/settings/settings-slice' -import { tasksLoaded } from './features/tasks/tasks-slice' +import CreateGroup from './features/tasks/CreateGroup' import InvalidContentError from './features/tasks/InvalidContentError' import MigrateLegacyContent from './features/tasks/MigrateLegacyContent' import NotePreview from './features/tasks/NotePreview' import TaskGroupList from './features/tasks/TaskGroupList' +import { tasksLoaded } from './features/tasks/tasks-slice' -import { getPlainPreview } from './common/utils' import { CheckBoxElementsDefs } from './common/components/svg' +import { getPlainPreview } from './common/utils' const MainContainer = styled.div` margin: 16px; diff --git a/packages/components/src/org.standardnotes.advanced-checklist/src/testUtils.tsx b/packages/components/src/org.standardnotes.advanced-checklist/src/testUtils.tsx index d918bd6d4..543c03ad8 100644 --- a/packages/components/src/org.standardnotes.advanced-checklist/src/testUtils.tsx +++ b/packages/components/src/org.standardnotes.advanced-checklist/src/testUtils.tsx @@ -1,6 +1,6 @@ +import { render as rtlRender, RenderOptions } from '@testing-library/react' import React from 'react' import { Provider } from 'react-redux' -import { render as rtlRender, RenderOptions } from '@testing-library/react' import configureStore from 'redux-mock-store' import { RootState } from './app/store' diff --git a/packages/components/src/org.standardnotes.markdown-visual-editor/public/index.html b/packages/components/src/org.standardnotes.markdown-visual-editor/public/index.html index bf7c7179d..1780637c8 100644 --- a/packages/components/src/org.standardnotes.markdown-visual-editor/public/index.html +++ b/packages/components/src/org.standardnotes.markdown-visual-editor/public/index.html @@ -1,19 +1,18 @@ - - - - - - - - - - - - Markdown Visual - + Markdown Visual + - - -
- - - \ No newline at end of file + + +
+ + diff --git a/packages/components/src/org.standardnotes.markdown-visual-editor/tsconfig.json b/packages/components/src/org.standardnotes.markdown-visual-editor/tsconfig.json index 055ec0db8..1e801a0b6 100644 --- a/packages/components/src/org.standardnotes.markdown-visual-editor/tsconfig.json +++ b/packages/components/src/org.standardnotes.markdown-visual-editor/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es6", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -20,11 +16,6 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "types" - ] + "include": ["src"], + "exclude": ["node_modules", "types"] } diff --git a/packages/components/src/org.standardnotes.theme-autobiography/src/main.scss b/packages/components/src/org.standardnotes.theme-autobiography/src/main.scss index 77280ac3d..8af1004c0 100644 --- a/packages/components/src/org.standardnotes.theme-autobiography/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-autobiography/src/main.scss @@ -1,9 +1,9 @@ :root { - --background-1: #EDE4DA; + --background-1: #ede4da; --background-2: #e8d9c8; - --foreground-color: #5C3F27; + --foreground-color: #5c3f27; --border-color: #d9c6b1; - --highlight-color: #D68420; + --highlight-color: #d68420; --highlight-contrast: #e3ae74; --sn-stylekit-info-color: #a37337; @@ -58,7 +58,8 @@ --sn-stylekit-passive-color-5: #e9d9c7; } -#notes-column .note.selected, .notes .note.selected { +#notes-column .note.selected, +.notes .note.selected { background-color: #e9d9c7; color: var(--sn-stylekit-contrast-foreground-color); } diff --git a/packages/components/src/org.standardnotes.theme-focus/src/main.scss b/packages/components/src/org.standardnotes.theme-focus/src/main.scss index 815a19941..1660127d2 100644 --- a/packages/components/src/org.standardnotes.theme-focus/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-focus/src/main.scss @@ -1,5 +1,4 @@ :root { - --foreground-color: #eeeeee; --background-color: #0f1011; --highlight-color: #a464c2; @@ -21,13 +20,13 @@ --sn-stylekit-neutral-color: #7c7c7c; --sn-stylekit-neutral-contrast-color: #ffffff; - --sn-stylekit-success-color: #2B9612; + --sn-stylekit-success-color: #2b9612; --sn-stylekit-success-contrast-color: #ffffff; --sn-stylekit-warning-color: #f6a200; --sn-stylekit-warning-contrast-color: #ffffff; - --sn-stylekit-danger-color: #F80324; + --sn-stylekit-danger-color: #f80324; --sn-stylekit-danger-contrast-color: #ffffff; --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color); diff --git a/packages/components/src/org.standardnotes.theme-futura/src/main.scss b/packages/components/src/org.standardnotes.theme-futura/src/main.scss index 08f6c1294..8570ee3ef 100644 --- a/packages/components/src/org.standardnotes.theme-futura/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-futura/src/main.scss @@ -1,5 +1,4 @@ :root { - --foreground-color: #a9aabe; --background-color: #20202b; --highlight-color: #fca429; @@ -14,13 +13,13 @@ --sn-stylekit-neutral-color: #7c7c7c; --sn-stylekit-neutral-contrast-color: #ffffff; - --sn-stylekit-success-color: #2B9612; + --sn-stylekit-success-color: #2b9612; --sn-stylekit-success-contrast-color: #ffffff; --sn-stylekit-warning-color: #f6a200; --sn-stylekit-warning-contrast-color: #ffffff; - --sn-stylekit-danger-color: #F80324; + --sn-stylekit-danger-color: #f80324; --sn-stylekit-danger-contrast-color: #ffffff; --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color); diff --git a/packages/components/src/org.standardnotes.theme-midnight/src/main.scss b/packages/components/src/org.standardnotes.theme-midnight/src/main.scss index 836782e5b..e23717835 100644 --- a/packages/components/src/org.standardnotes.theme-midnight/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-midnight/src/main.scss @@ -5,19 +5,19 @@ --border-color: #13131a; --ui-text-color: #d8d8d8; - --sn-stylekit-info-color: #4CA3FF; + --sn-stylekit-info-color: #4ca3ff; --sn-stylekit-info-contrast-color: white; --sn-stylekit-neutral-color: #7c7c7c; --sn-stylekit-neutral-contrast-color: white; - --sn-stylekit-success-color: #01BE79; + --sn-stylekit-success-color: #01be79; --sn-stylekit-success-contrast-color: white; --sn-stylekit-warning-color: #f6a200; --sn-stylekit-warning-contrast-color: white; - --sn-stylekit-danger-color: #F80324; + --sn-stylekit-danger-color: #f80324; --sn-stylekit-danger-contrast-color: white; --sn-desktop-titlebar-bg-color: var(--primary-bg-color); diff --git a/packages/components/src/org.standardnotes.theme-solarized-dark/src/main.scss b/packages/components/src/org.standardnotes.theme-solarized-dark/src/main.scss index 44f7c1f82..a5e4b54fa 100644 --- a/packages/components/src/org.standardnotes.theme-solarized-dark/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-solarized-dark/src/main.scss @@ -1,17 +1,16 @@ :root { - - --background-1: #002B36; + --background-1: #002b36; --background-2: #083642; - --foreground-color: #FDF6E3; - --highlight-color: #2AA198; + --foreground-color: #fdf6e3; + --highlight-color: #2aa198; --border-color: #00252e; --pre-color: #d6dbdb; - --content-1: #586D75; - --content-2: #667A83; + --content-1: #586d75; + --content-2: #667a83; --content-3: #839496; - --content-4: #93A1A1; + --content-4: #93a1a1; /* Footer */ --footer-bar-border-top-color: 0; @@ -32,13 +31,13 @@ --sn-stylekit-neutral-color: #7c7c7c; --sn-stylekit-neutral-contrast-color: white; - --sn-stylekit-success-color: #2B9612; + --sn-stylekit-success-color: #2b9612; --sn-stylekit-success-contrast-color: white; --sn-stylekit-warning-color: #f6a200; --sn-stylekit-warning-contrast-color: white; - --sn-stylekit-danger-color: #F80324; + --sn-stylekit-danger-color: #f80324; --sn-stylekit-danger-contrast-color: white; --sn-stylekit-shadow-color: var(--background-2); @@ -75,9 +74,9 @@ --sn-stylekit-menu-border: 1px solid #1f5461; --sn-stylekit-passive-color-0: #a8bdbd; - --sn-stylekit-passive-color-1: #93A1A1; + --sn-stylekit-passive-color-1: #93a1a1; --sn-stylekit-passive-color-3: #0d4f60; --sn-stylekit-passive-color-4: #083642; - --sn-stylekit-passive-color-4-opacity-variant: #2AA1983d; + --sn-stylekit-passive-color-4-opacity-variant: #2aa1983d; --sn-stylekit-passive-color-5: #003542; } diff --git a/packages/components/src/org.standardnotes.theme-titanium/src/main.scss b/packages/components/src/org.standardnotes.theme-titanium/src/main.scss index 7e64b04c8..9a92a4746 100644 --- a/packages/components/src/org.standardnotes.theme-titanium/src/main.scss +++ b/packages/components/src/org.standardnotes.theme-titanium/src/main.scss @@ -1,5 +1,4 @@ :root { - --foreground-color: #3d3c40; --background-color: #663399; --highlight-color: #c9cccf; @@ -15,13 +14,13 @@ --sn-stylekit-neutral-color: #7c7c7c; --sn-stylekit-neutral-contrast-color: #ffffff; - --sn-stylekit-success-color: #2B9612; + --sn-stylekit-success-color: #2b9612; --sn-stylekit-success-contrast-color: #ffffff; --sn-stylekit-warning-color: #f6a200; --sn-stylekit-warning-contrast-color: #ffffff; - --sn-stylekit-danger-color: #F80324; + --sn-stylekit-danger-color: #f80324; --sn-stylekit-danger-contrast-color: #ffffff; --sn-stylekit-background-color: #d9dbde; diff --git a/packages/styles/src/Styles/_ui.scss b/packages/styles/src/Styles/_ui.scss index 827d6c821..6ac4dda38 100644 --- a/packages/styles/src/Styles/_ui.scss +++ b/packages/styles/src/Styles/_ui.scss @@ -1,3 +1,5 @@ +@use 'sass:math'; + .red { color: var(--sn-stylekit-danger-color); } @@ -702,16 +704,16 @@ svg.sk-circular-progress { $pi: 3.14159265358979; $circle-size: 18px; - $stroke-width: $circle-size * (0.1 / 100) * 100 + 1; - $radius: ($circle-size - $stroke-width) / 2; + $stroke-width: $circle-size * math.div(0.1, 100) * 100 + 1; + $radius: math.div($circle-size - $stroke-width, 2); $circumference: ($radius * $pi * 2); height: $circle-size; width: $circle-size; circle.background { - cx: $circle-size / 2; - cy: $circle-size / 2; + cx: math.div($circle-size, 2); + cy: math.div($circle-size, 2); r: $radius; fill: none; stroke: var(--sn-stylekit-contrast-border-color); @@ -719,8 +721,8 @@ svg.sk-circular-progress { } circle.progress { - cx: $circle-size / 2; - cy: $circle-size / 2; + cx: math.div($circle-size, 2); + cy: math.div($circle-size, 2); r: $radius; fill: none; stroke: var(--sn-stylekit-info-color); @@ -731,7 +733,7 @@ svg.sk-circular-progress { transform-origin: 50% 50%; @mixin set-progress($progress) { - $dash: ($progress * $circumference) / 100; + $dash: math.div($progress * $circumference, 100); stroke-dasharray: $dash $circumference - $dash; }