From bd30c23c6609fe49803b21fdd4d3d59828ee26b2 Mon Sep 17 00:00:00 2001
From: Igor Aralov
Date: Sat, 31 Aug 2024 16:53:19 +0300
Subject: [PATCH 01/27] Add few words about myself
---
src/app/App.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app/App.tsx b/src/app/App.tsx
index dcc0ff8ad..c430f4b9f 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -8,7 +8,11 @@ function App() {
- Текст писать тут
+
+
Научиться разрабатывать веб-приложения при помощи React
+
Профессионально работаю SQL разработчиком уже 10 лет и принимаю участие в разработке десктопного приложения на Delphi
+
Интересуюсь фронтенд и фуллстек разработкой на js/ts
+
From bd497f7f83b79c0e9d00d3a55dcc4fe54be317fb Mon Sep 17 00:00:00 2001
From: Igor Aralov
Date: Sat, 31 Aug 2024 19:24:51 +0300
Subject: [PATCH 02/27] Make ordered list
---
src/app/App.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/App.tsx b/src/app/App.tsx
index c430f4b9f..b109a531a 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -8,11 +8,11 @@ function App() {
-
+
Научиться разрабатывать веб-приложения при помощи React
Профессионально работаю SQL разработчиком уже 10 лет и принимаю участие в разработке десктопного приложения на Delphi
Интересуюсь фронтенд и фуллстек разработкой на js/ts
-
+
From 0102bedeb7a4ec620cd28ee37153808bfed80303 Mon Sep 17 00:00:00 2001
From: Igor Aralov
Date: Sat, 31 Aug 2024 19:59:18 +0300
Subject: [PATCH 03/27] Add demo GitHub actions
---
.github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 .github/workflows/github-actions-demo.yml
diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml
new file mode 100644
index 000000000..15a61d6b6
--- /dev/null
+++ b/.github/workflows/github-actions-demo.yml
@@ -0,0 +1,18 @@
+name: GitHub Actions Demo
+run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
+on: [push]
+jobs:
+ Explore-GitHub-Actions:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
+ - name: Check out repository code
+ uses: actions/checkout@v4
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+ - name: List files in the repository
+ run: |
+ ls ${{ github.workspace }}
+ - run: echo "🍏 This job's status is ${{ job.status }}."
From 8b5809b50fae502d1be162b46b2f8ef1364d3c72 Mon Sep 17 00:00:00 2001
From: Igor Aralov
Date: Sat, 31 Aug 2024 20:14:47 +0300
Subject: [PATCH 04/27] Remove demo github actions Modify main page
---
.github/workflows/github-actions-demo.yml | 18 ------------------
src/app/App.tsx | 11 ++++++-----
2 files changed, 6 insertions(+), 23 deletions(-)
delete mode 100644 .github/workflows/github-actions-demo.yml
diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml
deleted file mode 100644
index 15a61d6b6..000000000
--- a/.github/workflows/github-actions-demo.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: GitHub Actions Demo
-run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
-on: [push]
-jobs:
- Explore-GitHub-Actions:
- runs-on: ubuntu-latest
- steps:
- - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- - name: Check out repository code
- uses: actions/checkout@v4
- - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- - run: echo "🖥️ The workflow is now ready to test your code on the runner."
- - name: List files in the repository
- run: |
- ls ${{ github.workspace }}
- - run: echo "🍏 This job's status is ${{ job.status }}."
diff --git a/src/app/App.tsx b/src/app/App.tsx
index b109a531a..6351692cf 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -8,11 +8,12 @@ function App() {
-
-
Научиться разрабатывать веб-приложения при помощи React
-
Профессионально работаю SQL разработчиком уже 10 лет и принимаю участие в разработке десктопного приложения на Delphi
-
Интересуюсь фронтенд и фуллстек разработкой на js/ts
-
+
Научиться разрабатывать веб-приложения при помощи React
+
+ Профессионально работаю SQL разработчиком уже 10 лет и принимаю участие в разработке десктопного приложения
+ на Delphi
+
+
Интересуюсь фронтенд и фуллстек разработкой на js/ts
From f319bec4dc05056ffd569acf8e51175b492d4181 Mon Sep 17 00:00:00 2001
From: Igor Aralov
Date: Sat, 31 Aug 2024 21:10:21 +0300
Subject: [PATCH 05/27] Add contact information
---
src/app/App.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/app/App.tsx b/src/app/App.tsx
index 6351692cf..94a44b7bf 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -8,6 +8,7 @@ function App() {
+
Игорь Аралов (igor.aralov@rambler.ru)
Научиться разрабатывать веб-приложения при помощи React
-
- );
-}
diff --git a/src/stories/Layout.stories.ts b/src/stories/Layout.stories.ts
new file mode 100644
index 000000000..3cf76fca1
--- /dev/null
+++ b/src/stories/Layout.stories.ts
@@ -0,0 +1,13 @@
+import type { Meta } from '@storybook/react';
+
+import { Layout } from '../shared/layout/Layout';
+
+const meta: Meta = {
+ component: Layout,
+ title: 'Общее задание/Layout',
+ tags: ['autodocs'],
+};
+
+export default meta;
+
+export const LayoutWithContent = {};
diff --git a/src/stories/Logo.stories.ts b/src/stories/Logo.stories.ts
new file mode 100644
index 000000000..41f52e347
--- /dev/null
+++ b/src/stories/Logo.stories.ts
@@ -0,0 +1,13 @@
+import type { Meta } from '@storybook/react';
+
+import { Logo } from '../shared/logo/Logo';
+
+const meta: Meta = {
+ component: Logo,
+ title: 'Общее задание/Logo',
+ tags: ['autodocs'],
+};
+
+export default meta;
+
+export const CSSLogo = {};
diff --git a/src/stories/ModalForm.stories.tsx b/src/stories/ModalForm.stories.tsx
new file mode 100644
index 000000000..e4d70d61d
--- /dev/null
+++ b/src/stories/ModalForm.stories.tsx
@@ -0,0 +1,52 @@
+import React from 'react';
+import type { Meta } from '@storybook/react';
+
+import { ModalForm } from '../shared/modal-form/ModalForm';
+
+const SomeContent = () => (
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Et voluptatum laudantium officiis, maiores cum sunt dolores
+ maxime deserunt distinctio optio ipsa illum veniam consectetur corrupti laboriosam debitis corporis voluptates
+ cumque.
+
+);
+
+const meta: Meta = {
+ component: ModalForm,
+ title: 'Общее задание/Модальное окно',
+ tags: ['autodocs'],
+ argTypes: {
+ children: {
+ control: { type: 'boolean' },
+ mapping: { false: '', true: },
+ },
+ },
+ parameters: {
+ docs: {
+ story: {
+ height: '500px',
+ },
+ },
+ },
+};
+
+export default meta;
+
+export const NotVisible = {
+ args: {
+ visible: false,
+ },
+};
+
+export const Blank = {
+ args: {
+ visible: true,
+ },
+};
+
+export const WithContent = {
+ args: {
+ visible: true,
+ children: ,
+ },
+};
diff --git a/src/stories/OperationDetail.stories.tsx b/src/stories/OperationDetail.stories.tsx
new file mode 100644
index 000000000..d9efd0dff
--- /dev/null
+++ b/src/stories/OperationDetail.stories.tsx
@@ -0,0 +1,22 @@
+import type { Meta } from '@storybook/react';
+
+import { OperationDetail } from '../shared/icome-expenses-accounting/OperationDetail';
+
+const meta: Meta = {
+ component: OperationDetail,
+ title: 'Учет доходов-расходов/Полная операция',
+ tags: ['autodocs'],
+};
+
+export default meta;
+
+export const Test = {
+ args: {
+ amount: 2999.99,
+ category: 'оплата',
+ title: 'Подписка',
+ description:
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus omnis tempore cupiditate magni ad porro nihil consectetur a voluptas, rerum error, maiores rem, ut adipisci sint? Esse excepturi at non?',
+ date: new Date().toLocaleDateString(),
+ },
+};
diff --git a/src/stories/OperationSummary.stories.tsx b/src/stories/OperationSummary.stories.tsx
new file mode 100644
index 000000000..4bf0b3ddc
--- /dev/null
+++ b/src/stories/OperationSummary.stories.tsx
@@ -0,0 +1,21 @@
+import type { Meta } from '@storybook/react';
+
+import { OperationSummary } from '../shared/icome-expenses-accounting/OperationSummary';
+
+const meta: Meta = {
+ component: OperationSummary,
+ title: 'Учет доходов-расходов/Краткая операция',
+ tags: ['autodocs'],
+};
+
+export default meta;
+
+export const Test = {
+ args: {
+ amount: 2999.99,
+ category: 'оплата',
+ title: 'Подписка',
+ shortDescription:
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus omnis tempore cupiditate magni ad porro nihil consectetur a voluptas, rerum error, maiores rem, ut adipisci sint? Esse excepturi at non?',
+ },
+};
diff --git a/src/stories/Page.stories.ts b/src/stories/Page.stories.ts
deleted file mode 100644
index 905187f96..000000000
--- a/src/stories/Page.stories.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/react';
-import { within, userEvent } from '@storybook/testing-library';
-
-import { Page } from './Page';
-
-const meta: Meta = {
- title: 'Example/Page',
- component: Page,
- parameters: {
- // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
- layout: 'fullscreen',
- },
-};
-
-export default meta;
-type Story = StoryObj;
-
-export const LoggedOut: Story = {};
-
-// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
-export const LoggedIn: Story = {
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement);
- const loginButton = await canvas.getByRole('button', {
- name: /Log in/i,
- });
- await userEvent.click(loginButton);
- },
-};
diff --git a/src/stories/Page.tsx b/src/stories/Page.tsx
deleted file mode 100644
index 7b01ba5ce..000000000
--- a/src/stories/Page.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import React from 'react';
-import { Header } from './Header';
-import './page.css';
-
-type User = {
- name: string;
-};
-
-export const Page: React.FC = () => {
- const [user, setUser] = React.useState();
-
- return (
-
- setUser({ name: 'Jane Doe' })}
- onLogout={() => setUser(undefined)}
- onCreateAccount={() => setUser({ name: 'Jane Doe' })}
- />
-
-
-
Pages in Storybook
-
- We recommend building UIs with a{' '}
-
- component-driven
- {' '}
- process starting with atomic components and ending with pages.
-
-
- Render pages with mock data. This makes it easy to build and review page states without needing to navigate to
- them in your app. Here are some handy patterns for managing page data in Storybook:
-
-
-
- Use a higher-level connected component. Storybook helps you compose such data from the args of child
- component stories
-
-
- Assemble data in the page component from your services. You can mock these services out using Storybook.
-
Deleniti necessitatibus temporibus mollitia dolorum.
-
Natus, eos! Nobis, consequuntur enim!
-
Laborum ullam architecto fuga quia.
-
Inventore, molestiae. Repellendus, quaerat modi?
-
Quis hic molestiae cupiditate suscipit.
-
Dolorum modi soluta et amet.
-
Quo labore quis modi dolores?
-
Quos optio expedita harum nihil!
-
Nesciunt laborum quia id dolore?
-
Tempore ipsam eaque facere expedita!
-
Sequi assumenda quod tempore natus?
-
Cumque maiores reprehenderit inventore optio.
-
Itaque repudiandae repellat expedita ipsum!
-
Repudiandae dicta nihil optio magnam.
-
Aliquid beatae dolores harum nobis?
-
Molestias libero id asperiores fuga.
-
Atque sed at sunt voluptate!
-
Quisquam nisi sint voluptate quis.
-
Sunt asperiores quis fugit corporis.
-
Inventore odio consequatur ratione quibusdam.
-
Vel nobis tenetur facere architecto?
-
Maxime tempore laudantium ducimus odit.
-
Sit corporis veritatis omnis itaque.
-
Quod, nemo sequi. At, distinctio!
-
Aut cupiditate perspiciatis qui natus.
-
Incidunt veniam nam quae expedita!
-
Amet fugit veniam eveniet fugiat.
-
Ipsam obcaecati ea iure hic?
-
Asperiores dicta pariatur eum vitae?
-
Corrupti tempore obcaecati beatae explicabo.
-
Et eius cumque quidem minus!
-
Ipsam id adipisci voluptas soluta?
-
Asperiores earum voluptas ducimus dignissimos!
-
Aspernatur esse autem mollitia ut?
-
Expedita ex atque soluta at?
-
Laboriosam laborum quasi ipsum est.
-
-);
+const content: Content = {
+ text: {
+ en: `As the sun began to set over the tranquil village of Willowbrook, a sense of anticipation filled the air. The annual harvest festival was about to commence, and the villagers were bustling with excitement. Children ran through the fields, their laughter echoing like a melody of pure joy. Stalls were being set up along the main square, offering an array of handmade crafts, freshly baked goods, and the season’s finest produce.
+At the heart of the village stood an ancient oak tree, its branches sprawling wide like a guardian of time. Beneath this tree, the elders gathered, sharing stories of yore and wisdom passed down through generations. Amelia, a young girl with sparkling eyes and boundless curiosity, sat among them, soaking in every word. She loved listening to tales of bravery, love, and adventure, dreaming that one day, she too would have stories to tell.
+As the evening unfolded, the sky painted itself in hues of orange, pink, and purple, casting a magical glow over Willowbrook. The village musicians took their place, their instruments gleaming in the fading light. The first notes of a lively tune filled the air, and soon, everyone was dancing. Amelia twirled and spun, her laughter blending with the music, her heart filled with the simple happiness that only such moments can bring.
+As the night grew darker, lanterns were lit, casting a warm, golden light over the festivities. The aroma of roasted chestnuts and spiced cider wafted through the air, inviting everyone to partake in the feast. Friends and families gathered around long wooden tables, sharing food and stories, creating memories that would last a lifetime.
+Amidst the joy and celebration, Amelia’s thoughts wandered to the future. She knew that as long as the spirit of the harvest festival lived on, the bond within the community would remain strong, and Willowbrook would continue to be a place of love, laughter, and unity. With a heart full of hope and dreams, she smiled, knowing that she was part of something truly special.`,
+ ru: `Когда солнце начало садиться над тихой деревушкой Виллоубрук, в воздухе витало чувство ожидания. Ежегодный праздник урожая вот-вот начнется, и жители деревни бурлили от волнения. Дети бегали по полям, их смех звучал как мелодия чистой радости. На главной площади устанавливались ларьки, предлагающие ассортимент самодельных поделок, свежевыпеченных товаров и лучших продуктов сезона.
+В центре деревни стоял древний дуб, его ветви раскидывались широко, как хранитель времени. Под этим деревом собирались старейшины, рассказывая истории былых времен и мудрость, переданную через поколения. Амелия, молодая девушка с блестящими глазами и безграничным любопытством, сидела среди них, впитывая каждое слово. Она любила слушать истории о храбрости, любви и приключениях, мечтая о том, что однажды у нее тоже будут свои истории.
+По мере того как вечер разворачивался, небо окрашивалось в оттенки оранжевого, розового и пурпурного, придавая Виллоубруку магическое сияние. Деревенские музыканты заняли свои места, их инструменты сияли в ускользающем свете. Первые ноты оживленной мелодии заполнили воздух, и вскоре все танцевали. Амелия кружилась и вертелась, ее смех сливался с музыкой, сердце наполнялось простой радостью, которую могут принести только такие моменты.
+Когда ночь стала темнее, зажглись фонари, отбрасывая теплый, золотой свет на праздник. Аромат жареных каштанов и пряного сидра витал в воздухе, приглашая всех принять участие в пиршестве. Друзья и семьи собрались вокруг длинных деревянных столов, делясь едой и историями, создавая воспоминания, которые останутся на всю жизнь.
+Среди радости и праздника мысли Амелии унеслись в будущее. Она знала, что пока живет дух праздника урожая, связь внутри сообщества останется сильной, и Виллоубрук продолжит быть местом любви, смеха и единства. С сердцем, полным надежд и мечтаний, она улыбалась, зная, что является частью чего-то по-настоящему особенного.`,
+ },
+};
+
+const TestContent = () => {
+ const { useContent } = useLang();
+ const l = useContent(content);
+
+ return