From 85de1080ce55ae490dfd1edf8ecd6ef650aa4d82 Mon Sep 17 00:00:00 2001 From: Ivan Kitanov Date: Wed, 11 Sep 2024 11:36:53 +0300 Subject: [PATCH 1/4] Adding Divider Samples --- samples/layouts/divider/base/.eslintrc.js | 75 +++++++++++++++++++ samples/layouts/divider/base/README.md | 56 ++++++++++++++ samples/layouts/divider/base/package.json | 38 ++++++++++ .../layouts/divider/base/public/index.html | 10 +++ .../layouts/divider/base/sandbox.config.json | 5 ++ samples/layouts/divider/base/src/index.css | 0 samples/layouts/divider/base/src/index.tsx | 30 ++++++++ .../divider/base/src/react-app-env.d.ts | 1 + samples/layouts/divider/base/tsconfig.json | 45 +++++++++++ samples/layouts/divider/dashed/.eslintrc.js | 75 +++++++++++++++++++ samples/layouts/divider/dashed/README.md | 56 ++++++++++++++ samples/layouts/divider/dashed/package.json | 38 ++++++++++ .../layouts/divider/dashed/public/index.html | 10 +++ .../divider/dashed/sandbox.config.json | 5 ++ samples/layouts/divider/dashed/src/index.css | 0 samples/layouts/divider/dashed/src/index.tsx | 30 ++++++++ .../divider/dashed/src/react-app-env.d.ts | 1 + samples/layouts/divider/dashed/tsconfig.json | 45 +++++++++++ samples/layouts/divider/middle/.eslintrc.js | 75 +++++++++++++++++++ samples/layouts/divider/middle/README.md | 56 ++++++++++++++ samples/layouts/divider/middle/package.json | 38 ++++++++++ .../layouts/divider/middle/public/index.html | 10 +++ .../divider/middle/sandbox.config.json | 5 ++ samples/layouts/divider/middle/src/index.css | 28 +++++++ samples/layouts/divider/middle/src/index.tsx | 39 ++++++++++ .../divider/middle/src/react-app-env.d.ts | 1 + samples/layouts/divider/middle/tsconfig.json | 45 +++++++++++ samples/layouts/divider/select/.eslintrc.js | 75 +++++++++++++++++++ samples/layouts/divider/select/README.md | 56 ++++++++++++++ samples/layouts/divider/select/package.json | 38 ++++++++++ .../layouts/divider/select/public/index.html | 10 +++ .../divider/select/sandbox.config.json | 5 ++ samples/layouts/divider/select/src/index.css | 0 samples/layouts/divider/select/src/index.tsx | 40 ++++++++++ .../divider/select/src/react-app-env.d.ts | 1 + samples/layouts/divider/select/tsconfig.json | 45 +++++++++++ samples/layouts/divider/vertical/.eslintrc.js | 75 +++++++++++++++++++ samples/layouts/divider/vertical/README.md | 56 ++++++++++++++ samples/layouts/divider/vertical/package.json | 38 ++++++++++ .../divider/vertical/public/index.html | 10 +++ .../divider/vertical/sandbox.config.json | 5 ++ .../layouts/divider/vertical/src/index.css | 8 ++ .../layouts/divider/vertical/src/index.tsx | 46 ++++++++++++ .../divider/vertical/src/react-app-env.d.ts | 1 + .../layouts/divider/vertical/tsconfig.json | 45 +++++++++++ 45 files changed, 1371 insertions(+) create mode 100644 samples/layouts/divider/base/.eslintrc.js create mode 100644 samples/layouts/divider/base/README.md create mode 100644 samples/layouts/divider/base/package.json create mode 100644 samples/layouts/divider/base/public/index.html create mode 100644 samples/layouts/divider/base/sandbox.config.json create mode 100644 samples/layouts/divider/base/src/index.css create mode 100644 samples/layouts/divider/base/src/index.tsx create mode 100644 samples/layouts/divider/base/src/react-app-env.d.ts create mode 100644 samples/layouts/divider/base/tsconfig.json create mode 100644 samples/layouts/divider/dashed/.eslintrc.js create mode 100644 samples/layouts/divider/dashed/README.md create mode 100644 samples/layouts/divider/dashed/package.json create mode 100644 samples/layouts/divider/dashed/public/index.html create mode 100644 samples/layouts/divider/dashed/sandbox.config.json create mode 100644 samples/layouts/divider/dashed/src/index.css create mode 100644 samples/layouts/divider/dashed/src/index.tsx create mode 100644 samples/layouts/divider/dashed/src/react-app-env.d.ts create mode 100644 samples/layouts/divider/dashed/tsconfig.json create mode 100644 samples/layouts/divider/middle/.eslintrc.js create mode 100644 samples/layouts/divider/middle/README.md create mode 100644 samples/layouts/divider/middle/package.json create mode 100644 samples/layouts/divider/middle/public/index.html create mode 100644 samples/layouts/divider/middle/sandbox.config.json create mode 100644 samples/layouts/divider/middle/src/index.css create mode 100644 samples/layouts/divider/middle/src/index.tsx create mode 100644 samples/layouts/divider/middle/src/react-app-env.d.ts create mode 100644 samples/layouts/divider/middle/tsconfig.json create mode 100644 samples/layouts/divider/select/.eslintrc.js create mode 100644 samples/layouts/divider/select/README.md create mode 100644 samples/layouts/divider/select/package.json create mode 100644 samples/layouts/divider/select/public/index.html create mode 100644 samples/layouts/divider/select/sandbox.config.json create mode 100644 samples/layouts/divider/select/src/index.css create mode 100644 samples/layouts/divider/select/src/index.tsx create mode 100644 samples/layouts/divider/select/src/react-app-env.d.ts create mode 100644 samples/layouts/divider/select/tsconfig.json create mode 100644 samples/layouts/divider/vertical/.eslintrc.js create mode 100644 samples/layouts/divider/vertical/README.md create mode 100644 samples/layouts/divider/vertical/package.json create mode 100644 samples/layouts/divider/vertical/public/index.html create mode 100644 samples/layouts/divider/vertical/sandbox.config.json create mode 100644 samples/layouts/divider/vertical/src/index.css create mode 100644 samples/layouts/divider/vertical/src/index.tsx create mode 100644 samples/layouts/divider/vertical/src/react-app-env.d.ts create mode 100644 samples/layouts/divider/vertical/tsconfig.json diff --git a/samples/layouts/divider/base/.eslintrc.js b/samples/layouts/divider/base/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/divider/base/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/layouts/divider/base/README.md b/samples/layouts/divider/base/README.md new file mode 100644 index 0000000000..28318bb2fb --- /dev/null +++ b/samples/layouts/divider/base/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Icon feature using [Avatar](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/layouts/avatar/icon +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/layouts/divider/base/package.json b/samples/layouts/divider/base/package.json new file mode 100644 index 0000000000..d60f92cbc5 --- /dev/null +++ b/samples/layouts/divider/base/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-date-picker-overview", + "description": "This project provides example of Date Picker Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "1.14.3", + "igniteui-react": "18.7.0", + "igniteui-react-core": "18.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/divider/base/public/index.html b/samples/layouts/divider/base/public/index.html new file mode 100644 index 0000000000..785133f5e8 --- /dev/null +++ b/samples/layouts/divider/base/public/index.html @@ -0,0 +1,10 @@ + + + + DividerBase + + + +
+ + \ No newline at end of file diff --git a/samples/layouts/divider/base/sandbox.config.json b/samples/layouts/divider/base/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/divider/base/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/divider/base/src/index.css b/samples/layouts/divider/base/src/index.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/layouts/divider/base/src/index.tsx b/samples/layouts/divider/base/src/index.tsx new file mode 100644 index 0000000000..4e01b4eccf --- /dev/null +++ b/samples/layouts/divider/base/src/index.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { IgrDividerModule, IgrDivider } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrDividerModule.register(); + +export default class DividerBase extends React.Component { + + constructor(props: any) { + super(props); + } + + public render(): JSX.Element { + return ( +
+

First paragraph

+ +

Second paragraph

+
+ ); + } + + +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/divider/base/src/react-app-env.d.ts b/samples/layouts/divider/base/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/samples/layouts/divider/base/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/layouts/divider/base/tsconfig.json b/samples/layouts/divider/base/tsconfig.json new file mode 100644 index 0000000000..42c6ace1da --- /dev/null +++ b/samples/layouts/divider/base/tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "suppressImplicitAnyIndexErrors": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/layouts/divider/dashed/.eslintrc.js b/samples/layouts/divider/dashed/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/divider/dashed/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/layouts/divider/dashed/README.md b/samples/layouts/divider/dashed/README.md new file mode 100644 index 0000000000..28318bb2fb --- /dev/null +++ b/samples/layouts/divider/dashed/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Icon feature using [Avatar](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/layouts/avatar/icon +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/layouts/divider/dashed/package.json b/samples/layouts/divider/dashed/package.json new file mode 100644 index 0000000000..d60f92cbc5 --- /dev/null +++ b/samples/layouts/divider/dashed/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-date-picker-overview", + "description": "This project provides example of Date Picker Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "1.14.3", + "igniteui-react": "18.7.0", + "igniteui-react-core": "18.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/divider/dashed/public/index.html b/samples/layouts/divider/dashed/public/index.html new file mode 100644 index 0000000000..a85c64b1e6 --- /dev/null +++ b/samples/layouts/divider/dashed/public/index.html @@ -0,0 +1,10 @@ + + + + DividerDashed + + + +
+ + \ No newline at end of file diff --git a/samples/layouts/divider/dashed/sandbox.config.json b/samples/layouts/divider/dashed/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/divider/dashed/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/divider/dashed/src/index.css b/samples/layouts/divider/dashed/src/index.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/layouts/divider/dashed/src/index.tsx b/samples/layouts/divider/dashed/src/index.tsx new file mode 100644 index 0000000000..7270b8d321 --- /dev/null +++ b/samples/layouts/divider/dashed/src/index.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { IgrDividerModule, IgrDivider } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrDividerModule.register(); + +export default class DividerDashed extends React.Component { + + constructor(props: any) { + super(props); + } + + public render(): JSX.Element { + return ( +
+

First paragraph

+ +

Second paragraph

+
+ ); + } + + +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/divider/dashed/src/react-app-env.d.ts b/samples/layouts/divider/dashed/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/samples/layouts/divider/dashed/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/layouts/divider/dashed/tsconfig.json b/samples/layouts/divider/dashed/tsconfig.json new file mode 100644 index 0000000000..42c6ace1da --- /dev/null +++ b/samples/layouts/divider/dashed/tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "suppressImplicitAnyIndexErrors": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/layouts/divider/middle/.eslintrc.js b/samples/layouts/divider/middle/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/divider/middle/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/layouts/divider/middle/README.md b/samples/layouts/divider/middle/README.md new file mode 100644 index 0000000000..28318bb2fb --- /dev/null +++ b/samples/layouts/divider/middle/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Icon feature using [Avatar](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/layouts/avatar/icon +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/layouts/divider/middle/package.json b/samples/layouts/divider/middle/package.json new file mode 100644 index 0000000000..d60f92cbc5 --- /dev/null +++ b/samples/layouts/divider/middle/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-date-picker-overview", + "description": "This project provides example of Date Picker Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "1.14.3", + "igniteui-react": "18.7.0", + "igniteui-react-core": "18.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/divider/middle/public/index.html b/samples/layouts/divider/middle/public/index.html new file mode 100644 index 0000000000..cb083b9e75 --- /dev/null +++ b/samples/layouts/divider/middle/public/index.html @@ -0,0 +1,10 @@ + + + + DividerMiddle + + + +
+ + \ No newline at end of file diff --git a/samples/layouts/divider/middle/sandbox.config.json b/samples/layouts/divider/middle/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/divider/middle/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/divider/middle/src/index.css b/samples/layouts/divider/middle/src/index.css new file mode 100644 index 0000000000..9cdd80347d --- /dev/null +++ b/samples/layouts/divider/middle/src/index.css @@ -0,0 +1,28 @@ +.parent{ + display: flex; + justify-content: space-between; +} + +.content{ + width: 45%; + padding: 20px; +} + +.withInset{ + --inset: 100px; + --color:red; +} + +h4 { + margin-top: 0; +} +p { + margin-top: 0; +} +.mt { + margin-top: 16px; + margin-bottom: 0; +} +.mb { + margin-bottom: 16px; +} \ No newline at end of file diff --git a/samples/layouts/divider/middle/src/index.tsx b/samples/layouts/divider/middle/src/index.tsx new file mode 100644 index 0000000000..8be3d24799 --- /dev/null +++ b/samples/layouts/divider/middle/src/index.tsx @@ -0,0 +1,39 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { IgrDividerModule, IgrDivider } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrDividerModule.register(); + +export default class DividerMiddle extends React.Component { + + constructor(props: any) { + super(props); + } + + public render(): JSX.Element { + return ( +
+
+
+

Both sides inset.

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

+
+
+

Left side only(default).

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

+
+
+
+ ); + } + + +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/divider/middle/src/react-app-env.d.ts b/samples/layouts/divider/middle/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/samples/layouts/divider/middle/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/layouts/divider/middle/tsconfig.json b/samples/layouts/divider/middle/tsconfig.json new file mode 100644 index 0000000000..42c6ace1da --- /dev/null +++ b/samples/layouts/divider/middle/tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "suppressImplicitAnyIndexErrors": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/layouts/divider/select/.eslintrc.js b/samples/layouts/divider/select/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/divider/select/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/layouts/divider/select/README.md b/samples/layouts/divider/select/README.md new file mode 100644 index 0000000000..28318bb2fb --- /dev/null +++ b/samples/layouts/divider/select/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Icon feature using [Avatar](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/layouts/avatar/icon +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/layouts/divider/select/package.json b/samples/layouts/divider/select/package.json new file mode 100644 index 0000000000..d60f92cbc5 --- /dev/null +++ b/samples/layouts/divider/select/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-date-picker-overview", + "description": "This project provides example of Date Picker Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "1.14.3", + "igniteui-react": "18.7.0", + "igniteui-react-core": "18.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/divider/select/public/index.html b/samples/layouts/divider/select/public/index.html new file mode 100644 index 0000000000..5990f4d99a --- /dev/null +++ b/samples/layouts/divider/select/public/index.html @@ -0,0 +1,10 @@ + + + + DividerSelect + + + +
+ + \ No newline at end of file diff --git a/samples/layouts/divider/select/sandbox.config.json b/samples/layouts/divider/select/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/divider/select/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/divider/select/src/index.css b/samples/layouts/divider/select/src/index.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/layouts/divider/select/src/index.tsx b/samples/layouts/divider/select/src/index.tsx new file mode 100644 index 0000000000..29bb341a6e --- /dev/null +++ b/samples/layouts/divider/select/src/index.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { IgrDividerModule, + IgrDivider, + IgrSelectModule, + IgrSelectItemModule, + IgrSelect, + IgrSelectItem, } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrDividerModule.register(); +IgrSelectModule.register(); +IgrSelectItemModule.register(); + +export default class DividerSelect extends React.Component { + + constructor(props: any) { + super(props); + } + + public render(): JSX.Element { + return ( +
+ + Item 1 + Item 2 + + Item 3 + +
+ ); + } + + +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/divider/select/src/react-app-env.d.ts b/samples/layouts/divider/select/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/samples/layouts/divider/select/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/layouts/divider/select/tsconfig.json b/samples/layouts/divider/select/tsconfig.json new file mode 100644 index 0000000000..42c6ace1da --- /dev/null +++ b/samples/layouts/divider/select/tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "suppressImplicitAnyIndexErrors": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} diff --git a/samples/layouts/divider/vertical/.eslintrc.js b/samples/layouts/divider/vertical/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/divider/vertical/.eslintrc.js @@ -0,0 +1,75 @@ +// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: "module", // Allows for the use of imports + ecmaFeatures: { + jsx: true // Allows for the parsing of JSX + } + }, + settings: { + react: { + version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use + } + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react + "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin + ], + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "rules": { + "default-case": "off", + "no-undef": "off", + "no-unused-vars": "off", + "no-extend-native": "off", + "no-throw-literal": "off", + "no-useless-concat": "off", + "no-mixed-operators": "off", + "no-prototype-builtins": "off", + "prefer-const": "off", + "prefer-rest-params": "off", + "jsx-a11y/alt-text": "off", + "jsx-a11y/iframe-has-title": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-useless-constructor": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/prefer-namespace-keyword": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + } + ] + }; \ No newline at end of file diff --git a/samples/layouts/divider/vertical/README.md b/samples/layouts/divider/vertical/README.md new file mode 100644 index 0000000000..28318bb2fb --- /dev/null +++ b/samples/layouts/divider/vertical/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Icon feature using [Avatar](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. + + + + + + View Docs + + + View Code + + + Run Sample + + + Run Sample + + + + +## Branches + +> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository. + +## Instructions + +Follow these instructions to run this example: + + +``` +git clone https://github.com/IgniteUI/igniteui-react-examples.git +git checkout master +cd ./igniteui-react-examples +cd ./samples/layouts/avatar/icon +``` + +open above folder in VS Code or type: +``` +code . +``` + +In terminal window, run: +``` +npm install --legacy-peer-deps +npm run-script start +``` + +Then open http://localhost:4200/ in your browser + + +## Learn More + +To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html). diff --git a/samples/layouts/divider/vertical/package.json b/samples/layouts/divider/vertical/package.json new file mode 100644 index 0000000000..d60f92cbc5 --- /dev/null +++ b/samples/layouts/divider/vertical/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-date-picker-overview", + "description": "This project provides example of Date Picker Overview using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start", + "build": "react-scripts --max_old_space_size=10240 build ", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + }, + "dependencies": { + "igniteui-dockmanager": "1.14.3", + "igniteui-react": "18.7.0", + "igniteui-react-core": "18.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "^5.0.1", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^18.11.7", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "react-app-rewired": "^2.2.1", + "typescript": "^4.8.4", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/divider/vertical/public/index.html b/samples/layouts/divider/vertical/public/index.html new file mode 100644 index 0000000000..5efde1b032 --- /dev/null +++ b/samples/layouts/divider/vertical/public/index.html @@ -0,0 +1,10 @@ + + + + DividerVertical + + + +
+ + \ No newline at end of file diff --git a/samples/layouts/divider/vertical/sandbox.config.json b/samples/layouts/divider/vertical/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/divider/vertical/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/divider/vertical/src/index.css b/samples/layouts/divider/vertical/src/index.css new file mode 100644 index 0000000000..edb7c4c4cb --- /dev/null +++ b/samples/layouts/divider/vertical/src/index.css @@ -0,0 +1,8 @@ +p{ + text-align: justify; +} + +.content{ + display:flex; + gap: 16px; +} \ No newline at end of file diff --git a/samples/layouts/divider/vertical/src/index.tsx b/samples/layouts/divider/vertical/src/index.tsx new file mode 100644 index 0000000000..636043aa5b --- /dev/null +++ b/samples/layouts/divider/vertical/src/index.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { IgrDividerModule, IgrDivider } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrDividerModule.register(); + +export default class DividerVertical extends React.Component { + + constructor(props: any) { + super(props); + } + + public render(): JSX.Element { + return ( +
+
+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa officiis + suscipit veniam vitae. Ab ad, dolores iure nostrum quo ratione rerum + sapiente ullam. Adipisci alias architecto eligendi est, expedita, + explicabo fugiat iure laudantium minima molestiae molestias nam + obcaecati placeat provident, quam repellendus vitae! Cupiditate eveniet, + facere harum hic quisquam sed. +

+ +

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa officiis + suscipit veniam vitae. Ab ad, dolores iure nostrum quo ratione rerum + sapiente ullam. Adipisci alias architecto eligendi est, expedita, + explicabo fugiat iure laudantium minima molestiae molestias nam + obcaecati placeat provident, quam repellendus vitae! Cupiditate eveniet, + facere harum hic quisquam sed. +

+
+
+ ); + } + + +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/divider/vertical/src/react-app-env.d.ts b/samples/layouts/divider/vertical/src/react-app-env.d.ts new file mode 100644 index 0000000000..6431bc5fc6 --- /dev/null +++ b/samples/layouts/divider/vertical/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/samples/layouts/divider/vertical/tsconfig.json b/samples/layouts/divider/vertical/tsconfig.json new file mode 100644 index 0000000000..42c6ace1da --- /dev/null +++ b/samples/layouts/divider/vertical/tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react-jsx", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": true, + "suppressImplicitAnyIndexErrors": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "strict": false, + "isolatedModules": true, + "noEmit": true + }, + "exclude": [ + "node_modules", + "build", + "scripts", + "acceptance-tests", + "webpack", + "jest", + "src/setupTests.ts", + "**/odatajs-4.0.0.js", + "config-overrides.js" + ], + "include": [ + "src" + ] +} From 06ebce21ba7dda5156302a529ff90c5736e2a891 Mon Sep 17 00:00:00 2001 From: Ivan Kitanov Date: Thu, 12 Sep 2024 17:02:18 +0300 Subject: [PATCH 2/4] Resolving key errors in browser console --- samples/layouts/divider/base/src/index.tsx | 2 +- samples/layouts/divider/dashed/src/index.tsx | 2 +- samples/layouts/divider/middle/src/index.tsx | 4 ++-- samples/layouts/divider/select/src/index.tsx | 10 +++++----- samples/layouts/divider/vertical/src/index.tsx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/layouts/divider/base/src/index.tsx b/samples/layouts/divider/base/src/index.tsx index 4e01b4eccf..40c230ab63 100644 --- a/samples/layouts/divider/base/src/index.tsx +++ b/samples/layouts/divider/base/src/index.tsx @@ -16,7 +16,7 @@ export default class DividerBase extends React.Component { return (

First paragraph

- +

Second paragraph

); diff --git a/samples/layouts/divider/dashed/src/index.tsx b/samples/layouts/divider/dashed/src/index.tsx index 7270b8d321..f4b88f2bd4 100644 --- a/samples/layouts/divider/dashed/src/index.tsx +++ b/samples/layouts/divider/dashed/src/index.tsx @@ -16,7 +16,7 @@ export default class DividerDashed extends React.Component { return (

First paragraph

- +

Second paragraph

); diff --git a/samples/layouts/divider/middle/src/index.tsx b/samples/layouts/divider/middle/src/index.tsx index 8be3d24799..ebce94d75f 100644 --- a/samples/layouts/divider/middle/src/index.tsx +++ b/samples/layouts/divider/middle/src/index.tsx @@ -18,12 +18,12 @@ export default class DividerMiddle extends React.Component {

Both sides inset.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

Left side only(default).

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

diff --git a/samples/layouts/divider/select/src/index.tsx b/samples/layouts/divider/select/src/index.tsx index 29bb341a6e..23359193f2 100644 --- a/samples/layouts/divider/select/src/index.tsx +++ b/samples/layouts/divider/select/src/index.tsx @@ -22,11 +22,11 @@ export default class DividerSelect extends React.Component { public render(): JSX.Element { return (
- - Item 1 - Item 2 - - Item 3 + + Item 1 + Item 2 + + Item 3
); diff --git a/samples/layouts/divider/vertical/src/index.tsx b/samples/layouts/divider/vertical/src/index.tsx index 636043aa5b..90d0586616 100644 --- a/samples/layouts/divider/vertical/src/index.tsx +++ b/samples/layouts/divider/vertical/src/index.tsx @@ -24,7 +24,7 @@ export default class DividerVertical extends React.Component { obcaecati placeat provident, quam repellendus vitae! Cupiditate eveniet, facere harum hic quisquam sed.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa officiis suscipit veniam vitae. Ab ad, dolores iure nostrum quo ratione rerum From 4491c7c9cdd8b44e4e9b64bb51832bab514ff956 Mon Sep 17 00:00:00 2001 From: Ivan Kitanov Date: Thu, 12 Sep 2024 17:18:34 +0300 Subject: [PATCH 3/4] Correcting the duplicate key --- samples/layouts/divider/select/src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/layouts/divider/select/src/index.tsx b/samples/layouts/divider/select/src/index.tsx index 23359193f2..f61d6efb0c 100644 --- a/samples/layouts/divider/select/src/index.tsx +++ b/samples/layouts/divider/select/src/index.tsx @@ -26,7 +26,7 @@ export default class DividerSelect extends React.Component { Item 1 Item 2 - Item 3 + Item 3 ); From a5033af0d2d4422eb3458ce22cff6a0268a5308c Mon Sep 17 00:00:00 2001 From: ddaribo Date: Fri, 13 Sep 2024 09:57:41 +0300 Subject: [PATCH 4/4] chore(divider-samples): format tsx files --- samples/layouts/divider/base/src/index.tsx | 6 ++-- samples/layouts/divider/middle/src/index.tsx | 32 +++++++++---------- samples/layouts/divider/select/src/index.tsx | 20 ++++++------ .../layouts/divider/vertical/src/index.tsx | 8 ++--- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/samples/layouts/divider/base/src/index.tsx b/samples/layouts/divider/base/src/index.tsx index 40c230ab63..e992346590 100644 --- a/samples/layouts/divider/base/src/index.tsx +++ b/samples/layouts/divider/base/src/index.tsx @@ -9,7 +9,7 @@ IgrDividerModule.register(); export default class DividerBase extends React.Component { constructor(props: any) { - super(props); + super(props); } public render(): JSX.Element { @@ -21,10 +21,8 @@ export default class DividerBase extends React.Component { ); } - - } // rendering above class to the React DOM const root = ReactDOM.createRoot(document.getElementById('root')); -root.render(); +root.render(); diff --git a/samples/layouts/divider/middle/src/index.tsx b/samples/layouts/divider/middle/src/index.tsx index ebce94d75f..c499eb0293 100644 --- a/samples/layouts/divider/middle/src/index.tsx +++ b/samples/layouts/divider/middle/src/index.tsx @@ -9,31 +9,29 @@ IgrDividerModule.register(); export default class DividerMiddle extends React.Component { constructor(props: any) { - super(props); + super(props); } public render(): JSX.Element { return (

-
-
-

Both sides inset.

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

-
-
-

Left side only(default).

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

-
-
-
+
+
+

Both sides inset.

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

+
+
+

Left side only(default).

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad alias at consectetur dolor magnam maiores nihil quasi quod repudiandae similique. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda, culpa delectus eius fuga ipsa iste laborum nemo, numquam omnis perferendis soluta sunt. Animi asperiores aspernatur assumenda doloribus eligendi.

+
+
+ ); } - - } // rendering above class to the React DOM const root = ReactDOM.createRoot(document.getElementById('root')); -root.render(); +root.render(); diff --git a/samples/layouts/divider/select/src/index.tsx b/samples/layouts/divider/select/src/index.tsx index f61d6efb0c..bb1663cc3e 100644 --- a/samples/layouts/divider/select/src/index.tsx +++ b/samples/layouts/divider/select/src/index.tsx @@ -1,12 +1,14 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; -import { IgrDividerModule, - IgrDivider, - IgrSelectModule, - IgrSelectItemModule, - IgrSelect, - IgrSelectItem, } from 'igniteui-react'; +import { + IgrDividerModule, + IgrDivider, + IgrSelectModule, + IgrSelectItemModule, + IgrSelect, + IgrSelectItem, +} from 'igniteui-react'; import 'igniteui-webcomponents/themes/light/bootstrap.css'; IgrDividerModule.register(); @@ -16,7 +18,7 @@ IgrSelectItemModule.register(); export default class DividerSelect extends React.Component { constructor(props: any) { - super(props); + super(props); } public render(): JSX.Element { @@ -31,10 +33,8 @@ export default class DividerSelect extends React.Component { ); } - - } // rendering above class to the React DOM const root = ReactDOM.createRoot(document.getElementById('root')); -root.render(); +root.render(); diff --git a/samples/layouts/divider/vertical/src/index.tsx b/samples/layouts/divider/vertical/src/index.tsx index 90d0586616..fe0831a63f 100644 --- a/samples/layouts/divider/vertical/src/index.tsx +++ b/samples/layouts/divider/vertical/src/index.tsx @@ -9,13 +9,13 @@ IgrDividerModule.register(); export default class DividerVertical extends React.Component { constructor(props: any) { - super(props); + super(props); } public render(): JSX.Element { return (
-
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa officiis suscipit veniam vitae. Ab ad, dolores iure nostrum quo ratione rerum @@ -37,10 +37,8 @@ export default class DividerVertical extends React.Component {

); } - - } // rendering above class to the React DOM const root = ReactDOM.createRoot(document.getElementById('root')); -root.render(); +root.render();