dynamic-mui 1.1.5 → 2.0.1

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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -22
  3. package/dist/components/DynamicComponent.d.ts +12 -0
  4. package/dist/components/FormGenerator.d.ts +37 -0
  5. package/dist/components/charts/Bar/bar.d.ts +2 -0
  6. package/dist/components/charts/Line/line.d.ts +2 -0
  7. package/dist/components/charts/Mixchart/mixChart.d.ts +2 -0
  8. package/dist/components/charts/Pie/pie.d.ts +2 -0
  9. package/dist/components/controls/Accordion/accordion.d.ts +2 -0
  10. package/dist/components/controls/Autocomplete/autocomplete.d.ts +2 -0
  11. package/dist/components/controls/CheckBox/checkbox.d.ts +3 -0
  12. package/dist/components/controls/Chip/chip.d.ts +2 -0
  13. package/dist/components/controls/DataTable/datatable.d.ts +2 -0
  14. package/dist/components/controls/DateTime/datetime.d.ts +2 -0
  15. package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +2 -0
  16. package/dist/components/controls/Divider/divider.d.ts +2 -0
  17. package/dist/components/controls/Group/group.d.ts +2 -0
  18. package/dist/components/controls/Hyperlink/hyperlink.d.ts +2 -0
  19. package/dist/components/controls/ImageList/imagelist.d.ts +2 -0
  20. package/dist/components/controls/List/list.d.ts +2 -0
  21. package/dist/components/controls/MultiTextbox/multitextbox.d.ts +2 -0
  22. package/dist/components/controls/NumberField/numberfield.d.ts +2 -0
  23. package/dist/components/controls/Radio/radio.d.ts +3 -0
  24. package/dist/components/controls/Select/select.d.ts +2 -0
  25. package/dist/components/controls/Signature/signature.d.ts +2 -0
  26. package/dist/components/controls/Stepper/stepper.d.ts +8 -0
  27. package/dist/components/controls/Switch/switch.d.ts +3 -0
  28. package/dist/components/controls/Tabs/tabs.d.ts +2 -0
  29. package/dist/components/controls/TextField/textfield.d.ts +2 -0
  30. package/dist/components/controls/TimePicker/timepicker.d.ts +2 -0
  31. package/dist/components/controls/Typography/typography.d.ts +3 -0
  32. package/dist/components/controls/index.d.ts +57 -0
  33. package/dist/config/mui.d.ts +8 -0
  34. package/dist/dynamic-mui.cjs.js +1 -0
  35. package/dist/dynamic-mui.es.js +9 -0
  36. package/dist/index-BFycuK80.js +465 -0
  37. package/dist/index-CJMUh0I6.js +1 -0
  38. package/dist/index-DvtivzW0.mjs +101901 -0
  39. package/dist/index-ipsOTYQY.mjs +153 -0
  40. package/dist/index.d.ts +5 -0
  41. package/dist/loadCognitoIdentity-BwoR11En.js +1 -0
  42. package/dist/loadCognitoIdentity-Cqci1Eff.mjs +935 -0
  43. package/dist/main.d.ts +1 -0
  44. package/dist/playground/Builder.d.ts +1 -0
  45. package/dist/playground/Canvas.d.ts +9 -0
  46. package/dist/playground/PropertiesEditor.d.ts +10 -0
  47. package/dist/playground/Sidebar.d.ts +1 -0
  48. package/dist/playground/documentation.d.ts +6 -0
  49. package/dist/playground/templates.d.ts +7 -0
  50. package/dist/playground/testData.d.ts +2 -0
  51. package/dist/test/setup.d.ts +0 -0
  52. package/dist/theme/theme.d.ts +1 -0
  53. package/dist/types.d.ts +19 -0
  54. package/dist/util/helper.d.ts +64 -0
  55. package/dist/util/s3Upload.d.ts +13 -0
  56. package/dist/util/stepperComponents.d.ts +6 -0
  57. package/dist/util/useIsFirstRender.d.ts +1 -0
  58. package/dist/util/useUpdateEffect.d.ts +2 -0
  59. package/dist/util/validation.d.ts +6 -0
  60. package/package.json +65 -54
  61. package/build/asset-manifest.json +0 -10
  62. package/build/favicon.ico +0 -0
  63. package/build/index.html +0 -1
  64. package/build/logo192.png +0 -0
  65. package/build/logo512.png +0 -0
  66. package/build/manifest.json +0 -25
  67. package/build/robots.txt +0 -3
  68. package/build/static/js/main.11a67c51.js +0 -3
  69. package/build/static/js/main.11a67c51.js.LICENSE.txt +0 -85
  70. package/build/static/js/main.11a67c51.js.map +0 -1
  71. package/craco.config.js +0 -34
  72. package/dist-modules/components/DynamicComponent.js +0 -22
  73. package/dist-modules/components/FormGenerator.js +0 -200
  74. package/dist-modules/components/charts/Bar/bar.js +0 -31
  75. package/dist-modules/components/charts/Line/line.js +0 -31
  76. package/dist-modules/components/charts/Mixchart/mixChart.js +0 -59
  77. package/dist-modules/components/charts/Pie/pie.js +0 -31
  78. package/dist-modules/components/controls/CheckBox/checkbox.js +0 -56
  79. package/dist-modules/components/controls/DataTable/datatable.js +0 -28
  80. package/dist-modules/components/controls/DateTime/datetime.js +0 -53
  81. package/dist-modules/components/controls/DateTimePicker/datetimepicker.js +0 -53
  82. package/dist-modules/components/controls/Radio/radio.js +0 -88
  83. package/dist-modules/components/controls/Select/select.js +0 -173
  84. package/dist-modules/components/controls/Stepper/stepper.js +0 -192
  85. package/dist-modules/components/controls/Switch/switch.js +0 -85
  86. package/dist-modules/components/controls/TextField/textfield.js +0 -148
  87. package/dist-modules/components/controls/TimePicker/timepicker.js +0 -53
  88. package/dist-modules/components/controls/Typography/typography.js +0 -43
  89. package/dist-modules/components/controls/index.js +0 -42
  90. package/dist-modules/config/mui.js +0 -73
  91. package/dist-modules/data/checkbox.js +0 -143
  92. package/dist-modules/data/dataTable.js +0 -90
  93. package/dist-modules/data/dateTime.js +0 -136
  94. package/dist-modules/data/radio.js +0 -36
  95. package/dist-modules/data/select.js +0 -126
  96. package/dist-modules/data/stepper.js +0 -237
  97. package/dist-modules/data/switch.js +0 -123
  98. package/dist-modules/data/textfield.js +0 -240
  99. package/dist-modules/index.js +0 -16
  100. package/dist-modules/util/helper.js +0 -226
  101. package/dist-modules/util/stepperComponents.js +0 -40
  102. package/dist-modules/util/useIsFirstRender.js +0 -15
  103. package/dist-modules/util/useUpdateEffect.js +0 -19
  104. package/dist-modules/util/validation.js +0 -102
  105. package/docs/asset-manifest.json +0 -9
  106. package/docs/build/bundle.1eab2706.js +0 -2
  107. package/docs/build/bundle.1eab2706.js.LICENSE.txt +0 -153
  108. package/docs/index.html +0 -16
  109. package/public/favicon.ico +0 -0
  110. package/public/index.html +0 -43
  111. package/public/logo192.png +0 -0
  112. package/public/logo512.png +0 -0
  113. package/public/manifest.json +0 -25
  114. package/public/robots.txt +0 -3
  115. package/styleguide.config.js +0 -108
  116. package/themes/default.js +0 -114
  117. package/themes/index.js +0 -29
@@ -1,153 +0,0 @@
1
- /*
2
- object-assign
3
- (c) Sindre Sorhus
4
- @license MIT
5
- */
6
-
7
- /*!
8
- * @overview es6-promise - a tiny implementation of Promises/A+.
9
- * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
10
- * @license Licensed under MIT license
11
- * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
12
- * @version v4.2.8+1e68dce6
13
- */
14
-
15
- /*!
16
- * The buffer module from node.js, for the browser.
17
- *
18
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
19
- * @license MIT
20
- */
21
-
22
- /*!
23
- * regjsgen 0.5.2
24
- * Copyright 2014-2020 Benjamin Tan <https://ofcr.se/>
25
- * Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/master/LICENSE-MIT.txt>
26
- */
27
-
28
- /*! @preserve
29
- * numeral.js
30
- * version : 2.0.6
31
- * author : Adam Draper
32
- * license : MIT
33
- * http://adamwdraper.github.com/Numeral-js/
34
- */
35
-
36
- /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
37
-
38
- /*! https://mths.be/regenerate v1.4.2 by @mathias | MIT license */
39
-
40
- /**
41
- * @license
42
- * Lodash <https://lodash.com/>
43
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
44
- * Released under MIT license <https://lodash.com/license>
45
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
46
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
47
- */
48
-
49
- /**
50
- * @license React
51
- * react-dom-client.production.js
52
- *
53
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */
58
-
59
- /**
60
- * @license React
61
- * react-dom.production.js
62
- *
63
- * Copyright (c) Meta Platforms, Inc. and affiliates.
64
- *
65
- * This source code is licensed under the MIT license found in the
66
- * LICENSE file in the root directory of this source tree.
67
- */
68
-
69
- /**
70
- * @license React
71
- * react-is.production.js
72
- *
73
- * Copyright (c) Meta Platforms, Inc. and affiliates.
74
- *
75
- * This source code is licensed under the MIT license found in the
76
- * LICENSE file in the root directory of this source tree.
77
- */
78
-
79
- /**
80
- * @license React
81
- * react-jsx-runtime.production.js
82
- *
83
- * Copyright (c) Meta Platforms, Inc. and affiliates.
84
- *
85
- * This source code is licensed under the MIT license found in the
86
- * LICENSE file in the root directory of this source tree.
87
- */
88
-
89
- /**
90
- * @license React
91
- * react.production.js
92
- *
93
- * Copyright (c) Meta Platforms, Inc. and affiliates.
94
- *
95
- * This source code is licensed under the MIT license found in the
96
- * LICENSE file in the root directory of this source tree.
97
- */
98
-
99
- /**
100
- * @license React
101
- * scheduler.production.js
102
- *
103
- * Copyright (c) Meta Platforms, Inc. and affiliates.
104
- *
105
- * This source code is licensed under the MIT license found in the
106
- * LICENSE file in the root directory of this source tree.
107
- */
108
-
109
- /**
110
- * @license React
111
- * use-sync-external-store-shim.production.js
112
- *
113
- * Copyright (c) Meta Platforms, Inc. and affiliates.
114
- *
115
- * This source code is licensed under the MIT license found in the
116
- * LICENSE file in the root directory of this source tree.
117
- */
118
-
119
- /**
120
- * @license React
121
- * use-sync-external-store-shim/with-selector.production.js
122
- *
123
- * Copyright (c) Meta Platforms, Inc. and affiliates.
124
- *
125
- * This source code is licensed under the MIT license found in the
126
- * LICENSE file in the root directory of this source tree.
127
- */
128
-
129
- /**
130
- * A better abstraction over CSS.
131
- *
132
- * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
133
- * @website https://github.com/cssinjs/jss
134
- * @license MIT
135
- */
136
-
137
- /**
138
- * Prism: Lightweight, robust, elegant syntax highlighting
139
- *
140
- * @license MIT <https://opensource.org/licenses/MIT>
141
- * @author Lea Verou <https://lea.verou.me>
142
- * @namespace
143
- * @public
144
- */
145
-
146
- /** @license React v16.13.1
147
- * react-is.production.min.js
148
- *
149
- * Copyright (c) Facebook, Inc. and its affiliates.
150
- *
151
- * This source code is licensed under the MIT license found in the
152
- * LICENSE file in the root directory of this source tree.
153
- */
package/docs/index.html DELETED
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
- <title>Dynamic MUI</title>
8
- <link rel="icon" type="image/x-icon" href="https://geoviewer.io/img/favicon.ico">
9
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
10
- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
11
- </head>
12
- <body>
13
- <div id="rsg-root"></div>
14
- <script src="build/bundle.1eab2706.js"></script>
15
- </body>
16
- </html>
Binary file
package/public/index.html DELETED
@@ -1,43 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta name="theme-color" content="#000000" />
8
- <meta
9
- name="description"
10
- content="Web site created using create-react-app"
11
- />
12
- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
- <!--
14
- manifest.json provides metadata used when your web app is installed on a
15
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
- -->
17
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
- <!--
19
- Notice the use of %PUBLIC_URL% in the tags above.
20
- It will be replaced with the URL of the `public` folder during the build.
21
- Only files inside the `public` folder can be referenced from the HTML.
22
-
23
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
- work correctly both with client-side routing and a non-root public URL.
25
- Learn how to configure a non-root public URL by running `npm run build`.
26
- -->
27
- <title>React App</title>
28
- </head>
29
- <body>
30
- <noscript>You need to enable JavaScript to run this app.</noscript>
31
- <div id="root"></div>
32
- <!--
33
- This HTML file is a template.
34
- If you open it directly in the browser, you will see an empty page.
35
-
36
- You can add webfonts, meta tags, or analytics to this file.
37
- The build step will place the bundled scripts into the <body> tag.
38
-
39
- To begin the development, run `npm start` or `yarn start`.
40
- To create a production bundle, use `npm run build` or `yarn build`.
41
- -->
42
- </body>
43
- </html>
Binary file
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/public/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
@@ -1,108 +0,0 @@
1
- // eslint-disable-next-line import/no-extraneous-dependencies
2
- const webpack = require('webpack');
3
- const { version } = require('./package.json');
4
-
5
- module.exports = {
6
- version,
7
- title: 'Dynamic MUI',
8
- dangerouslyUpdateWebpackConfig(config) {
9
- config.module.rules.push({
10
- test: /.\.md$/,
11
- type: 'javascript/auto',
12
- });
13
- config.plugins.push(
14
- new webpack.NormalModuleReplacementPlugin(
15
- /react-styleguidist\/lib\/loaders\/utils\/client\/requireInRuntime$/,
16
- 'react-styleguidist/lib/loaders/utils/client/requireInRuntime',
17
- ),
18
- );
19
- config.plugins.push(
20
- new webpack.NormalModuleReplacementPlugin(
21
- /react-styleguidist\/lib\/loaders\/utils\/client\/evalInContext$/,
22
- 'react-styleguidist/lib/loaders/utils/client/evalInContext',
23
- ),
24
- );
25
- return config;
26
- },
27
- template: {
28
- favicon: 'https://geoviewer.io/img/favicon.ico',
29
- head: {
30
- links: [
31
- {
32
- rel: 'stylesheet',
33
- href: 'https://fonts.googleapis.com/css?family=Roboto',
34
- },
35
- {
36
- rel: 'stylesheet',
37
- href: 'https://fonts.googleapis.com/icon?family=Material+Icons',
38
- },
39
- ],
40
- },
41
- },
42
- theme: {
43
- color: {
44
- codeBackground: '#272C34',
45
- codeString: '#a6e22e',
46
- codeKeyword: '#66d9ef',
47
- codeOperator: '#f8f8f2',
48
- codePunctuation: '#f8f8f2',
49
- codeBase: '#f8f8f2',
50
- codeFunction: '#e6db74',
51
- codeProperty: '',
52
- // base: '#51B64B',
53
- link: '#FFF',
54
- linkHover: '#DDD',
55
- sidebarBackground: 'rgb(46, 70, 175)',
56
- },
57
- fontFamily: {
58
- base: '"Open Sans", Roboto, Helvetica, Arial, sans-serif',
59
- monospace: 'Monaco, Menlo, Courier, monospace',
60
- },
61
- fontSize: {
62
- base: 14,
63
- text: 16,
64
- small: 13,
65
- h1: 48,
66
- h2: 32,
67
- h3: 24,
68
- h4: 18,
69
- h5: 16,
70
- h6: 16,
71
- },
72
- },
73
- styles: {
74
- Logo: {
75
- logo: {
76
- color: 'white',
77
- },
78
- '@keyframes blink': {
79
- to: { opacity: 0 },
80
- },
81
- },
82
- },
83
- pagePerSection: true,
84
- components: 'src/components/controls/**/*.js',
85
- sections: [
86
- {
87
- name: 'Introduction',
88
- content: 'README.md',
89
- exampleMode: 'hide',
90
- usageMode: 'expand',
91
- },
92
- {
93
- name: 'Components',
94
- components: 'src/components/controls/**/*.js',
95
- exampleMode: 'expand',
96
- usageMode: 'expand',
97
- sectionDepth: 2,
98
- },
99
- {
100
- name: 'Charts',
101
- components: 'src/components/charts/**/*.js',
102
- exampleMode: 'expand',
103
- usageMode: 'expand',
104
- sectionDepth: 2,
105
- },
106
- ],
107
- styleguideComponents: {},
108
- };
package/themes/default.js DELETED
@@ -1,114 +0,0 @@
1
- import tinycolor from 'tinycolor2';
2
-
3
- const primary = '#1976d2';
4
- const secondary = '#FF5C93';
5
- const warning = '#FFC260';
6
- const success = '#3CD4A0';
7
- const info = '#9013FE';
8
-
9
- const lightenRate = 7.5;
10
- const darkenRate = 15;
11
-
12
- export default {
13
- palette: {
14
- primary: {
15
- main: primary,
16
- light: tinycolor(primary).lighten(lightenRate).toHexString(),
17
- dark: tinycolor(primary).darken(darkenRate).toHexString(),
18
- },
19
- secondary: {
20
- main: secondary,
21
- light: tinycolor(secondary).lighten(lightenRate).toHexString(),
22
- dark: tinycolor(secondary).darken(darkenRate).toHexString(),
23
- contrastText: '#FFFFFF',
24
- },
25
- warning: {
26
- main: warning,
27
- light: tinycolor(warning).lighten(lightenRate).toHexString(),
28
- dark: tinycolor(warning).darken(darkenRate).toHexString(),
29
- },
30
- success: {
31
- main: success,
32
- light: tinycolor(success).lighten(lightenRate).toHexString(),
33
- dark: tinycolor(success).darken(darkenRate).toHexString(),
34
- },
35
- info: {
36
- main: info,
37
- light: tinycolor(info).lighten(lightenRate).toHexString(),
38
- dark: tinycolor(info).darken(darkenRate).toHexString(),
39
- },
40
- text: {
41
- primary: '#4A4A4A',
42
- secondary: '#6E6E6E',
43
- hint: '#B9B9B9',
44
- },
45
- background: {
46
- default: '#F6F7FF',
47
- light: '#F3F5FF',
48
- },
49
- },
50
- customShadows: {
51
- widget: '0px 3px 11px 0px #E8EAFC, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9A1A',
52
- widgetDark: '0px 3px 18px 0px #4558A3B3, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9A1A',
53
- widgetWide: '0px 12px 33px 0px #E8EAFC, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9A1A',
54
- },
55
- overrides: {
56
- MuiBackdrop: {
57
- root: {
58
- backgroundColor: '#4A4A4A1A',
59
- },
60
- },
61
- MuiMenu: {
62
- paper: {
63
- boxShadow: '0px 3px 11px 0px #E8EAFC, 0 3px 3px -2px #B2B2B21A, 0 1px 8px 0 #9A9A9A1A',
64
- },
65
- },
66
- MuiSelect: {
67
- icon: {
68
- color: '#B9B9B9',
69
- },
70
- },
71
- MuiListItem: {
72
- root: {
73
- '&$selected': {
74
- backgroundColor: '#F3F5FF !important',
75
- '&:focus': {
76
- backgroundColor: '#F3F5FF',
77
- },
78
- },
79
- },
80
- button: {
81
- '&:hover, &:focus': {
82
- backgroundColor: '#F3F5FF',
83
- },
84
- },
85
- },
86
- MuiTouchRipple: {
87
- child: {
88
- backgroundColor: 'white',
89
- },
90
- },
91
- MuiTableRow: {
92
- root: {
93
- height: 56,
94
- },
95
- },
96
- MuiTableCell: {
97
- root: {
98
- borderBottom: '1px solid rgba(224, 224, 224, .5)',
99
- paddingLeft: 24,
100
- },
101
- head: {
102
- fontSize: '0.95rem',
103
- },
104
- body: {
105
- fontSize: '0.95rem',
106
- },
107
- },
108
- PrivateSwitchBase: {
109
- root: {
110
- marginLeft: 10,
111
- },
112
- },
113
- },
114
- };
package/themes/index.js DELETED
@@ -1,29 +0,0 @@
1
- import { createMuiTheme } from '@mui/material';
2
- import defaultTheme from './default';
3
-
4
- const overrides = {
5
- typography: {
6
- h1: {
7
- fontSize: '3rem',
8
- },
9
- h2: {
10
- fontSize: '2rem',
11
- },
12
- h3: {
13
- fontSize: '1.64rem',
14
- },
15
- h4: {
16
- fontSize: '1.5rem',
17
- },
18
- h5: {
19
- fontSize: '1.285rem',
20
- },
21
- h6: {
22
- fontSize: '1.142rem',
23
- },
24
- },
25
- };
26
-
27
- export default {
28
- default: createMuiTheme({ ...defaultTheme, ...overrides }),
29
- };