Skip to content

Commit

Permalink
index: themeStore
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTRy committed Nov 27, 2023
1 parent da7ad5f commit 8d6a1ff
Show file tree
Hide file tree
Showing 29 changed files with 30 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@mrtryy/fancyuilibary",
"description": "FancyUI Libary",
"private": false,
"version": "0.1.123",
"version": "0.1.124",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import ChipsRoute from './Routes/ChipsRoute/ChipsRoute';
import CheckboxRoute from './Routes/CheckboxRoute/CheckboxRoute';
import ColorGeneratorRoute from './Routes/ColorGeneratorRoute/ColorGeneratorRoute';
import { TTheme } from '@/Components/UI/Interface/TTheme';
import themeStore from './Components/UI/Design/color/themeStore';
import themeStore from './Components/UI/Design/color/themeStore/themeStore';
import GlobalStyle from './GlobalStyle';
import FancyContentRoute from './Routes/FancyContentRoute/FancyContentRoute';
import { FancyModal, FancySwipeUpModal } from './lib';
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Atoms/ColorDisplay/ColorDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CheckerBoardPattern from '../CheckerBoardPattern/CheckerBoardPattern';
import { ColorDisplayContainer, Wrapper, Content, WrapperSVG } from './ColorDisplay.style';
import ClipBoardIcon from '../../SVGIcons/SVGClipBoardIcon/SVGClipBoardIcon';
import ClipBoardIconCheck from '../../SVGIcons/SVGClipBoardIconChecked/SVGClipBoardIconChecked';
import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';

// --------------------------------------------------------------------------- //
// ----- The main ColorDisplay Component for display the color in a box ------ //
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Atoms/InputLabel/InputLabel.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import necessary dependencies
import { Meta, StoryObj } from '@storybook/react';
import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';

// Import the component to be tested
import InputLabel from './InputLabel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { css } from 'styled-components';
import { getBackgroundColor } from '../../../Design/color/colorCalculatorForComponet';
import colorTransparencyCalculator from '../../../Design/color/colorTransparencyCalculator';
import { IActiveSwitchIndicator } from '../SwitchActiveIndicator';
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';
import { TBorderRadiusSizes } from '@/Components/UI/Interface/TBorderRadius';
import { TTheme } from '@/Components/UI/Interface/TTheme';

Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Atoms/Typography/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
import { CSSProp, css } from 'styled-components';

import { IStyledComponentProps, TypographyList } from './TypographyFontVariations.style';
import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';
import { generateFontVariants } from './TypographyStyleVariants';

const generateStyle = (externalStyle: CSSProp, fontWeight: 'normal' | 'bold' | undefined) => {
Expand Down
1 change: 1 addition & 0 deletions src/Components/UI/Design/color/themeStore/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as themeStore } from './themeStore';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { create } from 'zustand';
import { updateThemeColors, uiColors, IUiColorPops, regenerateUiColors } from './designColor';
import { spacingPx, borderRadius, fontSizes } from '../designSizes';
import { updateThemeColors, uiColors, IUiColorPops, regenerateUiColors } from '../designColor';
import { spacingPx, borderRadius, fontSizes } from '../../designSizes';
import { TTheme } from '@/Components/UI/Interface/TTheme';
import { breakpoints } from '@/Components/UI/Design/brakePoints';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from 'styled-components';

import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';
import { TBorderRadiusSizes } from '@/Components/UI/Interface/TBorderRadius';
export interface IAlignments {
$alignHorizontal?: 'left' | 'center' | 'right';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from 'styled-components';

import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';
import { TBorderRadiusSizes } from '@/Components/UI/Interface/TBorderRadius';

export const generateBorderRadiusForComponent = (size?: 'sm' | 'md' | 'lg', rounded?: TBorderRadiusSizes) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Color from 'color';
import { disabledStyle } from '../disabledStyle/disableStyle';
import { generatePadding } from '../generatePaddingForComponent/generatePadding';
import { boxShadow } from '../../shadows/shadows';
import themeStore from '../../color/themeStore';
import themeStore from '../../color/themeStore/themeStore';
import { getBackgroundColor } from '../../color/colorCalculatorForComponet';
import { getOpositColorContrast } from '../getOpositColorContrast';
import { IGenerateThemeItem } from './IGenerateThemeItemProps.model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';

export function generatePadding(offsetPx?: number, spacingLeftRightx2?: boolean) {
const offset = offsetPx ? offsetPx : 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from 'styled-components';
import themeStore from '../color/themeStore';
import themeStore from '../color/themeStore/themeStore';
import { TUiColorsSystemMessage } from '@/Components/UI/Interface/TUiColors';

export function systemMessageIndicatorStyle(systemMessage?: TUiColorsSystemMessage) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getBackgroundColor } from '../../../color/colorCalculatorForComponet';
import themeStore from '../../../color/themeStore';
import themeStore from '../../../color/themeStore/themeStore';
import { IGenerateThemeDesignForComponent } from '../generateThemeDesignForComponent';

// --------------------------------------------------------------------------- //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Color from 'color';

import { TThemeTypes } from '@/Components/UI/Interface/TUiColors';
import { TLayer } from '@/Components/UI/Interface/TLayer';
import themeStore from '../color/themeStore';
import themeStore from '../color/themeStore/themeStore';

const filpThemeColor = (isLightColor: boolean) => {
const isDarkTheme = themeStore.getState().isDarkTheme;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TThemeTypes } from '@/Components/UI/Interface/TUiColors';
import themeStore from '../../color/themeStore';
import themeStore from '../../color/themeStore/themeStore';

const getSimpleColorThemeType = (themeType?: TThemeTypes) => {
const isDarkTheme = themeStore.getState().isDarkTheme;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Design/shadows/shadows.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from 'styled-components';
import themeStore from '../color/themeStore';
import themeStore from '../color/themeStore/themeStore';
import colorTransparencyCalculator from '../color/colorTransparencyCalculator';

//global text-shadow
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Molecules/ChipList/ChipList.style.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, styled } from 'styled-components';

import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';
import { systemMessageIndicatorStyle } from '@/Components/UI/Design/designFunctions/generateSytemIncicator';
import { TUiColorsSystemMessage } from '@/Components/UI/Interface/TUiColorsSystemMessage';

Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Molecules/EditBar/EditBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FancyBottomBarIcon, { IFancyBottomBarIcon } from '../../Templates/FancyBo
import EditBarModal from '../../Atoms/EditBarModal/EditBarModal';

import DynamicBottomScrollBar from '../DynamicBottomScrollBar/DynamicBottomScrollBar';
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';

const Wrapper = styled.div`
position: fixed;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';
import { TTypography } from '@/Components/UI/Interface/TTypography';

const getSpacingFromTheme = themeStore.getState().theme.spacing;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useId } from 'react';
import { CSSProp } from 'styled-components';

import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';
import { TAlign, TAlignCheckbox } from '../FancyCheckbox/FancyCheckbox.model';
import { LabelWrapper, Wrapper } from './FancySelectWrapper.style';
import FancyContent from '../FancyContent/FancyContent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { styled, css } from 'styled-components';

import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';
import { TThemeTypes } from '@/Components/UI/Interface/TUiColors';
import { TLayer } from '@/Components/UI/Interface/TLayer';
import { getBackgroundColor } from '../../Design/color/colorCalculatorForComponet';
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Molecules/InfoCard/InfoCrad.style.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from 'styled-components';

import { TSizes } from '../../Interface/TComponentSizes';
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';

const getTheme = themeStore.getState().theme;
const sizes = {
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Molecules/InputWrapper/InputWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TRawInputAlign } from '../../Atoms/RawInput/RawInput';
import { TThemeTypes } from '@/Components/UI/Interface/TUiColors';
import { TLayer } from '@/Components/UI/Interface/TLayer';
import calcColorState from '../../Design/color/calcColorState';
import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';

// Define the styles for the icon
const iconStyle = css`
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Molecules/TabSwitch/TabSwitch.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { TTheme } from '@/Components/UI/Interface/TTheme';
import { TBorderRadiusSizes } from '@/Components/UI/Interface/TBorderRadius';
import { TThemeTypes } from '@/Components/UI/Interface/TUiColors';
import { TSpacings } from '../../Interface/TSpacings';
import themeStore from '../../Design/color/themeStore';
import themeStore from '../../Design/color/themeStore/themeStore';

// Define the different sizes for the tab switch
const getSpacingFromTheme = themeStore.getState().theme.spacing;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UI/Organisms/FancyChip/FancyChip.style.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled, { css } from 'styled-components';

import { TTheme } from '@/Components/UI/Interface/TTheme';
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';

// Define the type for the spacing position
export type TSpacingPosition = 'left' | 'right' | 'booth';
Expand Down
2 changes: 1 addition & 1 deletion src/Routes/ColorGeneratorRoute/ColorGeneratorRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

import styled, { css } from 'styled-components';
import { Typography } from '../../lib';
import themeStore from '../../Components/UI/Design/color/themeStore';
import themeStore from '../../Components/UI/Design/color/themeStore/themeStore';
import { TTheme } from '@/Components/UI/Interface/TTheme';

export default function ColorGeneratorRoute() {
Expand Down
2 changes: 1 addition & 1 deletion src/Routes/ExperimentalRoute/ExperimentalRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import React, { ChangeEvent } from 'react';

import themeStore from '../../Components/UI/Design/color/themeStore';
import themeStore from '../../Components/UI/Design/color/themeStore/themeStore';
import { FancyTextInput } from '../../Components/UI/Organisms/FancyTextInput';
import { FancyBottomBarIcon, FancyButton, FancyCard, FancyChip, FancySVGAtom, SingleToastMessage } from '../../lib';

Expand Down
2 changes: 1 addition & 1 deletion src/Routes/HeaderRoute/HeaderRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Typography } from '../../lib';
import styled from 'styled-components';
import FancyBar from '../../Components/UI/Atoms/FancyBox/FancyBox';
import Header from '../../Components/UI/Molecules/Header/Header';
import themeStore from '@/Components/UI/Design/color/themeStore';
import themeStore from '@/Components/UI/Design/color/themeStore/themeStore';

const Logo = () => (
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" height="30" version="1.1" viewBox="0 0 96.37 64.15" fill="#ff9800f0">
Expand Down

0 comments on commit 8d6a1ff

Please sign in to comment.