forstok-ui-lib 7.4.1 → 7.5.0
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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
- package/rollup.config.js +29 -59
- package/src/components/date/range.tsx +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forstok-ui-lib",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"description": "Forstok UI Components Library",
|
|
5
5
|
"path": "dist",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -67,9 +67,10 @@
|
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^19.0.0",
|
|
69
69
|
"react-dom": "^19.0.0",
|
|
70
|
+
"styled-components": "^6.1.15",
|
|
70
71
|
"react-select": "^5.10.0",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
72
|
+
"react-select-async-paginate": "^0.7.9",
|
|
73
|
+
"rc-picker": "^4.11.3"
|
|
73
74
|
},
|
|
74
75
|
"overrides": {}
|
|
75
76
|
}
|
package/rollup.config.js
CHANGED
|
@@ -1,47 +1,33 @@
|
|
|
1
|
-
import PeerDepsExternalPlugin from 'rollup-plugin-peer-deps-external'
|
|
1
|
+
import PeerDepsExternalPlugin from 'rollup-plugin-peer-deps-external';
|
|
2
2
|
import resolve from '@rollup/plugin-node-resolve';
|
|
3
3
|
import commonjs from '@rollup/plugin-commonjs';
|
|
4
4
|
import terser from '@rollup/plugin-terser';
|
|
5
|
-
// import postcss from 'rollup-plugin-postcss';
|
|
6
5
|
import dts from 'rollup-plugin-dts';
|
|
7
6
|
import typescript from '@rollup/plugin-typescript';
|
|
8
7
|
import url from '@rollup/plugin-url';
|
|
9
8
|
import svgr from '@svgr/rollup';
|
|
10
9
|
import image from '@rollup/plugin-image';
|
|
11
10
|
import css from 'rollup-plugin-import-css';
|
|
11
|
+
import createStyledComponentsTransformer from 'typescript-plugin-styled-components';
|
|
12
12
|
|
|
13
|
-
const createStyledComponentsTransformer = require('typescript-plugin-styled-components').default;
|
|
14
13
|
const packageJson = require('./package.json');
|
|
15
14
|
|
|
16
15
|
export default [
|
|
17
16
|
{
|
|
18
17
|
input: 'src/index.ts',
|
|
19
18
|
output: [
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
format: 'cjs',
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
interop: 'auto',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
file: packageJson.module,
|
|
28
|
-
format: 'esm',
|
|
29
|
-
sourcemap: true,
|
|
30
|
-
interop: 'auto',
|
|
31
|
-
},
|
|
19
|
+
{ file: packageJson.main, format: 'cjs', sourcemap: true, interop: 'auto' },
|
|
20
|
+
{ file: packageJson.module, format: 'esm', sourcemap: true, interop: 'auto' },
|
|
32
21
|
],
|
|
33
22
|
plugins: [
|
|
34
|
-
PeerDepsExternalPlugin(),
|
|
23
|
+
PeerDepsExternalPlugin(), // automatically externalizes peerDependencies
|
|
35
24
|
resolve({
|
|
36
25
|
browser: true,
|
|
37
26
|
extensions: ['.mjs', '.js', '.json', '.ts', '.tsx'],
|
|
38
27
|
preferBuiltins: false,
|
|
39
28
|
mainFields: ['module', 'main', 'browser'],
|
|
40
29
|
}),
|
|
41
|
-
commonjs({
|
|
42
|
-
include: /node_modules/,
|
|
43
|
-
sourceMap: false,
|
|
44
|
-
}),
|
|
30
|
+
commonjs({ include: /node_modules/, sourceMap: false }),
|
|
45
31
|
typescript({
|
|
46
32
|
tsconfig: './tsconfig.json',
|
|
47
33
|
transformers: [
|
|
@@ -58,53 +44,37 @@ export default [
|
|
|
58
44
|
],
|
|
59
45
|
}),
|
|
60
46
|
terser(),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// path: './postcss.config.js'
|
|
64
|
-
// },
|
|
65
|
-
// inject: true,
|
|
66
|
-
// minimize: true,
|
|
67
|
-
// sourceMap: true,
|
|
68
|
-
// modules: true,
|
|
69
|
-
// extract: true
|
|
70
|
-
// }),
|
|
71
|
-
css({
|
|
72
|
-
minify: true,
|
|
73
|
-
modules: true,
|
|
74
|
-
inject: true,
|
|
75
|
-
}),
|
|
76
|
-
url(),
|
|
47
|
+
css({ minify: true, modules: true, inject: true }),
|
|
48
|
+
url(),
|
|
77
49
|
svgr({ icon: true }),
|
|
78
50
|
image({
|
|
79
51
|
output: `${packageJson.path}/images`,
|
|
80
52
|
extensions: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
81
|
-
exclude: 'node_modules/**'
|
|
82
|
-
})
|
|
53
|
+
exclude: 'node_modules/**',
|
|
54
|
+
}),
|
|
83
55
|
],
|
|
84
56
|
external: (id) =>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
57
|
+
[
|
|
58
|
+
'react',
|
|
59
|
+
'react-dom',
|
|
60
|
+
'styled-components',
|
|
61
|
+
'react-select',
|
|
62
|
+
'react-select-async-paginate',
|
|
63
|
+
'rc-picker',
|
|
64
|
+
'@wojtekmaj/react-daterange-picker',
|
|
65
|
+
'approvejs',
|
|
66
|
+
'html-to-text',
|
|
67
|
+
'moment',
|
|
68
|
+
'moment-range',
|
|
69
|
+
'react-datepicker',
|
|
70
|
+
'use-state-with-callback',
|
|
71
|
+
'frimousse',
|
|
72
|
+
].some((pkg) => id === pkg || id.startsWith(pkg + '/')),
|
|
101
73
|
},
|
|
102
74
|
{
|
|
103
75
|
input: 'src/index.ts',
|
|
104
|
-
output: [
|
|
105
|
-
{ file: packageJson.types }
|
|
106
|
-
],
|
|
76
|
+
output: [{ file: packageJson.types }],
|
|
107
77
|
plugins: [dts.default()],
|
|
108
|
-
external: [/\.css$/]
|
|
109
|
-
}
|
|
78
|
+
external: [/\.css$/],
|
|
79
|
+
},
|
|
110
80
|
];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useState, useRef, useEffect } from 'react'
|
|
2
2
|
import moment, { Moment } from 'moment'
|
|
3
|
-
import { RangePicker } from 'rc-picker'
|
|
4
|
-
import { RangePickerRef } from 'rc-picker/lib/interface'
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { RangePicker } from 'rc-picker';
|
|
4
|
+
import { RangePickerRef } from 'rc-picker/lib/interface';
|
|
5
|
+
import generateMoment from 'rc-picker/lib/generate/moment.js';
|
|
6
|
+
import enUS from 'rc-picker/lib/locale/en_US.js';
|
|
7
7
|
|
|
8
8
|
import IconComponent from '../icon'
|
|
9
9
|
|
|
@@ -71,7 +71,7 @@ const DateRangeComponent = (props: TDateRange) => {
|
|
|
71
71
|
// }
|
|
72
72
|
|
|
73
73
|
const rest = {
|
|
74
|
-
generateConfig:
|
|
74
|
+
generateConfig: generateMoment,
|
|
75
75
|
value,
|
|
76
76
|
onChange,
|
|
77
77
|
// onCalendarChange,
|