freemium-ui 1.0.334 → 2.0.0-beta.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.
Files changed (105) hide show
  1. package/.husky/pre-commit +5 -0
  2. package/README.md +26 -51
  3. package/lib/index.d.ts +833 -0
  4. package/lib/index.esm.js +833 -42
  5. package/lib/index.js +833 -0
  6. package/package.json +94 -87
  7. package/rollup.config.mjs +47 -0
  8. package/.github/workflows/security.yml +0 -52
  9. package/lib/index.cjs.js +0 -28
  10. package/lib/types/components/Alert/Alert.d.ts +0 -17
  11. package/lib/types/components/Alert/index.d.ts +0 -1
  12. package/lib/types/components/BoxedRadio/boxedRadio.d.ts +0 -9
  13. package/lib/types/components/BoxedRadio/boxedRadioContext.d.ts +0 -7
  14. package/lib/types/components/BoxedRadio/boxedRadioGroup.d.ts +0 -2
  15. package/lib/types/components/BoxedRadio/index.d.ts +0 -2
  16. package/lib/types/components/Button/Buttons.d.ts +0 -19
  17. package/lib/types/components/Button/index.d.ts +0 -1
  18. package/lib/types/components/ButtonDropdown/ButtonDropdown.d.ts +0 -20
  19. package/lib/types/components/ButtonDropdown/index.d.ts +0 -1
  20. package/lib/types/components/Checkbox/Checkbox.d.ts +0 -13
  21. package/lib/types/components/Checkbox/index.d.ts +0 -1
  22. package/lib/types/components/Confirmation/Confirmation.d.ts +0 -38
  23. package/lib/types/components/Confirmation/index.d.ts +0 -2
  24. package/lib/types/components/Confirmation/useConfirmation.d.ts +0 -10
  25. package/lib/types/components/ControlledTable/ControlledTable.d.ts +0 -50
  26. package/lib/types/components/ControlledTable/index.d.ts +0 -1
  27. package/lib/types/components/CssBaseLine/index.d.ts +0 -1
  28. package/lib/types/components/Drawer/Drawer.d.ts +0 -17
  29. package/lib/types/components/Drawer/index.d.ts +0 -2
  30. package/lib/types/components/Drawer/styles.d.ts +0 -6
  31. package/lib/types/components/Dropdown/DropdownButton.d.ts +0 -14
  32. package/lib/types/components/Dropdown/DropdownInput.d.ts +0 -4
  33. package/lib/types/components/Dropdown/DropdownMenu.d.ts +0 -4
  34. package/lib/types/components/Dropdown/index.d.ts +0 -30
  35. package/lib/types/components/Dropdown/styles.d.ts +0 -7
  36. package/lib/types/components/Dropdown/withDownshift.d.ts +0 -8
  37. package/lib/types/components/Icons/Icons.d.ts +0 -20
  38. package/lib/types/components/Icons/index.d.ts +0 -1
  39. package/lib/types/components/Input/Input.d.ts +0 -57
  40. package/lib/types/components/Input/index.d.ts +0 -1
  41. package/lib/types/components/Loader/Loader.d.ts +0 -8
  42. package/lib/types/components/Loader/index.d.ts +0 -1
  43. package/lib/types/components/Menu/Menu.d.ts +0 -20
  44. package/lib/types/components/Menu/index.d.ts +0 -1
  45. package/lib/types/components/Modal/Modal.d.ts +0 -13
  46. package/lib/types/components/Modal/index.d.ts +0 -3
  47. package/lib/types/components/Modal/styles.d.ts +0 -12
  48. package/lib/types/components/Modal/use-modal.d.ts +0 -10
  49. package/lib/types/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +0 -32
  50. package/lib/types/components/MultiSelectDropdown/index.d.ts +0 -1
  51. package/lib/types/components/Pickers/DatePicker.d.ts +0 -4
  52. package/lib/types/components/Pickers/DateRangePicker.d.ts +0 -4
  53. package/lib/types/components/Pickers/DateTimePicker.d.ts +0 -4
  54. package/lib/types/components/Pickers/TimePicker.d.ts +0 -4
  55. package/lib/types/components/Pickers/index.d.ts +0 -4
  56. package/lib/types/components/Pickers/styles.d.ts +0 -4
  57. package/lib/types/components/Pickers/types.d.ts +0 -29
  58. package/lib/types/components/Popover/Popover.d.ts +0 -21
  59. package/lib/types/components/Popover/index.d.ts +0 -1
  60. package/lib/types/components/Radio/Radio.d.ts +0 -9
  61. package/lib/types/components/Radio/index.d.ts +0 -1
  62. package/lib/types/components/RestTable/RestTable.d.ts +0 -19
  63. package/lib/types/components/RestTable/index.d.ts +0 -1
  64. package/lib/types/components/Table/Table.d.ts +0 -56
  65. package/lib/types/components/Table/index.d.ts +0 -1
  66. package/lib/types/components/Tabs/Tabs.d.ts +0 -20
  67. package/lib/types/components/Tabs/index.d.ts +0 -1
  68. package/lib/types/components/Tag/Tag.d.ts +0 -7
  69. package/lib/types/components/Tag/index.d.ts +0 -1
  70. package/lib/types/components/ThemeProvider/index.d.ts +0 -12
  71. package/lib/types/components/Toast/Toast.d.ts +0 -14
  72. package/lib/types/components/Toast/index.d.ts +0 -3
  73. package/lib/types/components/Toggle/Toggle.d.ts +0 -15
  74. package/lib/types/components/Toggle/index.d.ts +0 -1
  75. package/lib/types/components/Tooltip/Tooltip.d.ts +0 -24
  76. package/lib/types/components/Tooltip/index.d.ts +0 -1
  77. package/lib/types/components/Transition/Transition.d.ts +0 -14
  78. package/lib/types/components/Transition/fade.d.ts +0 -6
  79. package/lib/types/components/Transition/index.d.ts +0 -4
  80. package/lib/types/components/Transition/slide-fade.d.ts +0 -13
  81. package/lib/types/components/Transition/slide.d.ts +0 -11
  82. package/lib/types/components/UiProvider/UiProvider.d.ts +0 -2
  83. package/lib/types/components/UiProvider/index.d.ts +0 -1
  84. package/lib/types/components/use-toasts/index.d.ts +0 -1
  85. package/lib/types/components/use-toasts/toast-container.d.ts +0 -8
  86. package/lib/types/components/use-toasts/toast-item.d.ts +0 -15
  87. package/lib/types/components/use-toasts/use-toast.d.ts +0 -17
  88. package/lib/types/index.d.ts +0 -30
  89. package/lib/types/theme/default/colors.d.ts +0 -3
  90. package/lib/types/theme/default/index.d.ts +0 -7
  91. package/lib/types/theme/default/palette.d.ts +0 -3
  92. package/lib/types/theme/default/typography.d.ts +0 -3
  93. package/lib/types/theme/freshstatus/colors.d.ts +0 -3
  94. package/lib/types/theme/freshstatus/index.d.ts +0 -7
  95. package/lib/types/theme/freshstatus/palette.d.ts +0 -3
  96. package/lib/types/theme/freshstatus/typography.d.ts +0 -3
  97. package/lib/types/theme/index.d.ts +0 -352
  98. package/lib/types/theme/shared.d.ts +0 -2
  99. package/lib/types/utils/date.d.ts +0 -7
  100. package/lib/types/utils/index.d.ts +0 -1
  101. package/lib/types/utils/use-current-state.d.ts +0 -4
  102. package/lib/types/utils/use-portal.d.ts +0 -2
  103. package/lib/types/utils/use-ssr.d.ts +0 -6
  104. package/lib/types/utils/use-ui-context.d.ts +0 -11
  105. package/lib/types/utils/with-defaults.d.ts +0 -3
package/package.json CHANGED
@@ -1,22 +1,86 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "1.0.334",
3
+ "version": "2.0.0-beta.0",
4
4
  "description": "React Ui Components for Freemium Apps",
5
- "main": "lib/index.cjs.js",
5
+ "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
- "types": "lib/types",
8
- "directories": {
9
- "lib": "lib"
7
+ "types": "lib/index.d.ts",
8
+ "dependencies": {
9
+ "@blueprintjs/datetime2": "^2.3.1",
10
+ "@radix-ui/react-alert-dialog": "^1.0.5",
11
+ "@radix-ui/react-checkbox": "^1.0.4",
12
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
13
+ "@radix-ui/react-icons": "^1.3.0",
14
+ "@radix-ui/react-label": "^2.0.2",
15
+ "@radix-ui/react-popover": "^1.0.7",
16
+ "@radix-ui/react-radio-group": "^1.1.3",
17
+ "@radix-ui/react-select": "^2.0.0",
18
+ "@radix-ui/react-switch": "^1.0.3",
19
+ "@radix-ui/react-tabs": "^1.0.4",
20
+ "@radix-ui/react-toast": "^1.1.5",
21
+ "@radix-ui/react-tooltip": "^1.0.7",
22
+ "downshift": "^8.2.3",
23
+ "moment": "^2.30.1",
24
+ "react": "^18.2.0",
25
+ "react-dom": "^18.2.0",
26
+ "react-scripts": "5.0.1",
27
+ "react-spring": "^9.7.3",
28
+ "react-transition-group": "^4.4.5",
29
+ "styled-components": "^6.1.1",
30
+ "typescript": "^4.9.5",
31
+ "web-vitals": "^2.1.4"
32
+ },
33
+ "devDependencies": {
34
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
35
+ "@rollup/plugin-commonjs": "^25.0.7",
36
+ "@rollup/plugin-node-resolve": "^15.2.3",
37
+ "@rollup/plugin-terser": "^0.4.4",
38
+ "@rollup/plugin-typescript": "^11.1.6",
39
+ "@storybook/addon-essentials": "^7.6.10",
40
+ "@storybook/addon-interactions": "^7.6.10",
41
+ "@storybook/addon-links": "^7.6.10",
42
+ "@storybook/addon-onboarding": "^1.0.11",
43
+ "@storybook/blocks": "^7.6.10",
44
+ "@storybook/preset-create-react-app": "^7.6.10",
45
+ "@storybook/preview-api": "^7.6.10",
46
+ "@storybook/react": "^7.6.10",
47
+ "@storybook/react-webpack5": "^7.6.10",
48
+ "@storybook/testing-library": "^0.2.2",
49
+ "@testing-library/jest-dom": "^5.17.0",
50
+ "@testing-library/react": "^13.4.0",
51
+ "@testing-library/user-event": "^13.5.0",
52
+ "@types/jest": "^27.5.2",
53
+ "@types/node": "^16.18.64",
54
+ "@types/react": "^18.2.38",
55
+ "@types/react-dom": "^18.2.17",
56
+ "@types/react-transition-group": "^4.4.10",
57
+ "@types/styled-components": "^5.1.34",
58
+ "babel-plugin-named-exports-order": "^0.0.2",
59
+ "eslint-plugin-storybook": "^0.6.15",
60
+ "husky": "^8.0.3",
61
+ "postcss": "^8.4.33",
62
+ "prettier": "^3.1.0",
63
+ "prop-types": "^15.8.1",
64
+ "rollup": "^4.9.6",
65
+ "rollup-plugin-dts": "^6.1.0",
66
+ "rollup-plugin-peer-deps-external": "^2.2.4",
67
+ "rollup-plugin-postcss": "^4.0.2",
68
+ "storybook": "^7.6.10",
69
+ "webpack": "^5.89.0"
10
70
  },
11
71
  "scripts": {
12
- "storybook": "start-storybook -p 6006",
13
- "build-storybook": "build-storybook",
14
- "lint": "eslint src --fix",
15
- "start": "webpack-dev-server --config webpack.config.js",
16
- "build:dev": "webpack --config webpack.config.js",
17
- "build": "rollup -c rollup.config.ts",
18
- "test": "echo \"Error: no test specified\" && exit 1",
19
- "prepublishOnly": "yarn run build"
72
+ "start": "react-scripts start",
73
+ "build:react-app": "react-scripts build",
74
+ "build": "rollup -c",
75
+ "test": "react-scripts test",
76
+ "eject": "react-scripts eject",
77
+ "check": "prettier --check .",
78
+ "format": "prettier --write .",
79
+ "storybook": "storybook dev -p 6006",
80
+ "build-storybook": "storybook build",
81
+ "typescript": "tsc -p tsconfig.json",
82
+ "prepare": "husky install",
83
+ "prepublishOnly": "npm run build"
20
84
  },
21
85
  "repository": {
22
86
  "type": "git",
@@ -36,80 +100,23 @@
36
100
  "url": "https://github.com/freshdesk/freemium-ui/issues"
37
101
  },
38
102
  "homepage": "https://github.com/freshdesk/freemium-ui#readme",
39
- "dependencies": {
40
- "@blueprintjs/datetime": "^3.23.19",
41
- "@radix-ui/react-tooltip": "1.0.7",
42
- "@reach/dialog": "^0.10.4",
43
- "@reach/popover": "^0.16.2",
44
- "@rebass/grid": "6.1.0",
45
- "@styled-system/should-forward-prop": "5.1.5",
46
- "@types/react-dates": "^21.8.3",
47
- "@types/react-table": "^7.7.0",
48
- "deepmerge": "^4.2.2",
49
- "downshift": "^5.4.2",
50
- "match-sorter": "^4.1.0",
51
- "moment": "^2.27.0",
52
- "polished": "3.6.4",
53
- "react": ">=16.13.1",
54
- "react-dates": "^21.8.0",
55
- "react-dom": ">=16.13.1",
56
- "react-table": "^7.7.0",
57
- "react-tippy": "^1.4.0",
58
- "react-transition-group": "^4.4.1",
59
- "styled-components": ">=5.0.0",
60
- "styled-system": "5.1.5"
103
+ "eslintConfig": {
104
+ "extends": [
105
+ "react-app",
106
+ "react-app/jest",
107
+ "plugin:storybook/recommended"
108
+ ]
61
109
  },
62
- "devDependencies": {
63
- "@rollup/plugin-commonjs": "13.0.0",
64
- "@rollup/plugin-node-resolve": "8.1.0",
65
- "@storybook/addon-actions": "5.3.17",
66
- "@storybook/addon-docs": "5.3.17",
67
- "@storybook/addon-info": "5.3.19",
68
- "@storybook/addon-knobs": "5.3.17",
69
- "@storybook/addon-links": "5.3.17",
70
- "@storybook/addons": "5.3.17",
71
- "@storybook/react": "5.3.17",
72
- "@storybook/theming": "5.3.17",
73
- "@types/jest": "25.1.4",
74
- "@types/node": "13.9.0",
75
- "@types/react": "16.9.41",
76
- "@types/react-dom": "^16.9.8",
77
- "@types/react-transition-group": "^4.4.0",
78
- "@types/storybook__addon-knobs": "5.2.1",
79
- "@types/storybook__react": "5.2.1",
80
- "@types/styled-components": "^5.1.0",
81
- "@typescript-eslint/eslint-plugin": "^3.0.2",
82
- "@typescript-eslint/parser": "^3.0.2",
83
- "babel-loader": "8.1.0",
84
- "clean-webpack-plugin": "^3.0.0",
85
- "copy-webpack-plugin": "^6.0.1",
86
- "css-loader": "^3.5.3",
87
- "eslint": "^7.1.0",
88
- "eslint-config-prettier": "^6.11.0",
89
- "eslint-loader": "^4.0.2",
90
- "eslint-plugin-prettier": "^3.1.3",
91
- "eslint-plugin-react": "^7.20.0",
92
- "eslint-plugin-react-hooks": "^4.0.4",
93
- "file-loader": "^6.0.0",
94
- "fork-ts-checker-webpack-plugin": "4.1.1",
95
- "html-loader": "^1.1.0",
96
- "html-webpack-plugin": "^4.3.0",
97
- "jest": "25.2.0",
98
- "prettier": "^2.0.5",
99
- "react": "^16.13.1",
100
- "react-docgen-typescript-loader": "3.7.1",
101
- "react-dom": "^16.13.1",
102
- "rollup": "2.18.0",
103
- "rollup-plugin-postcss": "^4.0.2",
104
- "rollup-plugin-terser": "^7.0.2",
105
- "rollup-plugin-typescript2": "0.27.1",
106
- "style-loader": "^1.2.1",
107
- "styled-components": "^5.1.1",
108
- "ts-jest": "25.2.1",
109
- "ts-loader": "^7.0.5",
110
- "typescript": "^3.9.3",
111
- "webpack": "^4.43.0",
112
- "webpack-cli": "^3.3.11",
113
- "webpack-dev-server": "^3.11.0"
110
+ "browserslist": {
111
+ "production": [
112
+ ">0.2%",
113
+ "not dead",
114
+ "not op_mini all"
115
+ ],
116
+ "development": [
117
+ "last 1 chrome version",
118
+ "last 1 firefox version",
119
+ "last 1 safari version"
120
+ ]
114
121
  }
115
122
  }
@@ -0,0 +1,47 @@
1
+ import peerDepsExternal from 'rollup-plugin-peer-deps-external';
2
+ import resolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import typescript from '@rollup/plugin-typescript';
5
+ import postcss from 'rollup-plugin-postcss';
6
+ import dts from 'rollup-plugin-dts';
7
+ // import terser from '@rollup/plugin-terser';
8
+
9
+ // This is required to read package.json file when
10
+ // using Native ES modules in Node.js
11
+ // https://rollupjs.org/command-line-interface/#importing-package-json
12
+ import { createRequire } from 'node:module';
13
+ const requireFile = createRequire(import.meta.url);
14
+ const packageJson = requireFile('./package.json');
15
+
16
+ const config = [
17
+ {
18
+ input: 'src/index.ts',
19
+ output: [
20
+ {
21
+ file: packageJson.main,
22
+ format: 'cjs',
23
+ },
24
+ {
25
+ file: packageJson.module,
26
+ format: 'esm',
27
+ },
28
+ {
29
+ file: packageJson.types,
30
+ format: 'es',
31
+ sourcemap: false,
32
+ },
33
+ ],
34
+ plugins: [
35
+ peerDepsExternal(),
36
+ resolve(),
37
+ commonjs(),
38
+ typescript(),
39
+ postcss({
40
+ extensions: ['.css'],
41
+ }),
42
+ dts(),
43
+ ],
44
+ },
45
+ ];
46
+
47
+ export default config;
@@ -1,52 +0,0 @@
1
- # Remove any comment lines that are not necessary
2
-
3
- name: Wasp (Semgrep) - SAST Check
4
-
5
- on:
6
- pull_request_target:
7
- branches:
8
- - "master" # This will be the default branch of a repo
9
- schedule:
10
- - cron: '0 */24 * * *' # Run everyday at 12 AM UTC
11
- workflow_dispatch: # Run on demand
12
-
13
- jobs:
14
- wasp-scan:
15
- name: Wasp scan
16
- runs-on: ["self-hosted", "Linux", "fw-shared"]
17
- steps:
18
- - name: Repository checkout
19
- uses: actions/checkout@v3
20
-
21
- - name: Running Wasp scan
22
- uses: freshactions/wasp@latest
23
- env:
24
- # Remove any of the following environment variables if you don't want to use them.
25
- WASP_LOG_LEVEL: DEBUG
26
- WASP_SAVE_JSON: true
27
- WASP_SAVE_HTML: true
28
- WASP_SAVE_CSV: true
29
- WASP_FRESHRELEASE_PR_PROJECT_KEY: "FRM"
30
- # Dry run will not raise any tickets. Remove this if you don't want to run in dry run mode.
31
-
32
- WASP_DRY_RUN: ${{ vars.SECURITY_APPSEC_WASP_DRY_RUN }}
33
-
34
- WASP_FRESHRELEASE_URL: ${{ vars.SECURITY_APPSEC_FRESHRELEASE_URL }}
35
- WASP_FRESHRELEASE_PR_ISSUE_TYPE: ${{ vars.SECURITY_APPSEC_FRESHRELEASE_PR_ISSUE_TYPE }}
36
-
37
- WASP_PULSE_URL: ${{ secrets.WASP_PULSE_URL }}
38
- WASP_TOKEN: ${{ secrets.SECURITY_APPSEC_WASP_TOKEN }}
39
- WASP_FRESHRELEASE_TOKEN: ${{ secrets.SECURITY_APPSEC_FRESHRELEASE_TOKEN }}
40
- WASP_SLACK_TOKEN: ${{ secrets.SECURITY_APPSEC_SLACK_TOKEN }}
41
- GITHUB_TOKEN: ${{ secrets.SECURITY_APPSEC_GH_TOKEN }}
42
-
43
- # Use this step to upload the scan report as an artifact.
44
- - uses: actions/upload-artifact@v3
45
- if: always()
46
- with:
47
- name: Wasp scan report archive
48
- retention-days: 90
49
- path: |
50
- wasp-report.csv
51
- wasp-report.json
52
- wasp-report.html