mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
R: Split colors declarations
This commit is contained in:
parent
301f388788
commit
aeac2c2941
|
@ -10,7 +10,7 @@ import Select, {
|
||||||
} from 'react-select';
|
} from 'react-select';
|
||||||
|
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { APP_COLORS, SELECT_THEME } from '@/styling/color';
|
import { APP_COLORS, SELECT_THEME } from '@/styling/colors';
|
||||||
|
|
||||||
import { IconClose, IconDropArrow, IconDropArrowUp } from '../Icons';
|
import { IconClose, IconDropArrow, IconDropArrowUp } from '../Icons';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import Select, {
|
||||||
} from 'react-select';
|
} from 'react-select';
|
||||||
|
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { APP_COLORS, SELECT_THEME } from '@/styling/color';
|
import { APP_COLORS, SELECT_THEME } from '@/styling/colors';
|
||||||
|
|
||||||
import { IconClose, IconDropArrow, IconDropArrowUp } from '../Icons';
|
import { IconClose, IconDropArrow, IconDropArrowUp } from '../Icons';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
interface LoaderProps {
|
interface LoaderProps {
|
||||||
/** Scale of the loader from 1 to 10. */
|
/** Scale of the loader from 1 to 10. */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
|
import { colorBgCstClass } from '@/features/rsform/colors';
|
||||||
import { describeCstClass, labelCstClass } from '@/features/rsform/labels';
|
import { describeCstClass, labelCstClass } from '@/features/rsform/labels';
|
||||||
import { CstClass } from '@/features/rsform/models/rsform';
|
import { CstClass } from '@/features/rsform/models/rsform';
|
||||||
import { colorBgCstClass } from '@/styling/color';
|
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
interface InfoCstClassProps {
|
interface InfoCstClassProps {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
|
import { colorBgCstStatus } from '@/features/rsform/colors';
|
||||||
import { describeExpressionStatus, labelExpressionStatus } from '@/features/rsform/labels';
|
import { describeExpressionStatus, labelExpressionStatus } from '@/features/rsform/labels';
|
||||||
import { ExpressionStatus } from '@/features/rsform/models/rsform';
|
import { ExpressionStatus } from '@/features/rsform/models/rsform';
|
||||||
import { colorBgCstStatus } from '@/styling/color';
|
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
interface InfoCstStatusProps {
|
interface InfoCstStatusProps {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
function HelpFormulaTree() {
|
function HelpFormulaTree() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
IconSubfolders,
|
IconSubfolders,
|
||||||
IconUserSearch
|
IconUserSearch
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { LinkTopic } from '../../components/LinkTopic';
|
import { LinkTopic } from '../../components/LinkTopic';
|
||||||
import { HelpTopic } from '../../models/helpTopic';
|
import { HelpTopic } from '../../models/helpTopic';
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {
|
||||||
IconTree,
|
IconTree,
|
||||||
IconTypeGraph
|
IconTypeGraph
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { LinkTopic } from '../../components/LinkTopic';
|
import { LinkTopic } from '../../components/LinkTopic';
|
||||||
import { HelpTopic } from '../../models/helpTopic';
|
import { HelpTopic } from '../../models/helpTopic';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
IconText,
|
IconText,
|
||||||
IconTypeGraph
|
IconTypeGraph
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { LinkTopic } from '../../components/LinkTopic';
|
import { LinkTopic } from '../../components/LinkTopic';
|
||||||
import { HelpTopic } from '../../models/helpTopic';
|
import { HelpTopic } from '../../models/helpTopic';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { LinkTopic } from '../../components/LinkTopic';
|
import { LinkTopic } from '../../components/LinkTopic';
|
||||||
import { HelpTopic } from '../../models/helpTopic';
|
import { HelpTopic } from '../../models/helpTopic';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { useLabelUser } from '@/features/users/backend/useLabelUser';
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { useFitHeight } from '@/stores/appLayout';
|
import { useFitHeight } from '@/stores/appLayout';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import BadgeLocation from '../../components/BadgeLocation';
|
import BadgeLocation from '../../components/BadgeLocation';
|
||||||
import { ILibraryItem, LibraryItemType } from '../../models/library';
|
import { ILibraryItem, LibraryItemType } from '../../models/library';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { TextArea } from '@/components/Input';
|
import { TextArea } from '@/components/Input';
|
||||||
import PickSubstitutions from '@/features/rsform/components/PickSubstitutions';
|
import PickSubstitutions from '@/features/rsform/components/PickSubstitutions';
|
||||||
import { IRSForm } from '@/features/rsform/models/rsform';
|
import { IRSForm } from '@/features/rsform/models/rsform';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { ICstSubstitute } from '../../models/oss';
|
import { ICstSubstitute } from '../../models/oss';
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { CProps } from '@/components/props';
|
||||||
import { useLibrary } from '@/features/library/backend/useLibrary';
|
import { useLibrary } from '@/features/library/backend/useLibrary';
|
||||||
import { useMainHeight } from '@/stores/appLayout';
|
import { useMainHeight } from '@/stores/appLayout';
|
||||||
import { useModificationStore } from '@/stores/modification';
|
import { useModificationStore } from '@/stores/modification';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
import { errors } from '@/utils/labels';
|
import { errors } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -1,77 +1,11 @@
|
||||||
/**
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
* Module: Single place for all color definitions in code (see index.css for full defs).
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { GramData, Grammeme, NounGrams, PartOfSpeech, VerbGrams } from '@/features/rsform/models/language';
|
|
||||||
import { CstClass, ExpressionStatus, IConstituenta } from '@/features/rsform/models/rsform';
|
|
||||||
import { ISyntaxTreeNode, TokenID } from '@/features/rsform/models/rslang';
|
|
||||||
import { TMGraphNode } from '@/features/rsform/models/TMGraph';
|
|
||||||
import { GraphColoring } from '@/features/rsform/stores/termGraph';
|
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
|
||||||
/** Semantic colors for application. */
|
import { GramData, Grammeme, NounGrams, PartOfSpeech, VerbGrams } from './models/language';
|
||||||
// prettier-ignore
|
import { CstClass, ExpressionStatus, IConstituenta } from './models/rsform';
|
||||||
export const APP_COLORS = {
|
import { ISyntaxTreeNode, TokenID } from './models/rslang';
|
||||||
bgDefault: 'var(--clr-prim-100)',
|
import { TMGraphNode } from './models/TMGraph';
|
||||||
bgInput: 'var(--clr-prim-0)',
|
import { GraphColoring } from './stores/termGraph';
|
||||||
bgControls: 'var(--clr-prim-200)',
|
|
||||||
bgDisabled: 'var(--clr-prim-300)',
|
|
||||||
bgPrimary: 'var(--clr-sec-600)',
|
|
||||||
bgSelected: 'var(--clr-sec-200)',
|
|
||||||
bgActiveSelection: 'var(--clr-select-node)',
|
|
||||||
bgHover: 'var(--clr-sec-100)',
|
|
||||||
bgWarning: 'var(--clr-warn-100)',
|
|
||||||
|
|
||||||
border: 'var(--clr-prim-400)',
|
|
||||||
|
|
||||||
fgDefault: 'var(--clr-prim-999)',
|
|
||||||
fgSelected: 'var(--clr-prim-999)',
|
|
||||||
fgDisabled: 'var(--clr-prim-800)',
|
|
||||||
fgWarning: 'var(--clr-warn-600)',
|
|
||||||
|
|
||||||
bgRed: 'var(--acc-bg-red)',
|
|
||||||
bgGreen: 'var(--acc-bg-green)',
|
|
||||||
bgBlue: 'var(--acc-bg-blue)',
|
|
||||||
bgPurple: 'var(--acc-bg-purple)',
|
|
||||||
bgTeal: 'var(--acc-bg-teal)',
|
|
||||||
bgOrange: 'var(--acc-bg-orange)',
|
|
||||||
|
|
||||||
bgGreen25: 'var(--acc-bg-green25)',
|
|
||||||
bgGreen50: 'var(--acc-bg-green50)',
|
|
||||||
bgOrange50: 'var(--acc-bg-orange50)',
|
|
||||||
|
|
||||||
fgRed: 'var(--acc-fg-red)',
|
|
||||||
fgGreen: 'var(--acc-fg-green)',
|
|
||||||
fgBlue: 'var(--acc-fg-blue)',
|
|
||||||
fgPurple: 'var(--acc-fg-purple)',
|
|
||||||
fgTeal: 'var(--acc-fg-teal)',
|
|
||||||
fgOrange: 'var(--acc-fg-orange)'
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents Select component theme.
|
|
||||||
*/
|
|
||||||
export const SELECT_THEME = {
|
|
||||||
primary: APP_COLORS.bgPrimary,
|
|
||||||
primary75: APP_COLORS.bgSelected,
|
|
||||||
primary50: APP_COLORS.bgHover,
|
|
||||||
primary25: APP_COLORS.bgHover,
|
|
||||||
|
|
||||||
danger: APP_COLORS.fgWarning,
|
|
||||||
dangerLight: APP_COLORS.bgWarning,
|
|
||||||
|
|
||||||
neutral0: APP_COLORS.bgInput,
|
|
||||||
neutral5: APP_COLORS.bgDefault,
|
|
||||||
neutral10: APP_COLORS.border,
|
|
||||||
neutral20: APP_COLORS.border,
|
|
||||||
neutral30: APP_COLORS.border,
|
|
||||||
neutral40: APP_COLORS.fgDisabled,
|
|
||||||
neutral50: APP_COLORS.fgDisabled, // placeholder
|
|
||||||
neutral60: APP_COLORS.fgDefault,
|
|
||||||
neutral70: APP_COLORS.fgWarning,
|
|
||||||
neutral80: APP_COLORS.fgDefault,
|
|
||||||
neutral90: APP_COLORS.fgWarning
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents Brackets highlights theme.
|
* Represents Brackets highlights theme.
|
|
@ -2,9 +2,10 @@ import clsx from 'clsx';
|
||||||
|
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { useTooltipsStore } from '@/stores/tooltips';
|
import { useTooltipsStore } from '@/stores/tooltips';
|
||||||
import { APP_COLORS, colorFgCstStatus } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { globals } from '@/utils/constants';
|
import { globals } from '@/utils/constants';
|
||||||
|
|
||||||
|
import { colorFgCstStatus } from '../colors';
|
||||||
import { CstClass, IConstituenta } from '../models/rsform';
|
import { CstClass, IConstituenta } from '../models/rsform';
|
||||||
|
|
||||||
interface BadgeConstituentaProps extends CProps.Styling {
|
interface BadgeConstituentaProps extends CProps.Styling {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { APP_COLORS, colorFgGrammeme } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
|
import { colorFgGrammeme } from '../colors';
|
||||||
import { labelGrammeme } from '../labels';
|
import { labelGrammeme } from '../labels';
|
||||||
import { GramData } from '../models/language';
|
import { GramData } from '../models/language';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/D
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
import { SearchBar } from '@/components/shared/SearchBar';
|
||||||
import { NoData } from '@/components/View';
|
import { NoData } from '@/components/View';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { describeConstituenta } from '../labels';
|
import { describeConstituenta } from '../labels';
|
||||||
import { IConstituenta } from '../models/rsform';
|
import { IConstituenta } from '../models/rsform';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
import { SearchBar } from '@/components/shared/SearchBar';
|
||||||
import { ILibraryItem, LibraryItemID, LibraryItemType } from '@/features/library/models/library';
|
import { ILibraryItem, LibraryItemID, LibraryItemType } from '@/features/library/models/library';
|
||||||
import { matchLibraryItem } from '@/features/library/models/libraryAPI';
|
import { matchLibraryItem } from '@/features/library/models/libraryAPI';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
import SelectLocation from '../../library/components/SelectLocation';
|
import SelectLocation from '../../library/components/SelectLocation';
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { NoData } from '@/components/View';
|
||||||
import SelectLibraryItem from '@/features/library/components/SelectLibraryItem';
|
import SelectLibraryItem from '@/features/library/components/SelectLibraryItem';
|
||||||
import { ILibraryItem } from '@/features/library/models/library';
|
import { ILibraryItem } from '@/features/library/models/library';
|
||||||
import { ICstSubstitute, IMultiSubstitution } from '@/features/oss/models/oss';
|
import { ICstSubstitute, IMultiSubstitution } from '@/features/oss/models/oss';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { errors } from '@/utils/labels';
|
import { errors } from '@/utils/labels';
|
||||||
|
|
||||||
import { ConstituentaID, IConstituenta, IRSForm } from '../models/rsform';
|
import { ConstituentaID, IConstituenta, IRSForm } from '../models/rsform';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { forwardRef, useRef } from 'react';
|
||||||
|
|
||||||
import { Label } from '@/components/Input';
|
import { Label } from '@/components/Input';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { ConstituentaID, IRSForm } from '../../models/rsform';
|
import { ConstituentaID, IRSForm } from '../../models/rsform';
|
||||||
import { generateAlias, getCstTypePrefix, guessCstType } from '../../models/rsformAPI';
|
import { generateAlias, getCstTypePrefix, guessCstType } from '../../models/rsformAPI';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { bracketMatching, MatchResult } from '@codemirror/language';
|
import { bracketMatching, MatchResult } from '@codemirror/language';
|
||||||
import { Decoration, EditorView } from '@codemirror/view';
|
import { Decoration, EditorView } from '@codemirror/view';
|
||||||
|
|
||||||
import { BRACKETS_THEME } from '@/styling/color';
|
import { BRACKETS_THEME } from '../../colors';
|
||||||
|
|
||||||
const matchingMark = Decoration.mark({ class: 'cc-matchingBracket' });
|
const matchingMark = Decoration.mark({ class: 'cc-matchingBracket' });
|
||||||
const nonMatchingMark = Decoration.mark({ class: 'cc-nonmatchingBracket' });
|
const nonMatchingMark = Decoration.mark({ class: 'cc-nonmatchingBracket' });
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { forwardRef, useRef, useState } from 'react';
|
||||||
import { Label } from '@/components/Input';
|
import { Label } from '@/components/Input';
|
||||||
import { DialogType, useDialogsStore } from '@/stores/dialogs';
|
import { DialogType, useDialogsStore } from '@/stores/dialogs';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { CodeMirrorWrapper } from '@/utils/codemirror';
|
import { CodeMirrorWrapper } from '@/utils/codemirror';
|
||||||
|
|
||||||
import { ReferenceType } from '../../models/language';
|
import { ReferenceType } from '../../models/language';
|
||||||
|
|
|
@ -3,9 +3,10 @@ import { Extension } from '@codemirror/state';
|
||||||
import { hoverTooltip, TooltipView } from '@codemirror/view';
|
import { hoverTooltip, TooltipView } from '@codemirror/view';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { APP_COLORS, colorFgGrammeme } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { findContainedNodes, findReferenceAt } from '@/utils/codemirror';
|
import { findContainedNodes, findReferenceAt } from '@/utils/codemirror';
|
||||||
|
|
||||||
|
import { colorFgGrammeme } from '../../colors';
|
||||||
import { labelGrammeme } from '../../labels';
|
import { labelGrammeme } from '../../labels';
|
||||||
import { describeConstituentaTerm } from '../../labels';
|
import { describeConstituentaTerm } from '../../labels';
|
||||||
import { IEntityReference, ISyntacticReference } from '../../models/language';
|
import { IEntityReference, ISyntacticReference } from '../../models/language';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import DataTable, { IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { IConditionalStyle } from '@/components/DataTable';
|
||||||
import { IconAccept, IconRemove, IconReset } from '@/components/Icons';
|
import { IconAccept, IconRemove, IconReset } from '@/components/Icons';
|
||||||
import { NoData } from '@/components/View';
|
import { NoData } from '@/components/View';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import PickConstituenta from '../../components/PickConstituenta';
|
import PickConstituenta from '../../components/PickConstituenta';
|
||||||
import RSInput from '../../components/RSInput';
|
import RSInput from '../../components/RSInput';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
||||||
import { IconRemove } from '@/components/Icons';
|
import { IconRemove } from '@/components/Icons';
|
||||||
import { IVersionInfo, VersionID } from '@/features/library/models/library';
|
import { IVersionInfo, VersionID } from '@/features/library/models/library';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
interface TableVersionsProps {
|
interface TableVersionsProps {
|
||||||
processing: boolean;
|
processing: boolean;
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
import { Handle, Position } from 'reactflow';
|
import { Handle, Position } from 'reactflow';
|
||||||
|
|
||||||
import { APP_COLORS, colorBgSyntaxTree } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
|
import { colorBgSyntaxTree } from '../../../colors';
|
||||||
import { labelSyntaxTree } from '../../../labels';
|
import { labelSyntaxTree } from '../../../labels';
|
||||||
import { ISyntaxTreeNode } from '../../../models/rslang';
|
import { ISyntaxTreeNode } from '../../../models/rslang';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { EdgeProps, SimpleBezierEdge } from 'reactflow';
|
import { EdgeProps, SimpleBezierEdge } from 'reactflow';
|
||||||
|
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents graph TMGraph edge internal data.
|
* Represents graph TMGraph edge internal data.
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
|
|
||||||
import { Handle, Position } from 'reactflow';
|
import { Handle, Position } from 'reactflow';
|
||||||
|
|
||||||
import { TMGraphNode } from '@/features/rsform/models/TMGraph';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { APP_COLORS, colorBgTMGraphNode } from '@/styling/color';
|
|
||||||
import { globals } from '@/utils/constants';
|
import { globals } from '@/utils/constants';
|
||||||
|
|
||||||
|
import { colorBgTMGraphNode } from '../../../colors';
|
||||||
|
import { TMGraphNode } from '../../../models/TMGraph';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents graph TMGraph node internal data.
|
* Represents graph TMGraph node internal data.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,10 +4,11 @@ import clsx from 'clsx';
|
||||||
|
|
||||||
import { StatusIcon } from '@/components/DomainIcons';
|
import { StatusIcon } from '@/components/DomainIcons';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { APP_COLORS, colorStatusBar } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { globals } from '@/utils/constants';
|
import { globals } from '@/utils/constants';
|
||||||
import { prepareTooltip } from '@/utils/utils';
|
import { prepareTooltip } from '@/utils/utils';
|
||||||
|
|
||||||
|
import { colorStatusBar } from '../../../colors';
|
||||||
import { labelExpressionStatus } from '../../../labels';
|
import { labelExpressionStatus } from '../../../labels';
|
||||||
import { ExpressionStatus, IConstituenta } from '../../../models/rsform';
|
import { ExpressionStatus, IConstituenta } from '../../../models/rsform';
|
||||||
import { inferStatus } from '../../../models/rsformAPI';
|
import { inferStatus } from '../../../models/rsformAPI';
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { Tooltip } from '@/components/Container';
|
||||||
import { IconHelp } from '@/components/Icons';
|
import { IconHelp } from '@/components/Icons';
|
||||||
import { useLibrary } from '@/features/library/backend/useLibrary';
|
import { useLibrary } from '@/features/library/backend/useLibrary';
|
||||||
import { LibraryItemID } from '@/features/library/models/library';
|
import { LibraryItemID } from '@/features/library/models/library';
|
||||||
import { colorBgSchemas } from '@/styling/color';
|
|
||||||
import { globals, prefixes } from '@/utils/constants';
|
import { globals, prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
|
import { colorBgSchemas } from '../../../colors';
|
||||||
import { IRSForm } from '../../../models/rsform';
|
import { IRSForm } from '../../../models/rsform';
|
||||||
|
|
||||||
interface SchemasGuideProps {
|
interface SchemasGuideProps {
|
||||||
|
|
|
@ -23,11 +23,12 @@ import { Overlay } from '@/components/Container';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { useMainHeight } from '@/stores/appLayout';
|
import { useMainHeight } from '@/stores/appLayout';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { APP_COLORS, colorBgGraphNode } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
import { errors } from '@/utils/labels';
|
import { errors } from '@/utils/labels';
|
||||||
|
|
||||||
import { useMutatingRSForm } from '../../../backend/useMutatingRSForm';
|
import { useMutatingRSForm } from '../../../backend/useMutatingRSForm';
|
||||||
|
import { colorBgGraphNode } from '../../../colors';
|
||||||
import InfoConstituenta from '../../../components/InfoConstituenta';
|
import InfoConstituenta from '../../../components/InfoConstituenta';
|
||||||
import ToolbarGraphSelection from '../../../components/ToolbarGraphSelection';
|
import ToolbarGraphSelection from '../../../components/ToolbarGraphSelection';
|
||||||
import { ConstituentaID, CstType, IConstituenta, IRSForm } from '../../../models/rsform';
|
import { ConstituentaID, CstType, IConstituenta, IRSForm } from '../../../models/rsform';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { MiniButton } from '@/components/Control';
|
import { MiniButton } from '@/components/Control';
|
||||||
import { IconGraphInputs, IconGraphOutputs, IconReset } from '@/components/Icons';
|
import { IconGraphInputs, IconGraphOutputs, IconReset } from '@/components/Icons';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
import { IConstituenta } from '../../../models/rsform';
|
import { IConstituenta } from '../../../models/rsform';
|
||||||
import { useRSEdit } from '../RSEditContext';
|
import { useRSEdit } from '../RSEditContext';
|
||||||
|
|
|
@ -9,9 +9,10 @@ import { CProps } from '@/components/props';
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { useFitHeight } from '@/stores/appLayout';
|
import { useFitHeight } from '@/stores/appLayout';
|
||||||
import { useTooltipsStore } from '@/stores/tooltips';
|
import { useTooltipsStore } from '@/stores/tooltips';
|
||||||
import { APP_COLORS, colorBgGraphNode } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { globals, PARAMETER, prefixes } from '@/utils/constants';
|
import { globals, PARAMETER, prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
|
import { colorBgGraphNode } from '../../../colors';
|
||||||
import { ConstituentaID, IRSForm } from '../../../models/rsform';
|
import { ConstituentaID, IRSForm } from '../../../models/rsform';
|
||||||
import { GraphColoring, useTermGraphStore } from '../../../stores/termGraph';
|
import { GraphColoring, useTermGraphStore } from '../../../stores/termGraph';
|
||||||
import { useRSEdit } from '../RSEditContext';
|
import { useRSEdit } from '../RSEditContext';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { Handle, Position } from 'reactflow';
|
import { Handle, Position } from 'reactflow';
|
||||||
|
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { truncateToLastWord } from '@/utils/utils';
|
import { truncateToLastWord } from '@/utils/utils';
|
||||||
|
|
||||||
const MAX_DESCRIPTION_LENGTH = 65;
|
const MAX_DESCRIPTION_LENGTH = 65;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useEffect } from 'react';
|
||||||
|
|
||||||
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
||||||
import { NoData, TextContent } from '@/components/View';
|
import { NoData, TextContent } from '@/components/View';
|
||||||
import { APP_COLORS } from '@/styling/color';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
import { PARAMETER, prefixes } from '@/utils/constants';
|
import { PARAMETER, prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
import BadgeConstituenta from '../../../components/BadgeConstituenta';
|
import BadgeConstituenta from '../../../components/BadgeConstituenta';
|
||||||
|
|
67
rsconcept/frontend/src/styling/colors.ts
Normal file
67
rsconcept/frontend/src/styling/colors.ts
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
/**
|
||||||
|
* Module: Single place for all color definitions in code (see index.css for full defs).
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Semantic colors for application. */
|
||||||
|
// prettier-ignore
|
||||||
|
export const APP_COLORS = {
|
||||||
|
bgDefault: 'var(--clr-prim-100)',
|
||||||
|
bgInput: 'var(--clr-prim-0)',
|
||||||
|
bgControls: 'var(--clr-prim-200)',
|
||||||
|
bgDisabled: 'var(--clr-prim-300)',
|
||||||
|
bgPrimary: 'var(--clr-sec-600)',
|
||||||
|
bgSelected: 'var(--clr-sec-200)',
|
||||||
|
bgActiveSelection: 'var(--clr-select-node)',
|
||||||
|
bgHover: 'var(--clr-sec-100)',
|
||||||
|
bgWarning: 'var(--clr-warn-100)',
|
||||||
|
|
||||||
|
border: 'var(--clr-prim-400)',
|
||||||
|
|
||||||
|
fgDefault: 'var(--clr-prim-999)',
|
||||||
|
fgSelected: 'var(--clr-prim-999)',
|
||||||
|
fgDisabled: 'var(--clr-prim-800)',
|
||||||
|
fgWarning: 'var(--clr-warn-600)',
|
||||||
|
|
||||||
|
bgRed: 'var(--acc-bg-red)',
|
||||||
|
bgGreen: 'var(--acc-bg-green)',
|
||||||
|
bgBlue: 'var(--acc-bg-blue)',
|
||||||
|
bgPurple: 'var(--acc-bg-purple)',
|
||||||
|
bgTeal: 'var(--acc-bg-teal)',
|
||||||
|
bgOrange: 'var(--acc-bg-orange)',
|
||||||
|
|
||||||
|
bgGreen25: 'var(--acc-bg-green25)',
|
||||||
|
bgGreen50: 'var(--acc-bg-green50)',
|
||||||
|
bgOrange50: 'var(--acc-bg-orange50)',
|
||||||
|
|
||||||
|
fgRed: 'var(--acc-fg-red)',
|
||||||
|
fgGreen: 'var(--acc-fg-green)',
|
||||||
|
fgBlue: 'var(--acc-fg-blue)',
|
||||||
|
fgPurple: 'var(--acc-fg-purple)',
|
||||||
|
fgTeal: 'var(--acc-fg-teal)',
|
||||||
|
fgOrange: 'var(--acc-fg-orange)'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents Select component theme.
|
||||||
|
*/
|
||||||
|
export const SELECT_THEME = {
|
||||||
|
primary: APP_COLORS.bgPrimary,
|
||||||
|
primary75: APP_COLORS.bgSelected,
|
||||||
|
primary50: APP_COLORS.bgHover,
|
||||||
|
primary25: APP_COLORS.bgHover,
|
||||||
|
|
||||||
|
danger: APP_COLORS.fgWarning,
|
||||||
|
dangerLight: APP_COLORS.bgWarning,
|
||||||
|
|
||||||
|
neutral0: APP_COLORS.bgInput,
|
||||||
|
neutral5: APP_COLORS.bgDefault,
|
||||||
|
neutral10: APP_COLORS.border,
|
||||||
|
neutral20: APP_COLORS.border,
|
||||||
|
neutral30: APP_COLORS.border,
|
||||||
|
neutral40: APP_COLORS.fgDisabled,
|
||||||
|
neutral50: APP_COLORS.fgDisabled, // placeholder
|
||||||
|
neutral60: APP_COLORS.fgDefault,
|
||||||
|
neutral70: APP_COLORS.fgWarning,
|
||||||
|
neutral80: APP_COLORS.fgDefault,
|
||||||
|
neutral90: APP_COLORS.fgWarning
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user