@idea-fragments/react-components-zendesk 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 IdeaFragments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # React Components - Zendesk
2
+
3
+ Warning - This library isn't the most organized and isn't really made for public use. Use at your own risk.
4
+
5
+ ---
6
+
7
+ Component library built on the V6 version of the Zendesk React components library.
8
+
9
+ This library's main purpose is to provide, for the IdeaFragments organization, components who's external interfaces will not change, regardless of which internal library is used to power the components. For ex, if the `Button` component is switched to use a different library other than the Zendesk library, the external props passed to the `Button` component will not change, even if the new library required different props.
10
+
11
+ There are plans to update the components to use the v8 version of the Zendesk Library. But currently library is provided as is.
12
+
13
+ ## Usage
14
+
15
+ ### As NPM package
16
+ ```shell
17
+ npm i @idea-fragments/react-components-zendesk
18
+ ```
19
+
20
+ ### As Submodule
21
+ Clone project into submodule for your main project
22
+
23
+ Add this to the `package.json` of the main project.
24
+
25
+ ```
26
+ "react-components-zendesk":"file:src/vendor/react_components_zendesk"
27
+ ```
28
+
29
+ Run `npm install` in main project.
30
+
31
+ If on Windows and using WSL to run your projects, use a node interpreter for windows when installing the packages. You may run into an issue when using WSL to install the package due to an issue with linux symlinks not being compatible with Windows.
32
+
33
+ _EDIT - This may not be an issue anymore_
34
+
35
+ Re-install library after any code change.
36
+
37
+ Ensure webpack for main project knows how to resolve imports located in library.
38
+ For example, if you're using `config-overrides.js` with the `customize-cra` npm package, do something like:
39
+ ```
40
+ addWebpackResolve({
41
+ modules: [
42
+ "node_modules",
43
+ // Sam, always add this so you can have cleaner imports
44
+ resolveApp("src"), // main app src
45
+ resolveApp("src/vendor/react_components_zendesk/src"), // lib src
46
+ ],
47
+ }),
48
+ ```
49
+
50
+ ## Links
51
+ [Zendesk Garden Component Library](https://github.com/zendeskgarden/react-components)
52
+
53
+ [V6 Docs for the Zendesk Garden Components Library](https://606f9e155f932060ab2899e8--zendeskgarden.netlify.app/)
package/dist/alert.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "components/Alert"
package/dist/forms.ts ADDED
@@ -0,0 +1,46 @@
1
+ /* =============================
2
+ * SELECTORS
3
+ * ============================= */
4
+
5
+ export * from "components/forms/selectors/BooleanSelector"
6
+ export * from "components/forms/selectors/DatePickerSelector"
7
+ export * from "components/forms/selectors/Dropdown"
8
+ export * from "components/forms/selectors/Selector"
9
+ export * from "components/forms/selectors/MultiSelector"
10
+ export * from "components/forms/selectors/SearchableSelector"
11
+ export * from "components/forms/selectors/MonthYearSelector"
12
+
13
+ /* =============================
14
+ * TEXT FIELDS
15
+ * ============================= */
16
+
17
+ // currency text field causes issues
18
+ // export * from "components/forms/textfields/CurrencyTextField"
19
+ export * from "components/forms/textfields/EmailTextField"
20
+ export * from "components/forms/textfields/NumberTextField"
21
+ export * from "components/forms/textfields/PasswordTextField"
22
+ export * from "components/forms/textfields/TextField"
23
+ export * from "components/forms/textfields/TextArea"
24
+ export * from "components/forms/textfields/TextFieldWrapper"
25
+
26
+ /* =============================
27
+ * BUTTONS
28
+ * ============================= */
29
+ export * from "components/forms/Button"
30
+ export * from "components/forms/CycleButton"
31
+ export * from "components/forms/IconButton"
32
+
33
+ export * from "components/forms/Checkbox"
34
+ export * from "components/forms/Form"
35
+ export * from "components/forms/validationStates"
36
+
37
+ /* =============================
38
+ * Toggles
39
+ * ============================= */
40
+ export * from "components/forms/Toggle"
41
+ export * from "components/forms/TaggedToggle"
42
+
43
+ export * from "components/forms/selectors/types"
44
+ export * from "components/forms/formField.types"
45
+ export * from "components/forms/ValidatedFormProps.type"
46
+ export * from "components/forms/Validation.type"
package/dist/hooks.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { useLoader } from "hooks/useLoader"
2
+ export { useLoaderV2 } from "hooks/useLoaderV2"
3
+ export { useTheme } from "styles/theme/useTheme"
package/dist/icon.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "components/Icon"
@@ -0,0 +1,15 @@
1
+ export * from "components/layout/AppBar"
2
+ export * from "components/layout/AppBarLayout"
3
+ export * from "components/layout/Container"
4
+ export * from "components/layout/Carousel"
5
+ export * from "components/Drawer"
6
+ export * from "components/layout/FlexBlock"
7
+ export * from "components/layout/FlexBox"
8
+ export * from "components/layout/Grid"
9
+ export * from "components/layout/Line"
10
+ export * from "components/layout/OpacityTransition"
11
+ export * from "components/layout/OverflowMenu"
12
+ export * from "components/layout/Section"
13
+ export * from "components/layout/Sidebar"
14
+ export * from "components/layout/SidebarLayout"
15
+ export * from "components/layout/Tabs"
@@ -0,0 +1,3 @@
1
+ export * from "components/loaders/AsyncLoadable"
2
+ export * from "components/loaders/Loadable"
3
+ export * from "components/loaders/Loader"
package/dist/mobx.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from "components/mobx/ErrorBoundary"
2
+ export * from "components/mobx/Modal"
3
+ export * from "components/mobx/Alert"
4
+ export { Drawer } from "components/mobx/Drawer"
5
+
6
+ export * from "stores/useStores"
package/dist/modal.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "components/Modal"
@@ -0,0 +1,3 @@
1
+ export * from "components/navigation/Breadcrumbs"
2
+ export * from "components/navigation/ButtonLink"
3
+ export * from "components/navigation/InlineButtonLink"
@@ -0,0 +1,2 @@
1
+ export * from "components/notification/InfoPanel"
2
+ export * from "components/notification/Notification"
package/dist/styles.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { dark } from "styles/theme/dark"
2
+ import { light } from "styles/theme/light"
3
+ import { light2 } from "styles/theme/light2"
4
+
5
+ export const THEMES = { light, light2, dark }
6
+
7
+ export * from "components/StyledProps.type"
8
+ export * from "styles/theme/Theme.type"
9
+ export * from "styles/colors"
10
+ export * from "styles/spacings"
11
+ export * from "styles/typography"
12
+ export * from "styles/types"
13
+ export * from "styles/mixins"
14
+ export * from "styles/mediaQueries"
15
+ export * from "styles/deviceSizes"
16
+ export * from "styles/DeviceSizeWatcher"
package/dist/tables.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from "components/tables/MobileTable"
2
+ export * from "components/tables/NiceTable"
3
+ export * from "components/tables/SimpleTable"
4
+ export * from "components/tables/Table"
package/dist/tags.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "components/tags/Chip"
2
+ export * from "components/tags/Tag"
package/dist/text.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from "components/text/Header"
2
+ export * from "components/text/Label"
3
+ export * from "components/text/Paragraph"
4
+ export * from "components/text/Text"
5
+ export * from "components/text/Hint"
6
+
7
+ export * from "components/text/types"
@@ -0,0 +1,2 @@
1
+ export * from "components/tooltips/Tooltip"
2
+ export * from "components/tooltips/IconTooltip"
package/dist/types.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from "components/Component.type"
2
+ export * from "components/StyledComponentProps.type"
3
+ export * from "components/StyledProps.type"
package/dist/utils.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { NavBarScrollWatcher } from "utils/NavBarScrollWatcher"
2
+ export { ScrollPassedNavBarListener } from "utils/NavBarScrollWatcher"
3
+ export { validateFields } from "utils/validateFields"
4
+ export { InvalidFields } from "utils/validateFields"
package/package.json ADDED
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "@idea-fragments/react-components-zendesk",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "main": "src/index.js",
6
+ "files": [
7
+ "dist/"
8
+ ],
9
+ "dependencies": {
10
+ "@mdi/js": "^5.8.55",
11
+ "@mdi/react": "^1.4.0",
12
+ "@zendeskgarden/react-avatars": "^6.4.4",
13
+ "@zendeskgarden/react-breadcrumbs": "^6.4.4",
14
+ "@zendeskgarden/react-buttons": "^6.4.4",
15
+ "@zendeskgarden/react-datepickers": "^6.4.4",
16
+ "@zendeskgarden/react-dropdowns": "^6.4.4",
17
+ "@zendeskgarden/react-forms": "^6.4.4",
18
+ "@zendeskgarden/react-grid": "^6.4.4",
19
+ "@zendeskgarden/react-loaders": "^6.2.0",
20
+ "@zendeskgarden/react-modals": "^6.4.4",
21
+ "@zendeskgarden/react-notifications": "^6.4.4",
22
+ "@zendeskgarden/react-pagination": "^6.4.4",
23
+ "@zendeskgarden/react-ranges": "^6.4.4",
24
+ "@zendeskgarden/react-selection": "^6.2.0",
25
+ "@zendeskgarden/react-tables": "^6.4.4",
26
+ "@zendeskgarden/react-tabs": "^6.4.4",
27
+ "@zendeskgarden/react-tags": "^6.4.4",
28
+ "@zendeskgarden/react-theming": "^6.2.0",
29
+ "@zendeskgarden/react-tooltips": "^6.4.4",
30
+ "@zendeskgarden/react-typography": "^6.3.0",
31
+ "@zendeskgarden/svg-icons": "^6.3.1",
32
+ "color": "^3.1.2",
33
+ "lodash": "^4.17.15",
34
+ "mobx": "^5.14.0",
35
+ "mobx-react": "^6.1.3",
36
+ "mobx-utils": "^5.5.2",
37
+ "moment": "^2.24.0",
38
+ "react": "^16.14.0",
39
+ "react-date-range": "^1.0.3",
40
+ "react-dom": "^16.14.0",
41
+ "react-number-format": "^4.4.1",
42
+ "react-scripts": "^4.0.3",
43
+ "styled-components": "^4.4.0"
44
+ },
45
+ "devDependencies": {
46
+ "@babel/plugin-proposal-decorators": "^7.6.0",
47
+ "@storybook/addon-actions": "^6.5.3",
48
+ "@storybook/addon-essentials": "^6.5.3",
49
+ "@storybook/addon-interactions": "^6.5.3",
50
+ "@storybook/addon-links": "^6.5.3",
51
+ "@storybook/builder-webpack4": "^6.5.3",
52
+ "@storybook/manager-webpack4": "^6.5.3",
53
+ "@storybook/node-logger": "^6.5.3",
54
+ "@storybook/preset-create-react-app": "^3.2.0",
55
+ "@storybook/react": "^6.5.3",
56
+ "@storybook/testing-library": "^0.0.11",
57
+ "@tsconfig/create-react-app": "^1.0.2",
58
+ "@types/color": "^3.0.3",
59
+ "@types/react-date-range": "^1.4.3",
60
+ "@types/styled-components": "^5.1.25",
61
+ "@typescript-eslint/eslint-plugin": "^4.22.0",
62
+ "@typescript-eslint/parser": "^4.22.0",
63
+ "babel-plugin-styled-components": "^1.10.6",
64
+ "babel-preset-env": "^1.7.0",
65
+ "flow-bin": "^0.165.1",
66
+ "typescript": "^4.5.2"
67
+ },
68
+ "scripts": {
69
+ "start": "react-scripts start",
70
+ "build": "react-scripts build",
71
+ "test": "react-scripts test",
72
+ "eject": "react-scripts eject",
73
+ "storybook": "start-storybook -p 6006",
74
+ "build-storybook": "build-storybook"
75
+ },
76
+ "eslintConfig": {
77
+ "extends": "react-app",
78
+ "overrides": [
79
+ {
80
+ "files": [
81
+ "**/*.stories.*"
82
+ ],
83
+ "rules": {
84
+ "import/no-anonymous-default-export": "off"
85
+ }
86
+ },
87
+ {
88
+ "files": [
89
+ "*.ts"
90
+ ],
91
+ "plugins": [
92
+ "@typescript-eslint"
93
+ ],
94
+ "parser": "@typescript-eslint/parser",
95
+ "parserOptions": {
96
+ "project": "./tsconfig.json"
97
+ }
98
+ },
99
+ {
100
+ "files": [
101
+ "**/*.stories.*"
102
+ ],
103
+ "rules": {
104
+ "import/no-anonymous-default-export": "off"
105
+ }
106
+ }
107
+ ]
108
+ },
109
+ "browserslist": {
110
+ "production": [
111
+ ">0.2%",
112
+ "not dead",
113
+ "not op_mini all"
114
+ ],
115
+ "development": [
116
+ "last 1 chrome version",
117
+ "last 1 firefox version",
118
+ "last 1 safari version"
119
+ ]
120
+ },
121
+ "description": "Component library built on the V6 version of the Zendesk React components library.",
122
+ "repository": {
123
+ "type": "git",
124
+ "url": "git+https://github.com/idea-fragments/react_components_zendesk.git"
125
+ },
126
+ "keywords": [
127
+ "react"
128
+ ],
129
+ "author": "IdeaFragments",
130
+ "license": "MIT",
131
+ "bugs": {
132
+ "url": "https://github.com/idea-fragments/react_components_zendesk/issues"
133
+ },
134
+ "homepage": "https://github.com/idea-fragments/react_components_zendesk#readme"
135
+ }
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // @flow
2
+
3
+ import "zendeskGardenCss"
4
+ import "index.css"