Skip to content

Commit

Permalink
Merge branch 'main' into doc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
benelan authored May 24, 2024
2 parents 6cb91c5 + 744491c commit 153a31c
Show file tree
Hide file tree
Showing 23 changed files with 1,353 additions and 105 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.9.0-next.22](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.21...@esri/calcite-components-angular@2.9.0-next.22) (2024-05-23)

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

## [2.9.0-next.21](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.20...@esri/calcite-components-angular@2.9.0-next.21) (2024-05-23)

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

## [2.9.0-next.20](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.19...@esri/calcite-components-angular@2.9.0-next.20) (2024-05-23)

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

## [2.9.0-next.19](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.9.0-next.18...@esri/calcite-components-angular@2.9.0-next.19) (2024-05-23)

**Note:** Version bump only for package @esri/calcite-components-angular
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components-angular",
"version": "2.9.0-next.19",
"version": "2.9.0-next.22",
"sideEffects": false,
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "A set of Angular components that wrap Esri's Calcite Components.",
Expand All @@ -20,7 +20,7 @@
"@angular/core": ">=16.0.0"
},
"dependencies": {
"@esri/calcite-components": "^2.9.0-next.19",
"@esri/calcite-components": "^2.9.0-next.22",
"tslib": "2.6.2"
},
"lerna": {
Expand Down
12 changes: 12 additions & 0 deletions packages/calcite-components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.9.0-next.22](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.21...@esri/calcite-components-react@2.9.0-next.22) (2024-05-23)

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

## [2.9.0-next.21](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.20...@esri/calcite-components-react@2.9.0-next.21) (2024-05-23)

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

## [2.9.0-next.20](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.19...@esri/calcite-components-react@2.9.0-next.20) (2024-05-23)

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

## [2.9.0-next.19](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.9.0-next.18...@esri/calcite-components-react@2.9.0-next.19) (2024-05-23)

**Note:** Version bump only for package @esri/calcite-components-react
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@esri/calcite-components-react",
"sideEffects": false,
"version": "2.9.0-next.19",
"version": "2.9.0-next.22",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "A set of React components that wrap calcite components",
"license": "SEE LICENSE.md",
Expand All @@ -23,7 +23,7 @@
"dist/"
],
"dependencies": {
"@esri/calcite-components": "^2.9.0-next.19"
"@esri/calcite-components": "^2.9.0-next.22"
},
"peerDependencies": {
"react": ">=16.7",
Expand Down
22 changes: 22 additions & 0 deletions packages/calcite-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.9.0-next.22](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.21...@esri/calcite-components@2.9.0-next.22) (2024-05-23)

### Bug Fixes

- **tree:** allow single select only and add indicator ([#9405](https://github.com/Esri/calcite-design-system/issues/9405)) ([0d07b59](https://github.com/Esri/calcite-design-system/commit/0d07b59d9d55f9dcb78869b51219d9e509ff11cb)), closes [#7899](https://github.com/Esri/calcite-design-system/issues/7899)

## [2.9.0-next.21](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.20...@esri/calcite-components@2.9.0-next.21) (2024-05-23)

### Features

- **split-button:** Make dividers consistent ([#9402](https://github.com/Esri/calcite-design-system/issues/9402)) ([caf27e3](https://github.com/Esri/calcite-design-system/commit/caf27e3f3bf367db26ac88effe0cd16ce35cafff)), closes [#8142](https://github.com/Esri/calcite-design-system/issues/8142)

## [2.9.0-next.20](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.19...@esri/calcite-components@2.9.0-next.20) (2024-05-23)

### Features

- **stepper, stepper-item:** add separate change events to stepper and items (deprecates `calciteStepperItemChange` on the parent) ([#9351](https://github.com/Esri/calcite-design-system/issues/9351)) ([cf6a118](https://github.com/Esri/calcite-design-system/commit/cf6a11867d74d5dedd77ad039e5475d65f25a46a)), closes [#2094](https://github.com/Esri/calcite-design-system/issues/2094)

### Bug Fixes

- **dropdown-group:** title scale with dropdown scale ([#9360](https://github.com/Esri/calcite-design-system/issues/9360)) ([3529cdd](https://github.com/Esri/calcite-design-system/commit/3529cdd1778cb1243de23c410acc27c419d63524)), closes [#9350](https://github.com/Esri/calcite-design-system/issues/9350)

## [2.9.0-next.19](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.9.0-next.18...@esri/calcite-components@2.9.0-next.19) (2024-05-23)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/calcite-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components",
"version": "2.9.0-next.19",
"version": "2.9.0-next.22",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "Web Components for Esri's Calcite Design System.",
"main": "dist/index.cjs.js",
Expand Down
13 changes: 11 additions & 2 deletions packages/calcite-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7257,6 +7257,7 @@ declare global {
new (): HTMLCalciteStackElement;
};
interface HTMLCalciteStepperElementEventMap {
"calciteStepperChange": void;
"calciteStepperItemChange": void;
"calciteInternalStepperItemChange": StepperItemChangeEventDetail;
}
Expand All @@ -7277,8 +7278,8 @@ declare global {
interface HTMLCalciteStepperItemElementEventMap {
"calciteInternalStepperItemKeyEvent": StepperItemKeyEventDetail;
"calciteInternalStepperItemSelect": StepperItemEventDetail;
"calciteInternalUserRequestedStepperItemSelect": StepperItemChangeEventDetail;
"calciteInternalStepperItemRegister": StepperItemEventDetail;
"calciteStepperItemSelect": void;
}
interface HTMLCalciteStepperItemElement extends Components.CalciteStepperItem, HTMLStencilElement {
addEventListener<K extends keyof HTMLCalciteStepperItemElementEventMap>(type: K, listener: (this: HTMLCalciteStepperItemElement, ev: CalciteStepperItemCustomEvent<HTMLCalciteStepperItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
Expand Down Expand Up @@ -12495,6 +12496,11 @@ declare namespace LocalJSX {
/**
* Fires when the active `calcite-stepper-item` changes.
*/
"onCalciteStepperChange"?: (event: CalciteStepperCustomEvent<void>) => void;
/**
* Fires when the active `calcite-stepper-item` changes.
* @deprecated use `calciteStepperChange` instead or `calciteStepperItemChange` on items instead.
*/
"onCalciteStepperItemChange"?: (event: CalciteStepperCustomEvent<void>) => void;
/**
* Specifies the size of the component.
Expand Down Expand Up @@ -12555,7 +12561,10 @@ declare namespace LocalJSX {
"onCalciteInternalStepperItemKeyEvent"?: (event: CalciteStepperItemCustomEvent<StepperItemKeyEventDetail>) => void;
"onCalciteInternalStepperItemRegister"?: (event: CalciteStepperItemCustomEvent<StepperItemEventDetail>) => void;
"onCalciteInternalStepperItemSelect"?: (event: CalciteStepperItemCustomEvent<StepperItemEventDetail>) => void;
"onCalciteInternalUserRequestedStepperItemSelect"?: (event: CalciteStepperItemCustomEvent<StepperItemChangeEventDetail>) => void;
/**
* Fires when the active `calcite-stepper-item` changes.
*/
"onCalciteStepperItemSelect"?: (event: CalciteStepperItemCustomEvent<void>) => void;
/**
* Specifies the size of the component inherited from the `calcite-stepper`, defaults to `m`.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,7 @@
}

.container {
text-align: start;
}

.container--s {
@apply text-n2h;
.dropdown-title {
@apply p-2;
}
}

.container--m {
@apply text-n1h;
.dropdown-title {
@apply p-3;
}
}

.container--l {
@apply text-0h;
.dropdown-title {
@apply p-4;
}
@apply text-start;
}

.dropdown-title {
Expand All @@ -46,4 +25,25 @@
background-color: theme("borderColor.color.3");
}

:host([scale="s"]) {
@apply text-n2h;
.dropdown-title {
@apply p-2;
}
}

:host([scale="m"]) {
@apply text-n1h;
.dropdown-title {
@apply p-3;
}
}

:host([scale="l"]) {
@apply text-0h;
.dropdown-title {
@apply p-4;
}
}

@include base-component();
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class DropdownGroup {
*
* @internal
*/
@Prop() scale: Scale = "m";
@Prop({ reflect: true }) scale: Scale = "m";

/**
* Specifies the selection mode of the component, where:
Expand Down Expand Up @@ -104,7 +104,6 @@ export class DropdownGroup {
<div
class={{
[CSS.container]: true,
[`${CSS.container}--${this.scale}`]: true,
}}
>
{dropdownSeparator}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,44 @@ export const settingFullWidthEnablesTriggerTruncation_TestOnly = (): string =>
</calcite-dropdown-group>
</calcite-dropdown>
</div>`;

export const openInAllScales = (): string => html`
<style>
.container {
display: inline-flex;
flex-direction: column;
width: 10rem;
padding: 25px;
flex-basis: 200px;
}
</style>
<div class="container">
<calcite-dropdown scale="s" width-scale="s" open>
<calcite-button icon-end="hamburger" appearance="outline" slot="trigger">Scale S</calcite-button>
<calcite-dropdown-group group-title="View">
<calcite-dropdown-item icon-end="list-bullet" selected>List</calcite-dropdown-item>
<calcite-dropdown-item icon-end="grid">Grid</calcite-dropdown-item>
</calcite-dropdown-group>
</calcite-dropdown>
</div>
<div class="container">
<calcite-dropdown scale="m" width-scale="s" open>
<calcite-button icon-end="hamburger" appearance="outline" slot="trigger">Scale M</calcite-button>
<calcite-dropdown-group group-title="View">
<calcite-dropdown-item icon-end="list-bullet" selected>List</calcite-dropdown-item>
<calcite-dropdown-item icon-end="grid">Grid</calcite-dropdown-item>
</calcite-dropdown-group>
</calcite-dropdown>
</div>
<div class="container">
<calcite-dropdown scale="l" width-scale="s" open>
<calcite-button icon-end="hamburger" appearance="outline" slot="trigger">Scale L</calcite-button>
<calcite-dropdown-group group-title="View">
<calcite-dropdown-item icon-end="list-bullet" selected>List</calcite-dropdown-item>
<calcite-dropdown-item icon-end="grid">Grid</calcite-dropdown-item>
</calcite-dropdown-group>
</calcite-dropdown>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export class Dropdown
@Watch("scale")
handlePropsChange(): void {
this.updateItems();
this.updateGroupScale();
}

//--------------------------------------------------------------------------
Expand Down Expand Up @@ -495,8 +496,13 @@ export class Dropdown
this.groups = groups;

this.updateItems();
this.updateGroupScale();
};

private updateGroupScale(): void {
this.groups?.forEach((group) => (group.scale = this.scale));
}

resizeObserverCallback = (entries: ResizeObserverEntry[]): void => {
entries.forEach((entry) => {
const { target } = entry;
Expand Down
Loading

0 comments on commit 153a31c

Please sign in to comment.