ff-ds-ui 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.deploy.md +9 -0
- package/README.md +5 -1
- package/package.json +5 -3
- package/src/components/Avatar/Avatar.tsx +2 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/__stories__/Button.stories.tsx +1 -1
- package/src/components/Card/Card.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Divider/Divider.tsx +1 -1
- package/src/components/Divider/__stories__/Divider.stories.tsx +2 -2
- package/src/components/Flex/Flex.tsx +1 -1
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Loader/Loader.scss +1 -1
- package/src/components/Loader/Loader.tsx +1 -1
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +1 -1
- package/src/components/Text/Text.tsx +1 -1
- package/src/components/Text/_stories_/Text.stories.tsx +1 -1
- package/src/components/TextArea/TextArea.tsx +2 -3
- package/src/components/TextInput/TextInput.tsx +2 -2
- package/src/components/User/User.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/utils/bem/bem.ts +1 -0
- package/tsconfig.app.json +1 -4
- package/tsconfig.build.json +3 -6
- package/vite.config.ts +4 -12
package/README.deploy.md
ADDED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ff-ds-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/my-ui-lib.umd.js",
|
|
7
7
|
"module": "./dist/my-ui-lib.es.js",
|
|
@@ -28,15 +28,14 @@
|
|
|
28
28
|
"@storybook/addon-docs": "^10.1.5",
|
|
29
29
|
"@storybook/addon-onboarding": "^10.1.8",
|
|
30
30
|
"@storybook/addon-vitest": "^10.1.8",
|
|
31
|
-
"@storybook/react-vite": "^10.1.5",
|
|
32
31
|
"@storybook/react": "^10.1.10",
|
|
32
|
+
"@storybook/react-vite": "^10.1.5",
|
|
33
33
|
"@types/node": "^24.10.1",
|
|
34
34
|
"@types/react": "^19.2.5",
|
|
35
35
|
"@types/react-dom": "^19.2.3",
|
|
36
36
|
"@vitejs/plugin-react": "^5.1.1",
|
|
37
37
|
"@vitest/browser-playwright": "^4.0.15",
|
|
38
38
|
"@vitest/coverage-v8": "^4.0.15",
|
|
39
|
-
"classnames": "^2.5.1",
|
|
40
39
|
"eslint": "^9.39.1",
|
|
41
40
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
42
41
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
@@ -53,5 +52,8 @@
|
|
|
53
52
|
"vite": "^7.2.4",
|
|
54
53
|
"vite-plugin-dts": "^4.5.4",
|
|
55
54
|
"vitest": "^4.0.15"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"classnames": "^2.5.1"
|
|
56
58
|
}
|
|
57
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import './Avatar.scss'
|
|
3
|
-
import { bemBlock } from '
|
|
4
|
-
import { Text } from '
|
|
3
|
+
import { bemBlock } from '../../utils'
|
|
4
|
+
import { Text } from '../../components/Text'
|
|
5
5
|
import { getAvatarCamelCaseText } from './utils'
|
|
6
6
|
|
|
7
7
|
export interface AvatarProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import './Button.scss'
|
|
3
|
-
import { bemBlock } from '
|
|
3
|
+
import { bemBlock } from '../../utils'
|
|
4
4
|
import type { BUTTON_BORDER, BUTTON_SIZES, BUTTON_VARIANTS, BUTTON_WIDTH } from './const'
|
|
5
5
|
|
|
6
6
|
export type ButtonBorder = (typeof BUTTON_BORDER)[number]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
import { Divider } from '../Divider'
|
|
3
|
-
import { Flex } from '
|
|
4
|
-
import { Avatar } from '
|
|
3
|
+
import { Flex } from '../../'
|
|
4
|
+
import { Avatar } from '../../Avatar'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Components/Divider',
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import './TextArea.scss'
|
|
3
|
-
import { bemBlock } from '
|
|
4
|
-
import { Text } from '../
|
|
5
|
-
import { Flex } from '../Flex'
|
|
3
|
+
import { bemBlock } from '../../utils'
|
|
4
|
+
import { Text, Flex } from '../'
|
|
6
5
|
|
|
7
6
|
interface TextAreaProps extends React.HTMLAttributes<HTMLTextAreaElement> {
|
|
8
7
|
placeholder?: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import './TextInput.scss'
|
|
3
|
-
import { bemBlock } from '
|
|
4
|
-
import { Flex } from '
|
|
3
|
+
import { bemBlock } from '../../utils'
|
|
4
|
+
import { Flex } from '../'
|
|
5
5
|
import { Text } from '../Text/Text'
|
|
6
6
|
|
|
7
7
|
interface TextInputProps extends React.HTMLAttributes<HTMLInputElement> {
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components'
|
|
1
|
+
export * from './components'
|
package/src/utils/bem/bem.ts
CHANGED
|
@@ -11,6 +11,7 @@ export const bemBlock = (bemBlockName: string) => {
|
|
|
11
11
|
const classNameMods = mods
|
|
12
12
|
? Object.entries(mods)
|
|
13
13
|
// Cортируем пустые значения
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
15
|
.filter(([_, value]) => value !== false && value !== undefined && value !== null)
|
|
15
16
|
// Убираем значения true - btn_disabled_true => btn_disabled
|
|
16
17
|
.map(([bemModifier, bemModifierValue]) => {
|
package/tsconfig.app.json
CHANGED
package/tsconfig.build.json
CHANGED
|
@@ -10,11 +10,8 @@
|
|
|
10
10
|
"strict": true,
|
|
11
11
|
"moduleResolution": "Node",
|
|
12
12
|
"skipLibCheck": true,
|
|
13
|
-
"esModuleInterop": true
|
|
14
|
-
"baseUrl": ".",
|
|
15
|
-
"paths": {
|
|
16
|
-
"@/*": ["src/*"]
|
|
17
|
-
}
|
|
13
|
+
"esModuleInterop": true
|
|
18
14
|
},
|
|
19
|
-
"include": ["src"]
|
|
15
|
+
"include": ["src"],
|
|
16
|
+
"exclude": ["**/*.stories.*"]
|
|
20
17
|
}
|
package/vite.config.ts
CHANGED
|
@@ -23,34 +23,26 @@ export default defineConfig({
|
|
|
23
23
|
entry: 'src/index.ts',
|
|
24
24
|
name: 'MyUILib',
|
|
25
25
|
fileName: (format) => `my-ui-lib.${format}.js`,
|
|
26
|
+
formats: ['es', 'cjs'],
|
|
26
27
|
},
|
|
27
28
|
outDir: 'dist',
|
|
28
|
-
// папка сборки
|
|
29
29
|
emptyOutDir: true,
|
|
30
|
-
// очищает dist перед сборкой
|
|
31
30
|
rollupOptions: {
|
|
32
|
-
external: ['react', 'react-dom'],
|
|
31
|
+
external: ['react', 'react-dom', 'classnames'],
|
|
33
32
|
output: {
|
|
34
33
|
globals: {
|
|
35
34
|
react: 'React',
|
|
36
35
|
'react-dom': 'ReactDOM',
|
|
37
36
|
},
|
|
38
|
-
preserveModules: false,
|
|
37
|
+
preserveModules: false,
|
|
39
38
|
},
|
|
40
39
|
},
|
|
41
40
|
},
|
|
42
|
-
resolve: {
|
|
43
|
-
alias: {
|
|
44
|
-
'@': path.resolve(__dirname, 'src'),
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
41
|
test: {
|
|
48
42
|
projects: [
|
|
49
43
|
{
|
|
50
44
|
extends: true,
|
|
51
45
|
plugins: [
|
|
52
|
-
// The plugin will run tests for the stories defined in your Storybook config
|
|
53
|
-
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
54
46
|
storybookTest({
|
|
55
47
|
configDir: path.join(dirname, '.storybook'),
|
|
56
48
|
}),
|
|
@@ -75,7 +67,7 @@ export default defineConfig({
|
|
|
75
67
|
test: {
|
|
76
68
|
name: 'unit',
|
|
77
69
|
include: ['src/**/*.test.{ts,tsx}'],
|
|
78
|
-
environment: 'node',
|
|
70
|
+
environment: 'node',
|
|
79
71
|
},
|
|
80
72
|
},
|
|
81
73
|
],
|