freemium-ui 2.0.0-beta.3 → 2.0.0-beta.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/dist/README.md +71 -0
- package/dist/index.cjs.js +2347 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2675 -0
- package/dist/index.js +2347 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +76 -0
- package/dist/rollup.config.d.ts +3 -0
- package/package.json +2 -2
- package/.husky/pre-commit +0 -5
- package/scripts/buildUtils.js +0 -33
- package/scripts/frankBuild.js +0 -100
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "freemium-ui",
|
|
3
|
+
"version": "2.0.0-beta.5",
|
|
4
|
+
"description": "React Ui Components for Freemium Apps",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@blueprintjs/datetime2": "^2.3.1",
|
|
10
|
+
"@dnd-kit/core": "^6.1.0",
|
|
11
|
+
"@dnd-kit/modifiers": "^7.0.0",
|
|
12
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
13
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
14
|
+
"@radix-ui/react-alert-dialog": "^1.0.5",
|
|
15
|
+
"@radix-ui/react-avatar": "^1.0.4",
|
|
16
|
+
"@radix-ui/react-checkbox": "^1.0.4",
|
|
17
|
+
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
18
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
19
|
+
"@radix-ui/react-label": "^2.0.2",
|
|
20
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
21
|
+
"@radix-ui/react-radio-group": "^1.1.3",
|
|
22
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
23
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
24
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
25
|
+
"@radix-ui/react-toast": "^1.1.5",
|
|
26
|
+
"@radix-ui/react-tooltip": "^1.0.7",
|
|
27
|
+
"@tanstack/react-table": "^8.11.8",
|
|
28
|
+
"downshift": "^8.2.3",
|
|
29
|
+
"moment": "^2.30.1",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"react-dom": "^18.2.0",
|
|
32
|
+
"react-scripts": "5.0.1",
|
|
33
|
+
"react-transition-group": "^4.4.5",
|
|
34
|
+
"styled-components": "^6.1.1",
|
|
35
|
+
"typescript": "^4.9.5",
|
|
36
|
+
"web-vitals": "^2.1.4"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/freshdesk/freemium-ui.git"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"registry": "https://registry.npmjs.org/"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"Freemiui",
|
|
47
|
+
"React",
|
|
48
|
+
"UI",
|
|
49
|
+
"Material"
|
|
50
|
+
],
|
|
51
|
+
"author": "Freshworks",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/freshdesk/freemium-ui/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/freshdesk/freemium-ui#readme",
|
|
56
|
+
"eslintConfig": {
|
|
57
|
+
"extends": [
|
|
58
|
+
"react-app",
|
|
59
|
+
"react-app/jest",
|
|
60
|
+
"plugin:storybook/recommended"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"browserslist": {
|
|
64
|
+
"production": [
|
|
65
|
+
">0.2%",
|
|
66
|
+
"not dead",
|
|
67
|
+
"not op_mini all"
|
|
68
|
+
],
|
|
69
|
+
"development": [
|
|
70
|
+
"last 1 chrome version",
|
|
71
|
+
"last 1 firefox version",
|
|
72
|
+
"last 1 safari version"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"private": false
|
|
76
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freemium-ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.5",
|
|
4
4
|
"description": "React Ui Components for Freemium Apps",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"scripts": {
|
|
80
80
|
"version:beta": "npm version prerelease --preid=beta",
|
|
81
81
|
"publish:beta": "npm publish --tag beta",
|
|
82
|
-
"
|
|
82
|
+
"prepublishOnly": "npm run build",
|
|
83
83
|
"start": "react-scripts start",
|
|
84
84
|
"build:react-app": "react-scripts build",
|
|
85
85
|
"build": "npm run rollup && npm run post:build",
|
package/.husky/pre-commit
DELETED
package/scripts/buildUtils.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
export const getFolders = (entry) => {
|
|
3
|
-
const dirs = fs.readdirSync(entry);
|
|
4
|
-
const dirsWithoutIndex = dirs
|
|
5
|
-
.filter((name) => name !== 'index.ts')
|
|
6
|
-
.filter((name) => name !== 'utils');
|
|
7
|
-
return dirsWithoutIndex;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const getFiles = (entry, extensions = [], excludeExtensions = []) => {
|
|
11
|
-
let fileNames = [];
|
|
12
|
-
const dirs = fs.readdirSync(entry);
|
|
13
|
-
dirs.forEach((dir) => {
|
|
14
|
-
const path = `${entry}/${dir}`;
|
|
15
|
-
|
|
16
|
-
if (fs.lstatSync(path).isDirectory()) {
|
|
17
|
-
fileNames = [
|
|
18
|
-
...fileNames,
|
|
19
|
-
...getFiles(path, extensions, excludeExtensions),
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
!excludeExtensions.some((exclude) => dir.endsWith(exclude)) &&
|
|
27
|
-
extensions.some((ext) => dir.endsWith(ext))
|
|
28
|
-
) {
|
|
29
|
-
fileNames.push(path);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return fileNames;
|
|
33
|
-
};
|
package/scripts/frankBuild.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
const { resolve, join, basename } = require('path');
|
|
3
|
-
const { readFile, writeFile, copy, remove } = require('fs-extra');
|
|
4
|
-
const packagePath = process.cwd();
|
|
5
|
-
const distPath = join(packagePath, './dist');
|
|
6
|
-
|
|
7
|
-
// const components = [
|
|
8
|
-
// 'Alert',
|
|
9
|
-
// 'Button',
|
|
10
|
-
// 'Checkbox',
|
|
11
|
-
// 'Confirmation',
|
|
12
|
-
// 'Drawer',
|
|
13
|
-
// 'Dropdown',
|
|
14
|
-
// 'Icons',
|
|
15
|
-
// 'Input',
|
|
16
|
-
// 'Loader',
|
|
17
|
-
// 'Menu',
|
|
18
|
-
// 'Modal',
|
|
19
|
-
// 'MultiSelectDropdown',
|
|
20
|
-
// 'Pickers',
|
|
21
|
-
// 'Popover',
|
|
22
|
-
// 'Radio',
|
|
23
|
-
// 'Reorder',
|
|
24
|
-
// 'Table',
|
|
25
|
-
// 'Tabs',
|
|
26
|
-
// 'Tag',
|
|
27
|
-
// 'ThemeProvider',
|
|
28
|
-
// 'Toast',
|
|
29
|
-
// 'Toggle',
|
|
30
|
-
// 'Tooltip',
|
|
31
|
-
// 'Transition',
|
|
32
|
-
// 'Typography',
|
|
33
|
-
// ];
|
|
34
|
-
|
|
35
|
-
const writeJson = (targetPath, obj) =>
|
|
36
|
-
writeFile(targetPath, JSON.stringify(obj, null, 2), 'utf8');
|
|
37
|
-
|
|
38
|
-
async function createPackageFile() {
|
|
39
|
-
const packageData = await readFile(
|
|
40
|
-
resolve(packagePath, './package.json'),
|
|
41
|
-
'utf8',
|
|
42
|
-
);
|
|
43
|
-
const { scripts, devDependencies, ...packageOthers } =
|
|
44
|
-
JSON.parse(packageData);
|
|
45
|
-
const newPackageData = {
|
|
46
|
-
...packageOthers,
|
|
47
|
-
private: false,
|
|
48
|
-
typings: './index.d.ts',
|
|
49
|
-
main: './index.js',
|
|
50
|
-
module: './index.js',
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const targetPath = resolve(distPath, './package.json');
|
|
54
|
-
|
|
55
|
-
await writeJson(targetPath, newPackageData);
|
|
56
|
-
console.log(`Created package.json in ${targetPath}`);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function cleanUp() {
|
|
60
|
-
// const targetPath = resolve(distPath, './types');
|
|
61
|
-
// await remove(targetPath);
|
|
62
|
-
// const copySourcePath = resolve(distPath, './types/src/components');
|
|
63
|
-
// const copyTargetPath = resolve(distPath, './');
|
|
64
|
-
// await copy(copySourcePath, copyTargetPath);
|
|
65
|
-
// console.log('Types copied');
|
|
66
|
-
// await Promise.all(
|
|
67
|
-
// components.map(async (component) => {
|
|
68
|
-
// const sourcePath = resolve(
|
|
69
|
-
// distPath,
|
|
70
|
-
// `./types/src/components/${component}`,
|
|
71
|
-
// );
|
|
72
|
-
// const targetPath = resolve(distPath, `./${component}`);
|
|
73
|
-
// await copy(sourcePath, targetPath);
|
|
74
|
-
// console.log(`Copied ${sourcePath} to ${targetPath}`);
|
|
75
|
-
// }),
|
|
76
|
-
// );
|
|
77
|
-
await remove(resolve(distPath, `./types`));
|
|
78
|
-
console.log('Types cleared');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async function includeFileInBuild(file) {
|
|
82
|
-
const sourcePath = resolve(packagePath, file);
|
|
83
|
-
const targetPath = resolve(distPath, basename(file));
|
|
84
|
-
await copy(sourcePath, targetPath);
|
|
85
|
-
console.log(`Copied ${sourcePath} to ${targetPath}`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
async function run() {
|
|
89
|
-
try {
|
|
90
|
-
await createPackageFile();
|
|
91
|
-
await includeFileInBuild('./README.md');
|
|
92
|
-
// await includeFileInBuild('../../LICENSE');
|
|
93
|
-
await cleanUp();
|
|
94
|
-
} catch (err) {
|
|
95
|
-
console.error(err);
|
|
96
|
-
process.exit(1);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
run();
|