Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cursor/skills/chi-tokens/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
| zindex-modal | `50` |
| zindex-popover | `60` |
| zindex-tooltip | `70` |
| zindex-portal-root | `9999` |
<!-- AUTO-GENERATED:END -->

## Token Descriptions (manual)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/chi-js/dropdown.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Dropdown', function () {

describe('Dropdown Positioning test', () => {
it('Dropdown Positioning should work in accordance', () => {
this.chidata.popperPositions.forEach((position) => {
this.chidata.floatingPositions.forEach((position) => {
const getValue = `[data-cy="test-more-${position}"]`;

cy.get(getValue)
Expand Down
11 changes: 9 additions & 2 deletions cypress/e2e/chi-js/popover.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ describe('Popover', function () {

describe('Popover Positioning and arrow should be matched ', () => {
it('Popover Positioning and arrow should work in accordance', () => {
this.chidata.popperPositions.forEach((position) => {
this.chidata.floatingPositions.forEach((position) => {
const getValue = `[data-cy="test-more-${position}"]`;

cy.get(getValue)
.find('button.chi-button')
.should('match', `[data-position="${position}"]`)
.click()
.find('+ .chi-popover')
.should('match', `[x-placement="${position}"]`);
.should('be.visible')
.should('have.class', '-active');

// Click the button again to dismiss the popover before next iteration
cy.get(getValue)
.find('button.chi-button')
.click();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/chidata.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"products-wifi"
],
"positions": ["top", "right", "bottom", "left"],
"popperPositions": [
"floatingPositions": [
"top",
"top-start",
"top-end",
Expand Down
42 changes: 29 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.27.2",
"@floating-ui/dom": "^1.7.5",
"@playwright/browser-chromium": "1.51.1",
"@playwright/test": "1.51.1",
"@types/node": "^24.0.4",
Expand All @@ -52,7 +53,6 @@
"express-rate-limit": "^7.5.1",
"normalize.css": "^8.0.1",
"ora": "^8.2.0",
"popper.js": "^1.16.1",
"postcss-svg": "^3.0.0",
"pug": "^3.0.3",
"rollup-plugin-terser": "^7.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/chi/_global-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ $zindex-fixed-with-backdrop: 40;
$zindex-modal: 50;
$zindex-popover: 60;
$zindex-tooltip: 70;
$zindex-portal-root: 9999;
8 changes: 4 additions & 4 deletions src/chi/components/date-picker/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,22 +204,22 @@ $monday-starting-week: (
&__input {
&.-no-arrow {
&.chi-popover--top,
&[x-placement^='top'] {
&[class*='chi-popover--top-'] {
margin-bottom: 1px;
}

&.chi-popover--right,
&[x-placement^='right'] {
&[class*='chi-popover--right-'] {
margin-left: 1px;
}

&.chi-popover--bottom,
&[x-placement^='bottom'] {
&[class*='chi-popover--bottom-'] {
margin-top: 1px;
}

&.chi-popover--left,
&[x-placement^='left'] {
&[class*='chi-popover--left-'] {
margin-right: 1px;
}
}
Expand Down
Loading