From b3f135f757b262a847541bf3a8ae8888caa1833e Mon Sep 17 00:00:00 2001 From: Adrian Petrov Date: Mon, 18 May 2026 15:37:53 +0300 Subject: [PATCH 1/2] feat(stepper): add new step height sample --- .../.devcontainer/devcontainer.json | 4 + .../layouts/stepper/step-height/.eslintrc.js | 75 ++++++++++++++++++ samples/layouts/stepper/step-height/README.md | 56 ++++++++++++++ .../layouts/stepper/step-height/index.html | 11 +++ .../layouts/stepper/step-height/package.json | 42 ++++++++++ .../stepper/step-height/sandbox.config.json | 5 ++ .../layouts/stepper/step-height/src/index.css | 76 +++++++++++++++++++ .../layouts/stepper/step-height/src/index.tsx | 76 +++++++++++++++++++ .../layouts/stepper/step-height/tsconfig.json | 44 +++++++++++ .../stepper/step-height/vite.config.js | 12 +++ 10 files changed, 401 insertions(+) create mode 100644 samples/layouts/stepper/step-height/.devcontainer/devcontainer.json create mode 100644 samples/layouts/stepper/step-height/.eslintrc.js create mode 100644 samples/layouts/stepper/step-height/README.md create mode 100644 samples/layouts/stepper/step-height/index.html create mode 100644 samples/layouts/stepper/step-height/package.json create mode 100644 samples/layouts/stepper/step-height/sandbox.config.json create mode 100644 samples/layouts/stepper/step-height/src/index.css create mode 100644 samples/layouts/stepper/step-height/src/index.tsx create mode 100644 samples/layouts/stepper/step-height/tsconfig.json create mode 100644 samples/layouts/stepper/step-height/vite.config.js diff --git a/samples/layouts/stepper/step-height/.devcontainer/devcontainer.json b/samples/layouts/stepper/step-height/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..e0b8e9c925 --- /dev/null +++ b/samples/layouts/stepper/step-height/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:22" +} \ No newline at end of file diff --git a/samples/layouts/stepper/step-height/.eslintrc.js b/samples/layouts/stepper/step-height/.eslintrc.js new file mode 100644 index 0000000000..b45160a9ee --- /dev/null +++ b/samples/layouts/stepper/step-height/.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/stepper/step-height/README.md b/samples/layouts/stepper/step-height/README.md new file mode 100644 index 0000000000..e802da8301 --- /dev/null +++ b/samples/layouts/stepper/step-height/README.md @@ -0,0 +1,56 @@ + + + +This folder contains implementation of React application with example of Step Height feature using [Stepper](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/stepper/step-height +``` + +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/stepper/step-height/index.html b/samples/layouts/stepper/step-height/index.html new file mode 100644 index 0000000000..a345b13df5 --- /dev/null +++ b/samples/layouts/stepper/step-height/index.html @@ -0,0 +1,11 @@ + + + + StepperStepHeight + + + +
+ + + \ No newline at end of file diff --git a/samples/layouts/stepper/step-height/package.json b/samples/layouts/stepper/step-height/package.json new file mode 100644 index 0000000000..cf9d8508ae --- /dev/null +++ b/samples/layouts/stepper/step-height/package.json @@ -0,0 +1,42 @@ +{ + "name": "react-step-height", + "description": "This project provides example of Dynamic Step Height feature using Infragistics React components", + "author": "Infragistics", + "homepage": ".", + "version": "1.4.0", + "private": true, + "scripts": { + "start": "vite --port 4200", + "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build", + "preview": "vite preview", + "test": "vitest" + }, + "dependencies": { + "igniteui-dockmanager": "^1.17.0", + "igniteui-react": "^19.6.2", + "igniteui-react-core": "19.3.2", + "igniteui-webcomponents": "^7.0.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "tslib": "^2.4.0" + }, + "devDependencies": { + "@types/jest": "^29.2.0", + "@types/node": "^24.7.1", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", + "@vitejs/plugin-react": "^5.0.4", + "@vitest/browser": "^3.2.4", + "typescript": "^4.8.4", + "vite": "^7.1.9", + "vitest": "^3.2.4", + "vitest-canvas-mock": "^0.3.3", + "worker-loader": "^3.0.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/samples/layouts/stepper/step-height/sandbox.config.json b/samples/layouts/stepper/step-height/sandbox.config.json new file mode 100644 index 0000000000..00acba0c10 --- /dev/null +++ b/samples/layouts/stepper/step-height/sandbox.config.json @@ -0,0 +1,5 @@ +{ + "infiniteLoopProtection": false, + "hardReloadOnChange": false, + "view": "browser" +} \ No newline at end of file diff --git a/samples/layouts/stepper/step-height/src/index.css b/samples/layouts/stepper/step-height/src/index.css new file mode 100644 index 0000000000..68999060d7 --- /dev/null +++ b/samples/layouts/stepper/step-height/src/index.css @@ -0,0 +1,76 @@ +/* shared styles are loaded from: */ +/* https://dl.infragistics.com/x/css/samples/shared.v8.css */ + +igc-switch { + margin-left: 0.5rem; +} + +igc-stepper { + background: var(--ig-gray-100); + padding: 16px; + border-radius: 8px; + border: 1px solid var(--ig-gray-400); + margin-block-start: 12px; +} + +.header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + + .switch-wrapper { + border: 1px solid var(--ig-gray-400); + border-radius: 6px; + background: var(--ig-gray-100); + padding: 8px; + font-size: 22px; + display: flex; + align-items: center; + flex-wrap: wrap; + max-width: 195px; + justify-content: center; + } + + igc-switch::part(label) { + font-size: 22px; + } +} + +igc-switch { + --border-radius-track: 0px; + --thumb-size: 1rem; + --border-radius-thumb: 2px; + --size: 2.5rem; + --thumb-off-color: var(--ig-primary-500); + --thumb-on-color: var(--ig-primary-500); + --track-on-color: white; + --track-on-hover-color: white; + --thumb-off-hover-color: var(--ig-primary-500); + --border-on-color: var(--ig-gray-400); + --border-on-hover-color: var(--ig-gray-500); + + &::part(control) { + height: 1.5rem; + border-radius: 4px; + } +} + +igc-step::part(content) { + @media (width < 756px) { + overflow: scroll; + } +} + +h5 { + margin-block: 5px; +} + +li { + font-size: 16px; + padding-block: 8px; +} + +.container { + padding: 1rem; +} \ No newline at end of file diff --git a/samples/layouts/stepper/step-height/src/index.tsx b/samples/layouts/stepper/step-height/src/index.tsx new file mode 100644 index 0000000000..a6e0b398a1 --- /dev/null +++ b/samples/layouts/stepper/step-height/src/index.tsx @@ -0,0 +1,76 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { IgrStepper, IgrStep, IgrSwitch } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; +import './index.css'; + +export default function StepHeight() { + const stepperRef = React.useRef(null); + const [rows, setRows] = React.useState('1fr'); + + const onSwitchChange = (e: any) => { + const newRows = e.detail.checked ? '0fr' : '1fr'; + stepperRef.current.style.setProperty('--body-grid-rows', newRows); + setRows(newRows); + }; + + return ( +
+
+
+
+ 1fr + + 0fr + +
+
+ --body-grid-rows: {rows} +
+
+
+ + + Personal Info +

Personal Info

+
    +
  • Please enter your personal information.
  • +
+
+ + Delivery address +

Delivery address

+
    +
  • Enter your shipping address for delivery.
  • +
  • + If you need to change your address, please contact our support + team. +
  • +
  • + If you won't be at the address during the delivery time, please + provide an alternative address. +
  • +
+
+ + Billing address +

Billing address

+
    +
  • Please enter your billing address.
  • +
+
+ + Confirmation +

Confirmation

+
    +
  • Please review your order details and confirm your purchase.
  • +
+
+
+
+ ); +} + +// rendering above class to the React DOM +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(); diff --git a/samples/layouts/stepper/step-height/tsconfig.json b/samples/layouts/stepper/step-height/tsconfig.json new file mode 100644 index 0000000000..e7db8a94f5 --- /dev/null +++ b/samples/layouts/stepper/step-height/tsconfig.json @@ -0,0 +1,44 @@ +{ + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "baseUrl": ".", + "outDir": "build/dist", + "module": "esnext", + "target": "es5", + "lib": [ + "es6", + "dom" + ], + "sourceMap": true, + "allowJs": true, + "jsx": "react", + "moduleResolution": "node", + "rootDir": "src", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": true, + "noUnusedLocals": false, + "importHelpers": 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/stepper/step-height/vite.config.js b/samples/layouts/stepper/step-height/vite.config.js new file mode 100644 index 0000000000..1744dbc719 --- /dev/null +++ b/samples/layouts/stepper/step-height/vite.config.js @@ -0,0 +1,12 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +export default defineConfig({ + plugins: [react()], + build: { + outDir: 'build' + }, + server: { + open: false + }, +}); \ No newline at end of file From 0747652e120aa6539c913985e8035862e7e71ea4 Mon Sep 17 00:00:00 2001 From: Adrian Petrov Date: Mon, 18 May 2026 15:48:49 +0300 Subject: [PATCH 2/2] chore(): small sample improvements --- .../layouts/stepper/step-height/package.json | 4 ++-- .../layouts/stepper/step-height/src/index.css | 22 +++++++++---------- .../layouts/stepper/step-height/src/index.tsx | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/layouts/stepper/step-height/package.json b/samples/layouts/stepper/step-height/package.json index cf9d8508ae..8a2144281d 100644 --- a/samples/layouts/stepper/step-height/package.json +++ b/samples/layouts/stepper/step-height/package.json @@ -14,8 +14,8 @@ "dependencies": { "igniteui-dockmanager": "^1.17.0", "igniteui-react": "^19.6.2", - "igniteui-react-core": "19.3.2", - "igniteui-webcomponents": "^7.0.0", + "igniteui-react-core": "19.6.0-beta.0", + "igniteui-webcomponents": "^7.1.3", "react": "^19.2.0", "react-dom": "^19.2.0", "tslib": "^2.4.0" diff --git a/samples/layouts/stepper/step-height/src/index.css b/samples/layouts/stepper/step-height/src/index.css index 68999060d7..d228c1b900 100644 --- a/samples/layouts/stepper/step-height/src/index.css +++ b/samples/layouts/stepper/step-height/src/index.css @@ -7,10 +7,10 @@ igc-switch { igc-stepper { background: var(--ig-gray-100); - padding: 16px; - border-radius: 8px; + padding: 1rem; + border-radius: 0.5rem; border: 1px solid var(--ig-gray-400); - margin-block-start: 12px; + margin-block-start: 0.75rem; } .header { @@ -21,10 +21,10 @@ igc-stepper { .switch-wrapper { border: 1px solid var(--ig-gray-400); - border-radius: 6px; + border-radius: 0.375rem; background: var(--ig-gray-100); - padding: 8px; - font-size: 22px; + padding: 0.5rem; + font-size: 1.375rem; display: flex; align-items: center; flex-wrap: wrap; @@ -33,7 +33,7 @@ igc-stepper { } igc-switch::part(label) { - font-size: 22px; + font-size: 1.375rem; } } @@ -52,7 +52,7 @@ igc-switch { &::part(control) { height: 1.5rem; - border-radius: 4px; + border-radius: 0.25rem; } } @@ -63,12 +63,12 @@ igc-step::part(content) { } h5 { - margin-block: 5px; + margin-block: 0.375rem; } li { - font-size: 16px; - padding-block: 8px; + font-size: 1rem; + padding-block: 0.5rem; } .container { diff --git a/samples/layouts/stepper/step-height/src/index.tsx b/samples/layouts/stepper/step-height/src/index.tsx index a6e0b398a1..ca8f35ba9e 100644 --- a/samples/layouts/stepper/step-height/src/index.tsx +++ b/samples/layouts/stepper/step-height/src/index.tsx @@ -47,7 +47,7 @@ export default function StepHeight() { team.
  • - If you won't be at the address during the delivery time, please + If you will not be at the address during the delivery time, please provide an alternative address.