Skip to content

Commit

Permalink
Merge branch 'master' into benelan/4893-date-picker-numbering-system
Browse files Browse the repository at this point in the history
  • Loading branch information
benelan committed Oct 17, 2022
2 parents 158862a + e6bc71b commit d76baba
Show file tree
Hide file tree
Showing 65 changed files with 474 additions and 260 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## Unreleased

### ⚠ BREAKING CHANGES

- **build:** dropped ES5 build output – this was disabled as legacy browsers are no longer supported, any `nomodule` scripts should be removed ([#5412](https://github.com/Esri/calcite-components/issues/5412))
- **build:** dropped `dist-custom-elements-bundle` output target – this is deprecated by Stencil and developers should use the `custom-elements` output target instead ([#5411](https://github.com/Esri/calcite-components/issues/5411))

### Features

- **tree-item:** allow disabling tree-item ([#5194](https://github.com/Esri/calcite-components/issues/5194)) ([a16bea2](https://github.com/Esri/calcite-components/commit/a16bea2d0da14b9cd0c5d734ffc24cdf83eb22a9)), closes [#3772](https://github.com/Esri/calcite-components/issues/3772)
Expand Down
6 changes: 3 additions & 3 deletions src/components/accordion-item/accordion-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export class AccordionItem implements ConditionalSlotComponent {
//--------------------------------------------------------------------------

/**
* When true, the component is active.
* When `true`, the component is active.
*
* @deprecated use expanded instead
* @deprecated use `expanded` instead.
*/

@Prop({ reflect: true, mutable: true }) active = false;
Expand All @@ -57,7 +57,7 @@ export class AccordionItem implements ConditionalSlotComponent {
this.expanded = value;
}

/** When true, item is expanded */
/** When `true`, the component is expanded. */
@Prop({ reflect: true, mutable: true }) expanded = false;

@Watch("expanded")
Expand Down
4 changes: 2 additions & 2 deletions src/components/accordion/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class Accordion {
@Prop({ reflect: true }) scale: Scale = "m";

/**
* Specifies the selection mode - "multi" (allow any number of open items), "single" (allow one open item),
* or "single-persist" (allow and require one open item).
* Specifies the selection mode - `"multi"` (allow any number of open items), `"single"` (allow one open item),
* or `"single-persist"` (allow and require one open item).
*/
@Prop({ reflect: true }) selectionMode: "multi" | "single" | "single-persist" = "multi";

Expand Down
4 changes: 2 additions & 2 deletions src/components/action-bar/action-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class ActionBar implements ConditionalSlotComponent {
// --------------------------------------------------------------------------

/**
* When true, the expand-toggling behavior is disabled.
* When `true`, the expand-toggling behavior is disabled.
*/
@Prop({ reflect: true }) expandDisabled = false;

Expand All @@ -57,7 +57,7 @@ export class ActionBar implements ConditionalSlotComponent {
}

/**
* When true, the component is expanded.
* When `true`, the component is expanded.
*/
@Prop({ reflect: true, mutable: true }) expanded = false;

Expand Down
2 changes: 1 addition & 1 deletion src/components/action-group/action-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-action-group-columns: Sets number of grid-template-columns when the `layout` property is "grid".
* @prop --calcite-action-group-columns: Sets number of grid-template-columns when the `layout` property is `"grid"`.
*/

:host {
Expand Down
4 changes: 2 additions & 2 deletions src/components/action-group/action-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ActionGroup implements ConditionalSlotComponent {
// --------------------------------------------------------------------------

/**
* When true, the component is expanded.
* When `true`, the component is expanded.
*/
@Prop({ reflect: true }) expanded = false;

Expand All @@ -54,7 +54,7 @@ export class ActionGroup implements ConditionalSlotComponent {
@Prop() intlMore?: string;

/**
* When true, the `calcite-action-menu` is open.
* When `true`, the `calcite-action-menu` is open.
*/
@Prop({ reflect: true, mutable: true }) menuOpen = false;

Expand Down
4 changes: 2 additions & 2 deletions src/components/action-menu/action-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ActionMenu {
// --------------------------------------------------------------------------

/**
* When true, the component is expanded.
* When `true`, the component is expanded.
*/
@Prop({ reflect: true }) expanded = false;

Expand All @@ -71,7 +71,7 @@ export class ActionMenu {
@Prop() label!: string;

/**
* When true, the component is open.
* When `true`, the component is open.
*/
@Prop({ reflect: true, mutable: true }) open = false;

Expand Down
4 changes: 2 additions & 2 deletions src/components/action-pad/action-pad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export class ActionPad implements ConditionalSlotComponent {
// --------------------------------------------------------------------------

/**
* When true, the expand-toggling behavior is disabled.
* When `true`, the expand-toggling behavior is disabled.
*/
@Prop({ reflect: true }) expandDisabled = false;

/**
* When true, the component is expanded.
* When `true`, the component is expanded.
*/
@Prop({ reflect: true, mutable: true }) expanded = false;

Expand Down
2 changes: 1 addition & 1 deletion src/components/action/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-action-indicator-color: optionally specify the color of the action indicator
* @prop --calcite-action-indicator-color: Specifies the color of the component's indicator.
*/

:host {
Expand Down
12 changes: 6 additions & 6 deletions src/components/action/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Action implements InteractiveComponent {
// --------------------------------------------------------------------------

/**
* When true, the component is highlighted.
* When `true`, the component is highlighted.
*/
@Prop({ reflect: true }) active = false;

Expand All @@ -48,20 +48,20 @@ export class Action implements InteractiveComponent {
@Prop({ reflect: true }) appearance: Extract<"solid" | "clear", Appearance> = "solid";

/**
* When true, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`.
* When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`.
*/
@Prop({ reflect: true }) compact = false;

/**
* When true, interaction is prevented and the component is displayed with lower opacity.
* When `true`, interaction is prevented and the component is displayed with lower opacity.
*/
@Prop({ reflect: true }) disabled = false;

/** Specifies an icon to display. */
@Prop() icon?: string;

/**
* When true, indicates unread changes.
* When `true`, indicates unread changes.
*/
@Prop({ reflect: true }) indicator = false;

Expand All @@ -78,7 +78,7 @@ export class Action implements InteractiveComponent {
@Prop() label?: string;

/**
* When true, a busy indicator is displayed.
* When `true`, a busy indicator is displayed.
*/
@Prop({ reflect: true }) loading = false;

Expand Down Expand Up @@ -106,7 +106,7 @@ export class Action implements InteractiveComponent {
/**
* Emits when the component has been clicked.
*
* @deprecated use onClick instead.
* @deprecated use `onClick` instead.
*/
@Event({ cancelable: false }) calciteActionClick: EventEmitter<void>;

Expand Down
10 changes: 5 additions & 5 deletions src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export class Alert implements OpenCloseComponent, LocalizedComponent {
//---------------------------------------------------------------------------

/**
* When true, opens the combobox
* When `true`, displays and positions the component.
*
* @deprecated use open instead
* @deprecated use `open` instead.
*/
@Prop({ reflect: true, mutable: true }) active = false;

/** When true, opens the dropdown */
/** When `true`, displays and positions the component. */
@Prop({ reflect: true, mutable: true }) open = false;

@Watch("active")
Expand All @@ -88,7 +88,7 @@ export class Alert implements OpenCloseComponent, LocalizedComponent {
}
}

/** When true, the component closes automatically (recommended for passive, non-blocking alerts). */
/** When `true`, the component closes automatically (recommended for passive, non-blocking alerts). */
@Prop({ reflect: true }) autoDismiss = false;

/** Specifies the duration before the component automatically closes (only use with `autoDismiss`). */
Expand All @@ -98,7 +98,7 @@ export class Alert implements OpenCloseComponent, LocalizedComponent {
@Prop({ reflect: true }) color: StatusColor = "blue";

/**
* When true, shows a default recommended icon. Alternatively,
* When `true`, shows a default recommended icon. Alternatively,
* pass a Calcite UI Icon name to display a specific icon.
*/
@Prop({ reflect: true }) icon: string | boolean;
Expand Down
45 changes: 45 additions & 0 deletions src/components/flow-item/flow-item.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { newE2EPage } from "@stencil/core/testing";
import { accessible, defaults, disabled, focusable, hidden, renders, slots } from "../../tests/commonTests";
import { CSS, SLOTS } from "./resources";
import { html } from "../../../support/formatting";

describe("calcite-flow-item", () => {
it("renders", async () => renders("calcite-flow-item", { display: "flex" }));
Expand Down Expand Up @@ -96,4 +97,48 @@ describe("calcite-flow-item", () => {
expect(calciteFlowItemBackClick).toHaveReceivedEvent();
expect(calciteFlowItemBack).toHaveReceivedEvent();
});

it("allows scrolling content", async () => {
const page = await newE2EPage();
await page.setContent(html`
<calcite-flow style="height: 300px">
<calcite-flow-item heading="Flow heading" id="flowOrPanel">
<calcite-block heading="Block example" summary="Some subtext" collapsible open>
<calcite-notice active>
<div slot="message">An excellent assortment of content.</div>
</calcite-notice>
</calcite-block>
<calcite-block heading="Block example" summary="Some subtext" collapsible open>
<calcite-notice active>
<div slot="message">An excellent assortment of content.</div>
</calcite-notice>
</calcite-block>
<calcite-block heading="Block example" summary="Some subtext" collapsible open>
<calcite-notice active>
<div slot="message">An excellent assortment of content.</div>
</calcite-notice>
</calcite-block>
<calcite-block heading="Block example" summary="Some subtext" collapsible open>
<calcite-notice active>
<div slot="message">An excellent assortment of content.</div>
</calcite-notice>
</calcite-block>
</calcite-flow-item>
</calcite-flow>
`);
const [top, _middle, bottom] = await page.findAll("calcite-block");

await bottom.callMethod("scrollIntoView");

expect(await top.isIntersectingViewport()).toBe(false);

await page.$eval("calcite-flow-item", (panel: HTMLCalcitePanelElement) =>
panel.scrollContentTo({
top: 0,
behavior: "auto"
})
);

expect(await top.isIntersectingViewport()).toBe(true);
});
});
7 changes: 6 additions & 1 deletion src/components/flow-item/flow-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class FlowItem implements InteractiveComponent {
*/
@Method()
async scrollContentTo(options?: ScrollToOptions): Promise<void> {
this.containerEl?.scrollContentTo(options);
await this.containerEl?.scrollContentTo(options);
}

// --------------------------------------------------------------------------
Expand All @@ -211,6 +211,10 @@ export class FlowItem implements InteractiveComponent {
this.backButtonEl = node;
};

setContainerRef = (node: HTMLCalcitePanelElement): void => {
this.containerEl = node;
};

getBackLabel = (): string => {
return this.intlBack || TEXT.back;
};
Expand Down Expand Up @@ -278,6 +282,7 @@ export class FlowItem implements InteractiveComponent {
loading={loading}
menuOpen={menuOpen}
onCalcitePanelClose={this.handlePanelClose}
ref={this.setContainerRef}
widthScale={widthScale}
>
<slot name={SLOTS.headerActionsStart} slot={PANEL_SLOTS.headerActionsStart} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/input-message/input-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class InputMessage {
//
//--------------------------------------------------------------------------

/** When true, the component is active. */
/** When `true`, the component is active. */
@Prop({ reflect: true }) active = false;

/** Specifies an icon to display. */
Expand Down
20 changes: 10 additions & 10 deletions src/components/input-number/input-number.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ export class InputNumber
@Prop({ reflect: true }) alignment: Position = "start";

/**
* When true, the component is focused on page load.
* When `true`, the component is focused on page load.
*
* @mdn [autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)
*/
@Prop({ reflect: true }) autofocus = false;

/**
* When true, a clear button is displayed when the component has a value.
* When `true`, a clear button is displayed when the component has a value.
*/
@Prop({ reflect: true }) clearable = false;

/**
* When true, interaction is prevented and the component is displayed with lower opacity.
* When `true`, interaction is prevented and the component is displayed with lower opacity.
*
* @mdn [disabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled)
*/
Expand All @@ -96,19 +96,19 @@ export class InputNumber
}

/**
* When true, number values are displayed with the locale's group separator.
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
*/
@Prop({ reflect: true }) groupSeparator = false;

/**
* When true, the component will not be visible.
* When `true`, the component will not be visible.
*
* @mdn [hidden](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden)
*/
@Prop({ reflect: true }) hidden = false;

/**
* When true, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon.
* When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon.
*/
@Prop({ reflect: true }) icon: string | boolean;

Expand All @@ -124,13 +124,13 @@ export class InputNumber
*/
@Prop() intlLoading?: string = COMMON_TEXT.loading;

/** When true, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */
/** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */
@Prop({ reflect: true }) iconFlipRtl = false;

/** Accessible name for the component's button or hyperlink. */
@Prop() label?: string;

/** When true, the component is in the loading state and `calcite-progress` is displayed. */
/** When `true`, the component is in the loading state and `calcite-progress` is displayed. */
@Prop({ reflect: true }) loading = false;

/**
Expand Down Expand Up @@ -219,13 +219,13 @@ export class InputNumber
@Prop() prefixText?: string;

/**
* When true, the component's value can be read, but cannot be modified.
* When `true`, the component's value can be read, but cannot be modified.
*
* @mdn [readOnly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
*/
@Prop({ reflect: true }) readOnly = false;

/** When true, the component must have a value in order for the form to submit. */
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/** Specifies the size of the component. */
Expand Down
Loading

0 comments on commit d76baba

Please sign in to comment.