Skip to content

Commit 3d9fb8b

Browse files
committed
Merge remote-tracking branch 'origin/main' into renovate/configure
* origin/main: (40 commits) fix(combobox): add space after grouped items (#7302) fix(tooltip): emits `close` and `beforeClose` events when container is set to `display:none` (#7258) chore: release next feat(block): improve block's content layout to allow scrolling (#7367) test(input, input-number): await on missed `page.waitForChanges` calls (#7429) chore: release next fix(color-picker): draw slider thumbs within bounds (#7398) chore: release next fix(slider): prevent excessive tick rendering (#7421) fix(tooltip): avoid extra before open/close event emitting (#7422) chore(storybook): hide warning and show TestOnly stories in local builds (#7424) chore: release next fix(panel): Remove double border styling when content isn't provided (#7368) feat(list): Add support for dragging items. (#7109) chore: release next fix(scrim): update loader scale on resize of component. (#7419) feat(text-area): provide additional context for AT users when character limit exceeds (#7412) chore: release next fix(chip): disconnect mutation observer when component is disconnected from the DOM (#7418) fix(switch): Fix for focus outline style in certain cases (#7414) ...
2 parents fcc6dfb + b1580c7 commit 3d9fb8b

File tree

23 files changed

+461
-211
lines changed

23 files changed

+461
-211
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/calcite-components-react/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.5.0-next.36](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
7+
8+
**Note:** Version bump only for package @esri/calcite-components-react
9+
10+
## [1.5.0-next.35](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
11+
12+
**Note:** Version bump only for package @esri/calcite-components-react
13+
614
## [1.5.0-next.34](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
715

816
**Note:** Version bump only for package @esri/calcite-components-react

packages/calcite-components-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@esri/calcite-components-react",
33
"sideEffects": false,
4-
"version": "1.5.0-next.34",
4+
"version": "1.5.0-next.36",
55
"description": "A set of React components that wrap calcite components",
66
"license": "SEE LICENSE.md",
77
"scripts": {
@@ -17,7 +17,7 @@
1717
"dist/"
1818
],
1919
"dependencies": {
20-
"@esri/calcite-components": "^1.5.0-next.34"
20+
"@esri/calcite-components": "^1.5.0-next.36"
2121
},
2222
"peerDependencies": {
2323
"react": ">=16.7",

packages/calcite-components/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.5.0-next.36](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
7+
8+
### Features
9+
10+
- **block:** improve block's content layout to allow scrolling ([#7367](https://github.com/Esri/calcite-design-system/issues/7367)) ([ecbf17b](https://github.com/Esri/calcite-design-system/commit/ecbf17b3dac6cd79d21f44811d0b5e8f52ab7237)), closes [#5686](https://github.com/Esri/calcite-design-system/issues/5686) [/github.com/Esri/calcite-design-system/issues/5686#issuecomment-1310423881](https://github.com/Esri//github.com/Esri/calcite-design-system/issues/5686/issues/issuecomment-1310423881)
11+
12+
## [1.5.0-next.35](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
13+
14+
### Bug Fixes
15+
16+
- **color-picker:** draw slider thumbs within bounds ([#7398](https://github.com/Esri/calcite-design-system/issues/7398)) ([2f37854](https://github.com/Esri/calcite-design-system/commit/2f378548dda9e91719b726a77ab6893e562a20ce)), closes [#7005](https://github.com/Esri/calcite-design-system/issues/7005)
17+
618
## [1.5.0-next.34](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-03)
719

820
### Bug Fixes

packages/calcite-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@esri/calcite-components",
3-
"version": "1.5.0-next.34",
3+
"version": "1.5.0-next.36",
44
"description": "Web Components for Esri's Calcite Design System.",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.js",

packages/calcite-components/src/components/block/block.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ calcite-handle {
139139
}
140140

141141
.content {
142-
@apply animate-in flex-1 relative;
142+
@apply animate-in flex-1 relative min-h-0;
143143
padding-block: var(--calcite-block-padding, theme("spacing.2"));
144144
padding-inline: var(--calcite-block-padding, theme("spacing[2.5]"));
145145
}

packages/calcite-components/src/components/block/block.stories.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,38 @@ export const loadingWithStatusIcon_TestOnly = (): string =>
243243
244244
<calcite-block heading="Invalid status" description="summary" status="invalid"> </calcite-block>
245245
`;
246+
247+
export const scrollingContainerSetup_TestOnly = (): string => html`<style>
248+
calcite-block {
249+
height: 250px;
250+
overflow: hidden;
251+
}
252+
253+
.scroll-container {
254+
height: 100%;
255+
overflow-y: scroll;
256+
}
257+
258+
p {
259+
background: linear-gradient(to bottom, red, transparent);
260+
height: 500px;
261+
margin: 0;
262+
}
263+
</style>
264+
<calcite-block heading="Should scroll to the gradient at the bottom" open>
265+
<div class="scroll-container">
266+
<p></p>
267+
</div>
268+
</calcite-block>
269+
<script>
270+
(async () => {
271+
const block = document.querySelector("calcite-block");
272+
await customElements.whenDefined("calcite-block");
273+
await block.componentOnReady();
274+
275+
const scrollContainer = document.querySelector(".scroll-container");
276+
scrollContainer.scrollTo(0, 500);
277+
})();
278+
</script>`;
279+
280+
scrollingContainerSetup_TestOnly.parameters = { chromatic: { delay: 500 } };

packages/calcite-components/src/components/color-picker/color-picker.e2e.ts

Lines changed: 81 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,12 @@ describe("calcite-color-picker", () => {
519519
const expectedColorSamples = [
520520
"#ff0000",
521521
"#ffd900",
522-
"#48ff00",
523-
"#00ff91",
522+
"#4cff00",
523+
"#00ff8c",
524524
"#0095ff",
525-
"#4800ff",
526-
"#ff00dd",
527-
"#ff0004",
525+
"#4400ff",
526+
"#ff00e1",
527+
"#ff0008",
528528
];
529529

530530
for (let i = 0; i < expectedColorSamples.length; i++) {
@@ -678,7 +678,7 @@ describe("calcite-color-picker", () => {
678678
[hueScopeX, hueScopeY] = await getElementXY(page, "calcite-color-picker", `.${CSS.hueScope}`);
679679
[hueScopeCenterX, hueScopeCenterY] = getScopeCenter(hueScopeX, hueScopeY);
680680

681-
expect(hueScopeCenterX).toBe(hueSliderX);
681+
expect(hueScopeCenterX).toBe(hueSliderX + DIMENSIONS.m.thumb.radius);
682682

683683
await page.mouse.move(hueScopeCenterX, hueScopeCenterY);
684684
await page.mouse.down();
@@ -689,7 +689,7 @@ describe("calcite-color-picker", () => {
689689
[hueScopeX] = await getElementXY(page, "calcite-color-picker", `.${CSS.hueScope}`);
690690
[hueScopeCenterX] = getScopeCenter(hueScopeX, hueScopeY);
691691

692-
expect(hueScopeCenterX).toBe(hueSliderX + DIMENSIONS.m.slider.width - 1);
692+
expect(hueScopeCenterX).toBe(hueSliderX + DIMENSIONS.m.slider.width - DIMENSIONS.m.thumb.radius);
693693
});
694694

695695
describe("unsupported value handling", () => {
@@ -2197,23 +2197,23 @@ describe("calcite-color-picker", () => {
21972197

21982198
const getScopeLeftOffset = async () => parseFloat((await scope.getComputedStyle()).left);
21992199

2200-
expect(await getScopeLeftOffset()).toBe(-0.5);
2200+
expect(await getScopeLeftOffset()).toBeCloseTo(DIMENSIONS.m.thumb.radius - 0.5, 0);
22012201

22022202
await nudgeAQuarterOfSlider();
2203-
expect(await getScopeLeftOffset()).toBe(67.5);
2203+
expect(await getScopeLeftOffset()).toBeCloseTo(67.5, 0);
22042204

22052205
await nudgeAQuarterOfSlider();
2206-
expect(await getScopeLeftOffset()).toBe(135.5);
2206+
expect(await getScopeLeftOffset()).toBeCloseTo(135.5, 0);
22072207

22082208
await nudgeAQuarterOfSlider();
22092209
// hue wraps around, so we nudge it back to assert position at the edge
22102210
await scope.press("ArrowLeft");
2211-
expect(await getScopeLeftOffset()).toBeLessThanOrEqual(203.5);
2212-
expect(await getScopeLeftOffset()).toBeGreaterThan(202.5);
2211+
expect(await getScopeLeftOffset()).toBeLessThanOrEqual(193.5);
2212+
expect(await getScopeLeftOffset()).toBeGreaterThan(189.5);
22132213

22142214
// nudge it to wrap around
22152215
await scope.press("ArrowRight");
2216-
expect(await getScopeLeftOffset()).toBe(-0.5);
2216+
expect(await getScopeLeftOffset()).toBeCloseTo(DIMENSIONS.m.thumb.radius - 0.5, 0);
22172217
});
22182218

22192219
it("allows editing hue slider via keyboard", async () => {
@@ -2245,84 +2245,89 @@ describe("calcite-color-picker", () => {
22452245

22462246
expect(await hueSliderScope.getComputedStyle()).toMatchObject({
22472247
top: "9.5px",
2248-
left: "-0.5px",
2248+
left: `${DIMENSIONS.m.thumb.radius - 0.5}px`,
22492249
});
22502250
});
2251-
});
2252-
describe("mouse", () => {
2253-
const scopeSizeOffset = 0.8;
2254-
it("should update value when color field scope is moved", async () => {
2255-
const page = await newE2EPage();
2256-
await page.setContent(`<calcite-color-picker ></calcite-color-picker>`);
2257-
const colorPicker = await page.find("calcite-color-picker");
22582251

2259-
const [colorFieldScopeX, colorFieldScopeY] = await getElementXY(
2260-
page,
2261-
"calcite-color-picker",
2262-
`.${CSS.colorFieldScope}`
2263-
);
2264-
const value = await colorPicker.getProperty("value");
2252+
describe("mouse", () => {
2253+
const scopeSizeOffset = 0.8;
2254+
it("should update value when color field scope is moved", async () => {
2255+
const page = await newE2EPage();
2256+
await page.setContent(`<calcite-color-picker ></calcite-color-picker>`);
2257+
const colorPicker = await page.find("calcite-color-picker");
2258+
2259+
const [colorFieldScopeX, colorFieldScopeY] = await getElementXY(
2260+
page,
2261+
"calcite-color-picker",
2262+
`.${CSS.colorFieldScope}`
2263+
);
2264+
const value = await colorPicker.getProperty("value");
22652265

2266-
await page.mouse.move(colorFieldScopeX, colorFieldScopeY + scopeSizeOffset);
2267-
await page.mouse.down();
2268-
await page.mouse.up();
2269-
await page.waitForChanges();
2270-
expect(await colorPicker.getProperty("value")).not.toBe(value);
2271-
});
2266+
await page.mouse.move(colorFieldScopeX, colorFieldScopeY + scopeSizeOffset);
2267+
await page.mouse.down();
2268+
await page.mouse.up();
2269+
await page.waitForChanges();
2270+
expect(await colorPicker.getProperty("value")).not.toBe(value);
2271+
});
22722272

2273-
it("should update value when hue scope is moved", async () => {
2274-
const page = await newE2EPage();
2275-
await page.setContent(`<calcite-color-picker ></calcite-color-picker>`);
2276-
const colorPicker = await page.find("calcite-color-picker");
2273+
it("should update value when hue scope is moved", async () => {
2274+
const page = await newE2EPage();
2275+
await page.setContent(`<calcite-color-picker></calcite-color-picker>`);
2276+
const colorPicker = await page.find("calcite-color-picker");
22772277

2278-
const [hueScopeX, hueScopeY] = await getElementXY(page, "calcite-color-picker", `.${CSS.hueScope}`);
2279-
const value = await colorPicker.getProperty("value");
2278+
const [hueScopeX, hueScopeY] = await getElementXY(page, "calcite-color-picker", `.${CSS.hueScope}`);
2279+
const value = await colorPicker.getProperty("value");
22802280

2281-
await page.mouse.move(hueScopeX + scopeSizeOffset, hueScopeY);
2282-
await page.mouse.down();
2283-
await page.mouse.up();
2284-
await page.waitForChanges();
2285-
expect(await colorPicker.getProperty("value")).not.toBe(value);
2286-
});
2281+
await page.mouse.move(hueScopeX + scopeSizeOffset, hueScopeY);
2282+
await page.mouse.down();
2283+
await page.mouse.up();
2284+
await page.waitForChanges();
2285+
expect(await colorPicker.getProperty("value")).not.toBe(value);
2286+
});
22872287

2288-
it("should update value when opacity scope is moved", async () => {
2289-
const page = await newE2EPage();
2290-
await page.setContent(`<calcite-color-picker alpha-channel></calcite-color-picker>`);
2291-
const [opacityScopeX, opacityScopeY] = await getElementXY(page, "calcite-color-picker", `.${CSS.opacityScope}`);
2292-
const colorPicker = await page.find("calcite-color-picker");
2293-
const value = await colorPicker.getProperty("value");
2294-
2295-
await page.mouse.move(opacityScopeX - 2, opacityScopeY);
2296-
await page.mouse.down();
2297-
await page.mouse.up();
2298-
await page.waitForChanges();
2299-
expect(await colorPicker.getProperty("value")).not.toBe(value);
2288+
it("should update value when opacity scope is moved", async () => {
2289+
const page = await newE2EPage();
2290+
await page.setContent(`<calcite-color-picker alpha-channel></calcite-color-picker>`);
2291+
const [opacityScopeX, opacityScopeY] = await getElementXY(
2292+
page,
2293+
"calcite-color-picker",
2294+
`.${CSS.opacityScope}`
2295+
);
2296+
const colorPicker = await page.find("calcite-color-picker");
2297+
const value = await colorPicker.getProperty("value");
2298+
2299+
await page.mouse.move(opacityScopeX - 2, opacityScopeY);
2300+
await page.mouse.down();
2301+
await page.mouse.up();
2302+
await page.waitForChanges();
2303+
expect(await colorPicker.getProperty("value")).not.toBe(value);
2304+
});
23002305
});
2301-
});
23022306

2303-
describe("alpha channel", () => {
2304-
it("allows editing alpha value via keyboard", async () => {
2305-
const page = await newE2EPage();
2306-
await page.setContent(`<calcite-color-picker alpha-channel value="#ffffffff"></calcite-color-picker>`);
2307+
describe("alpha channel", () => {
2308+
it("allows editing alpha value via keyboard", async () => {
2309+
const page = await newE2EPage();
2310+
await page.setContent(`<calcite-color-picker alpha-channel value="#ffffffff"></calcite-color-picker>`);
23072311

2308-
const picker = await page.find("calcite-color-picker");
2309-
const scope = await page.find(`calcite-color-picker >>> .${CSS.opacityScope}`);
2312+
const picker = await page.find("calcite-color-picker");
2313+
const scope = await page.find(`calcite-color-picker >>> .${CSS.opacityScope}`);
23102314

2311-
await scope.press("ArrowDown");
2312-
expect(await picker.getProperty("value")).toBe("#fffffffc");
2313-
await scope.press("ArrowDown");
2314-
expect(await picker.getProperty("value")).toBe("#fffffffa");
2315-
await scope.press("ArrowDown");
2316-
expect(await picker.getProperty("value")).toBe("#fffffff7");
2315+
await scope.press("ArrowDown");
2316+
expect(await picker.getProperty("value")).toBe("#fffffffc");
2317+
await scope.press("ArrowDown");
2318+
expect(await picker.getProperty("value")).toBe("#fffffffa");
2319+
await scope.press("ArrowDown");
2320+
expect(await picker.getProperty("value")).toBe("#fffffff7");
23172321

2318-
await scope.press("ArrowUp");
2319-
expect(await picker.getProperty("value")).toBe("#fffffffa");
2322+
await scope.press("ArrowUp");
2323+
expect(await picker.getProperty("value")).toBe("#fffffffa");
23202324

2321-
await scope.press("ArrowRight");
2322-
expect(await picker.getProperty("value")).toBe("#fffffffc");
2325+
await scope.press("ArrowRight");
2326+
expect(await picker.getProperty("value")).toBe("#fffffffc");
23232327

2324-
await scope.press("ArrowLeft");
2325-
expect(await picker.getProperty("value")).toBe("#fffffffa");
2328+
await scope.press("ArrowLeft");
2329+
expect(await picker.getProperty("value")).toBe("#fffffffa");
2330+
});
23262331
});
23272332
});
23282333
});

0 commit comments

Comments
 (0)