Skip to content

Commit 437ec4d

Browse files
committed
chore: sync with main
* origin/main: (30 commits) test: add token snapshot tests (#8050) chore: release next fix(color-picker, popover, shell-panel, slider, tooltip): Register events on the window instead of the document (#8247) fix(list-item): Reserve space for empty open lists. (#8239) fix: dragging floating ui components (#8230) fix(list-item): an item with an empty slotted list should be openable. (#8240) fix(input): prevents mutating value on `blur` when `type="number"` (#8245) chore: release main (#8092) chore: downgrade eslint plugin after reverting breaking change (#8238) refactor(combobox): fix linting errors (#8235) chore: downgrade packages after reverting 2.0.0-next.0 change (#8237) chore: release next revert: feat(stepper-item)!: remove support for previousStep and nextStep in messages (#8222) (#8232) feat(stepper): enable responsive layout (#7744) feat(combobox): limit display of selected items with new selection-display prop (#7912) chore: release next build: update browserslist db (#8218) fix(list-item): fix rendering of open icon. (#8207) revert: feat(alert): make component responsive (#8195) fix(input-number): prevents mutating value on blur (#8226) ...
2 parents 897a777 + a7aeb37 commit 437ec4d

File tree

114 files changed

+90399
-9346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+90399
-9346
lines changed

.github/ISSUE_TEMPLATE/accessibility.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ body:
103103
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
104104
options:
105105
- label: "@esri/calcite-components"
106+
- label: "@esri/calcite-components-angular"
106107
- label: "@esri/calcite-components-react"
107108
- label: "@esri/calcite-design-tokens"
108109
- label: "@esri/eslint-plugin-calcite-components"

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ body:
9797
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
9898
options:
9999
- label: "@esri/calcite-components"
100+
- label: "@esri/calcite-components-angular"
100101
- label: "@esri/calcite-components-react"
101102
- label: "@esri/calcite-design-tokens"
102103
- label: "@esri/eslint-plugin-calcite-components"

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ body:
6565
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
6666
options:
6767
- label: "@esri/calcite-components"
68+
- label: "@esri/calcite-components-angular"
6869
- label: "@esri/calcite-components-react"
6970
- label: "@esri/calcite-design-tokens"
7071
- label: "@esri/eslint-plugin-calcite-components"

.github/ISSUE_TEMPLATE/refactor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ body:
4141
description: Select the relevant [package(s)](https://github.com/Esri/calcite-design-system/tree/main/packages) related to the request.
4242
options:
4343
- label: "@esri/calcite-components"
44+
- label: "@esri/calcite-components-angular"
4445
- label: "@esri/calcite-components-react"
4546
- label: "@esri/calcite-design-tokens"
4647
- label: "@esri/eslint-plugin-calcite-components"

.release-please-manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"packages/calcite-components": "1.10.0",
3-
"packages/calcite-components-angular": "1.10.0",
4-
"packages/calcite-components-react": "1.10.0",
2+
"packages/calcite-components": "1.11.0",
3+
"packages/calcite-components-react": "1.11.0",
54
"packages/calcite-design-tokens": "1.1.0",
6-
"packages/eslint-plugin-calcite-components": "0.2.2"
5+
"packages/eslint-plugin-calcite-components": "0.2.3",
6+
"packages/calcite-components-angular/projects/component-library": "1.11.0"
77
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@
6666
"skipFiles": ["<node_internals>/**"],
6767
"internalConsoleOptions": "neverOpen",
6868
"console": "integratedTerminal"
69+
},
70+
{
71+
"type": "node",
72+
"request": "launch",
73+
"name": "Debug Tokens --spec {currentFile}",
74+
"cwd": "${workspaceFolder}/packages/calcite-design-tokens",
75+
"sourceMaps": true,
76+
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/jest/bin/jest.js", "--runInBand", "${file}"],
77+
"skipFiles": ["<node_internals>/**"],
78+
"internalConsoleOptions": "neverOpen",
79+
"console": "integratedTerminal"
6980
}
7081
]
7182
}

packages/calcite-components/calcite-preset.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export default {
165165
"2-lg": "var(--calcite-box-shadow-md)",
166166
"2-sm": "0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16)",
167167
"border-bottom": "0 1px 0 var(--calcite-color-border-3)",
168+
"border-top": "0 -1px 0 var(--calcite-color-border-3)",
168169
"outline-active": "0 0 0 1px var(--calcite-color-brand)",
169170
none: "none",
170171
xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
@@ -220,6 +221,7 @@ export default {
220221
4.5: "1.125rem",
221222
9: "2.25rem",
222223
11: "2.75rem",
224+
13: "3.25rem",
223225
},
224226
transitionProperty: {
225227
margin: "margin",

packages/calcite-components/conventions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a living document defining our best practices and reasoning for authorin
77
Generally adhere to and follow these best practices for authoring components.
88

99
- [Google Web Component Best Practices](https://developers.google.com/web/fundamentals/web-components/best-practices)
10-
- [Custom Element Conformance - W3C Editor's Draft](https://w3c.github.io/webcomponents/spec/custom/#custom-element-conformance)
10+
- [Custom Element Conformance - W3C Editor's Draft](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance)
1111

1212
## Structure
1313

packages/calcite-components/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ The most common approach for loading Calcite Components is to use the version ho
1717
```html
1818
<script
1919
type="module"
20-
src="https://cdn.jsdelivr.net/npm/@esri/calcite-components@1.10.0/dist/calcite/calcite.esm.js"
20+
src="https://cdn.jsdelivr.net/npm/@esri/calcite-components@1.11.0/dist/calcite/calcite.esm.js"
2121
></script>
2222
<link
2323
rel="stylesheet"
2424
type="text/css"
25-
href="https://cdn.jsdelivr.net/npm/@esri/calcite-components@1.10.0/dist/calcite/calcite.css"
25+
href="https://cdn.jsdelivr.net/npm/@esri/calcite-components@1.11.0/dist/calcite/calcite.css"
2626
/>
2727
```
2828

packages/calcite-components/src/assets/styles/_sortable.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
@mixin sortable-helper-classes() {
2+
.calcite-sortable--ghost,
3+
.calcite-sortable--drag {
4+
overflow: hidden;
5+
}
6+
27
.calcite-sortable--ghost::before {
38
content: "";
49
@apply box-border

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,32 +160,26 @@
160160
}
161161

162162
:host([appearance="transparent"]) .button {
163-
@apply bg-transparent
164-
transition-shadow
165-
duration-150
166-
ease-in-out;
163+
@apply bg-transparent;
167164
}
168165

166+
:host([appearance="transparent"][active]) .button,
169167
:host([appearance="transparent"]) .button:hover,
170168
:host([appearance="transparent"]) .button:focus {
171-
@apply bg-transparent;
172-
box-shadow: 0 0 0 2px theme("borderColor.color.1") inset;
169+
background-color: var(--calcite-button-transparent-hover);
173170
}
174171

175-
:host([active][appearance="transparent"]) .button,
176-
:host([active][appearance="transparent"]) .button:hover,
177-
:host([active][appearance="transparent"]) .button:focus {
178-
@apply text-color-1 fill-color-1 bg-foreground-3;
172+
:host([appearance="transparent"]) .button:active {
173+
background-color: var(--calcite-button-transparent-press);
179174
}
180175

181-
:host([appearance="transparent"][loading]) .button,
182176
:host([appearance="transparent"][disabled]) .button {
183177
@apply bg-transparent;
184178
}
185179

186-
:host([loading]) .button,
187-
:host([loading]) .button:hover,
188-
:host([loading]) .button:focus {
180+
:host([loading][appearance="solid"]) .button,
181+
:host([loading][appearance="solid"]) .button:hover,
182+
:host([loading][appearance="solid"]) .button:focus {
189183
@apply bg-foreground-1;
190184
.text-container {
191185
@apply opacity-disabled;

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

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ $border-style: 1px solid var(--calcite-color-border-3);
1818
box-border
1919
fixed
2020
flex
21-
flex-wrap
2221
items-center
2322
justify-center
23+
min-w-min
2424
mx-auto
2525
my-0
2626
opacity-0
@@ -64,20 +64,15 @@ $border-style: 1px solid var(--calcite-color-border-3);
6464
}
6565
}
6666

67-
.content {
68-
@apply box-border flex flex-auto flex-col transition-default;
69-
padding-block: var(--calcite-alert-spacing-token-small);
70-
padding-inline: var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small);
71-
}
72-
7367
.icon {
74-
@apply flex flex-col items-center justify-start p-0;
75-
margin-block-end: var(--calcite-alert-spacing-token-large);
68+
@apply flex flex-col items-center justify-center p-0;
69+
margin-block: auto;
7670
margin-inline-end: auto;
71+
padding-inline-start: var(--calcite-alert-spacing-token-large);
7772
}
7873

7974
.close {
80-
@apply bg-transparent border-none cursor-pointer flex items-start justify-end outline-none self-start text-color-3;
75+
@apply bg-transparent border-none cursor-pointer flex items-center justify-end outline-none self-stretch text-color-3;
8176
-webkit-appearance: none;
8277
padding: var(--calcite-alert-spacing-token-large);
8378

@@ -97,19 +92,20 @@ $border-style: 1px solid var(--calcite-color-border-3);
9792
}
9893

9994
.queue-count {
100-
@apply text-color-2
101-
bg-foreground-1
102-
transition-default
103-
invisible
104-
flex
95+
@apply bg-foreground-1
10596
cursor-default
97+
flex
98+
font-medium
99+
invisible
106100
items-center
107101
justify-around
108-
self-stretch
102+
min-w-min
103+
opacity-0
109104
overflow-hidden
105+
self-stretch
110106
text-center
111-
font-medium
112-
opacity-0;
107+
text-color-2
108+
transition-default;
113109
border-inline: 0 solid transparent;
114110
border-start-end-radius: 0;
115111

@@ -143,23 +139,14 @@ $border-style: 1px solid var(--calcite-color-border-3);
143139
}
144140

145141
.text-container {
146-
@apply flex flex-1 min-w-0 flex-col break-words;
147-
}
148-
149-
.content-container {
150-
@apply flex flex-1;
142+
@apply box-border flex flex-auto min-w-0 flex-col break-words;
143+
padding-block: var(--calcite-alert-spacing-token-small);
144+
padding-inline: var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small);
151145
}
152146

153147
.footer {
154-
@apply flex justify-end order-1 pt-px relative w-full;
155-
block-size: var(--calcite-alert-footer-height);
156-
157-
&:before {
158-
content: "";
159-
@apply absolute top-0;
160-
inset-inline: var(--calcite-alert-footer-divider-gap);
161-
border-block-start: $border-style;
162-
}
148+
@apply flex justify-end pt-px relative self-stretch w-auto;
149+
block-size: inherit;
163150
}
164151

165152
// scale variables

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

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { select } from "@storybook/addon-knobs";
22
import { boolean, iconNames, storyFilters } from "../../../.storybook/helpers";
3-
import { createBreakpointStories, modesDarkDefault } from "../../../.storybook/utils";
3+
import { modesDarkDefault } from "../../../.storybook/utils";
44
import { html } from "../../../support/formatting";
55
import readme from "./readme.md";
66

7-
const openAlertScreenshotDelay = 1000;
8-
97
export default {
108
title: "Components/Alert",
119
parameters: {
@@ -220,121 +218,3 @@ export const autoClosableRetainsCloseButton_TestOnly = (): string => html`
220218
<calcite-link slot="link" title="my action" role="presentation"> Take action </calcite-link>
221219
</calcite-alert>
222220
`;
223-
224-
// we use individual stories since we can't display multiple open alerts at the same time
225-
226-
const breakpointsStoryTemplate = html`
227-
<style>
228-
.breakpoint-stories-container {
229-
height: 600px;
230-
231-
/* force fixed container placement on the breakpoint-sized stories container */
232-
contain: layout;
233-
}
234-
</style>
235-
<calcite-alert icon open scale="{scale}">
236-
<div slot="title">title</div>
237-
<div slot="message">message</div>
238-
<calcite-action scale="{scale}" slot="actions-end" title="Tips" icon="lightbulb"></calcite-action>
239-
<calcite-action scale="{scale}" slot="actions-end" title="Get info" icon="attachment"></calcite-action>
240-
</calcite-alert>
241-
<calcite-alert icon scale="{scale}">
242-
<div slot="title">title</div>
243-
<div slot="message">message</div>
244-
<calcite-action scale="{scale}" slot="actions-end" title="Tips" icon="lightbulb"></calcite-action>
245-
<calcite-action scale="{scale}" slot="actions-end" title="Get info" icon="attachment"></calcite-action>
246-
</calcite-alert>
247-
<script>
248-
(async function () {
249-
await customElements.whenDefined("calcite-alert");
250-
const alert2 = document.querySelectorAll("calcite-alert")[1];
251-
await alert2.componentOnReady();
252-
253-
requestAnimationFrame(() => (alert2.open = true));
254-
})();
255-
</script>
256-
`;
257-
258-
export const breakpointsXsmallScaleS_TestOnly = (): string =>
259-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "xsmall", scale: "s" });
260-
261-
breakpointsXsmallScaleS_TestOnly.parameters = {
262-
chromatic: { delay: openAlertScreenshotDelay },
263-
};
264-
265-
export const breakpointsSmallScaleS_TestOnly = (): string =>
266-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "small", scale: "s" });
267-
268-
breakpointsSmallScaleS_TestOnly.parameters = {
269-
chromatic: { delay: openAlertScreenshotDelay },
270-
};
271-
272-
export const breakpointsMediumScaleS_TestOnly = (): string =>
273-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "medium", scale: "s" });
274-
275-
breakpointsMediumScaleS_TestOnly.parameters = {
276-
chromatic: { delay: openAlertScreenshotDelay },
277-
};
278-
279-
export const breakpointsLargeScaleS_TestOnly = (): string =>
280-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "large", scale: "s" });
281-
282-
breakpointsLargeScaleS_TestOnly.parameters = {
283-
chromatic: { delay: openAlertScreenshotDelay },
284-
};
285-
286-
export const breakpointsXsmallScaleM_TestOnly = (): string =>
287-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "xsmall", scale: "m" });
288-
289-
breakpointsXsmallScaleM_TestOnly.parameters = {
290-
chromatic: { delay: openAlertScreenshotDelay },
291-
};
292-
293-
export const breakpointsSmallScaleM_TestOnly = (): string =>
294-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "small", scale: "m" });
295-
296-
breakpointsSmallScaleM_TestOnly.parameters = {
297-
chromatic: { delay: openAlertScreenshotDelay },
298-
};
299-
300-
export const breakpointsMediumScaleM_TestOnly = (): string =>
301-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "medium", scale: "m" });
302-
303-
breakpointsMediumScaleM_TestOnly.parameters = {
304-
chromatic: { delay: openAlertScreenshotDelay },
305-
};
306-
307-
export const breakpointsLargeScaleM_TestOnly = (): string =>
308-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "large", scale: "m" });
309-
310-
breakpointsLargeScaleM_TestOnly.parameters = {
311-
chromatic: { delay: openAlertScreenshotDelay },
312-
};
313-
314-
export const breakpointsXsmallScaleL_TestOnly = (): string =>
315-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "xsmall", scale: "l" });
316-
317-
breakpointsXsmallScaleL_TestOnly.parameters = {
318-
chromatic: { delay: openAlertScreenshotDelay },
319-
};
320-
321-
export const breakpointsSmallScaleL_TestOnly = (): string =>
322-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "small", scale: "l" });
323-
324-
breakpointsSmallScaleL_TestOnly.parameters = {
325-
chromatic: { delay: openAlertScreenshotDelay },
326-
};
327-
328-
export const breakpointsMediumScaleL_TestOnly = (): string =>
329-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "medium", scale: "l" });
330-
331-
breakpointsMediumScaleL_TestOnly.parameters = {
332-
chromatic: { delay: openAlertScreenshotDelay },
333-
};
334-
335-
export const breakpointsLargeScaleL_TestOnly = (): string =>
336-
createBreakpointStories(breakpointsStoryTemplate, { breakpoint: "large", scale: "l" });
337-
338-
breakpointsLargeScaleL_TestOnly.parameters = {
339-
chromatic: { delay: openAlertScreenshotDelay },
340-
};

0 commit comments

Comments
 (0)