Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5d4b01a
feat(input-message, input-date-picker): add component tokens
Elijbet Mar 12, 2025
47e50e0
add custom theme stories
Elijbet Mar 12, 2025
ba7c423
add e2e tests
Elijbet Mar 12, 2025
75f5bd7
cleanup
Elijbet Mar 12, 2025
2c01c54
add range to input-date-picker
Elijbet Mar 12, 2025
fb3f33e
remove input-message changes
Elijbet Mar 17, 2025
f965b8c
add --calcite-internal-date-picker-toggle-spacing and --calcite-input…
Elijbet Mar 18, 2025
1205646
add --calcite-input-date-picker-width
Elijbet Mar 18, 2025
ea8acfb
use stateful prop for hover and reference a var --calcite-spacing-px
Elijbet Mar 19, 2025
be5ec3a
use popover instead here
Elijbet Mar 20, 2025
68cde2a
add stateful hover token to tests
Elijbet Mar 20, 2025
e59a304
remove width from tests
Elijbet Mar 20, 2025
df9e882
map input tokens to input-date-picker and add --calcite-shadow-none prop
Elijbet Mar 25, 2025
4674221
e2e for new mapped input tokens
Elijbet Mar 25, 2025
c3f10fc
input date picker tokens
Elijbet Mar 25, 2025
4ae5739
clean up html
Elijbet Mar 25, 2025
9782265
WIP: adding input-date-picker range and vertical range layouts, impro…
Elijbet Mar 26, 2025
2ada267
have a base test and additional tests cover only differences
Elijbet Mar 26, 2025
aaf8411
add docs for date-picker tokens
Elijbet Mar 28, 2025
194b2d8
map namespaced tokens to calcite-date-picker, add e2e tests
Elijbet Mar 28, 2025
e2b1a3d
typo
Elijbet Mar 28, 2025
cfa32e5
merge dev
Elijbet Mar 28, 2025
f12ad02
add date-picker tokens to inputDatePickerTokens
Elijbet Mar 28, 2025
6c96196
merge dev
Elijbet Aug 6, 2025
147c2b2
clean up tests
Elijbet Aug 12, 2025
7b0ca63
clean up tests and css
Elijbet Aug 12, 2025
8265609
tidy up
Elijbet Aug 13, 2025
556c874
move open to a separate group in e2e, inline function, remove redunda…
Elijbet Aug 14, 2025
90f23d4
consolidate tokens and make them more human readable
Elijbet Aug 19, 2025
120cfa9
continuing to consolidate tokens
Elijbet Aug 20, 2025
a4efaa5
continued consolidation of tokens
Elijbet Aug 20, 2025
ce86cd7
cleanup
Elijbet Aug 20, 2025
23875d4
merge dev
Elijbet Aug 20, 2025
8842e22
cleanup
Elijbet Aug 21, 2025
7468468
remove redundant prop
Elijbet Aug 25, 2025
0467eca
cleanup
Elijbet Aug 25, 2025
93fdb22
cleanup
Elijbet Aug 25, 2025
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
2 changes: 1 addition & 1 deletion packages/calcite-components/CHANGELOG_BETA.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ See [`CHANGELOG.md`](./CHANGELOG.md) for post-v1 changes.
set to `hex` by default.
- Removed ,`intlNoColor` property.

*note: color-picker-hex-input is `internal` component.*
_note: color-picker-hex-input is `internal` component._

- **color-picker:**
- Removed the property `intlB` , use `messsageOverrides.b` instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import {
openClose,
renders,
t9n,
themed,
} from "../../tests/commonTests";
import { html } from "../../../support/formatting";
import { findAll, getFocusedElementProp, isElementFocused, skipAnimations } from "../../tests/utils/puppeteer";
import { Position } from "../interfaces";
import { CSS as MONTH_CSS } from "../date-picker-month/resources";
import { CSS as MONTH_HEADER_CSS } from "../date-picker-month-header/resources";
import { CSS, POSITION } from "./resources";
import type { InputDatePicker } from "./input-date-picker";
Expand Down Expand Up @@ -2148,6 +2150,213 @@ describe("calcite-input-date-picker", () => {
expect(await calendar.isVisible()).toBe(false);
expect(await isElementFocused(page, "#input")).toBe(true);
});

describe("theme", () => {
describe("default", () => {
themed(html`<calcite-input-date-picker></calcite-input-date-picker>`, {
"--calcite-input-date-picker-shadow": {
targetProp: "boxShadow",
},
"--calcite-input-date-picker-calendar-shadow": {
targetProp: "boxShadow",
},
"--calcite-input-date-picker-actions-icon-color": {
shadowSelector: `.${CSS.inputWrapper} .${CSS.chevronIcon}`,
targetProp: "color",
},
"--calcite-input-date-picker-actions-icon-color-hover": {
shadowSelector: `.${CSS.inputWrapper} .${CSS.chevronIcon}`,
targetProp: "color",
state: "hover",
},
"--calcite-input-date-picker-background-color": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-background-color",
},
"--calcite-input-date-picker-border-color": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-border-color",
},
"--calcite-input-date-picker-corner-radius": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-corner-radius",
},
"--calcite-input-date-picker-icon-color": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-icon-color",
},
"--calcite-input-date-picker-icon-color-hover": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-icon-color-hover",
},
"--calcite-input-date-picker-text-color": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-text-color",
},
"--calcite-input-date-picker-placeholder-text-color": {
shadowSelector: `.${CSS.input}`,
targetProp: "--calcite-input-placeholder-text-color",
},
"--calcite-input-date-picker-calendar-border-color": {
shadowSelector: "calcite-date-picker",
targetProp: "--calcite-date-picker-border-color",
},
"--calcite-input-date-picker-calendar-corner-radius": {
shadowSelector: "calcite-date-picker",
targetProp: "--calcite-date-picker-corner-radius",
},
});
});

describe("calcite-date-picker when open", () => {
themed(html`<calcite-input-date-picker open></calcite-input-date-picker>`, {
"--calcite-input-date-picker-calendar-text-color": [
{
shadowSelector: `calcite-date-picker >>> .${MONTH_CSS.weekHeader}`,
targetProp: "--calcite-date-picker-week-header-text-color",
},
{
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> input`,
targetProp: "--calcite-date-picker-year-text-color",
},
],
"--calcite-input-date-picker-calendar-actions-background-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> .${MONTH_HEADER_CSS.chevronContainer} >>> calcite-action`,
targetProp: "--calcite-action-background-color",
},
"--calcite-input-date-picker-calendar-actions-background-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> .${MONTH_HEADER_CSS.chevronContainer} > calcite-action`,
targetProp: "--calcite-action-background-color-hover",
state: "hover",
},
"--calcite-input-date-picker-calendar-actions-background-color-press": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> .${MONTH_HEADER_CSS.chevronContainer} > calcite-action`,
targetProp: "--calcite-action-background-color-press",
state: { press: { attribute: "class", value: `${MONTH_HEADER_CSS.chevron}` } },
},
"--calcite-input-date-picker-calendar-actions-text-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> .${MONTH_HEADER_CSS.chevronContainer} > calcite-action`,
targetProp: "--calcite-action-text-color",
},
"--calcite-input-date-picker-calendar-actions-text-color-press": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> .${MONTH_HEADER_CSS.chevronContainer} > calcite-action`,
targetProp: "--calcite-action-text-color-press",
state: { press: { attribute: "class", value: `${MONTH_HEADER_CSS.chevron}` } },
},
"--calcite-input-date-picker-calendar-month-select-text-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> calcite-select`,
targetProp: "--calcite-select-text-color",
},
"--calcite-input-date-picker-calendar-icon-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> calcite-select`,
targetProp: "--calcite-select-icon-color",
},
"--calcite-input-date-picker-calendar-icon-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-month-header >>> calcite-select`,
targetProp: "--calcite-select-icon-color-hover",
state: "hover",
},
"--calcite-input-date-picker-calendar-day-background-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day`,
targetProp: "--calcite-date-picker-day-background-color",
},
"--calcite-input-date-picker-calendar-day-background-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day`,
targetProp: "--calcite-date-picker-day-background-color-hover",
state: "hover",
},
"--calcite-input-date-picker-calendar-day-text-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day`,
targetProp: "--calcite-date-picker-day-text-color",
},
"--calcite-input-date-picker-calendar-day-text-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day`,
targetProp: "--calcite-date-picker-day-text-color-hover",
state: "hover",
},
"--calcite-input-date-picker-calendar-day-current-text-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day.${MONTH_CSS.currentDay}`,
targetProp: "--calcite-date-picker-current-day-text-color",
},
});
});

describe("selected", () => {
themed(html`<calcite-input-date-picker value="2024-01-31" open></calcite-input-date-picker>`, {
"--calcite-input-date-picker-calendar-selected-background-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[selected]`,
targetProp: "--calcite-date-picker-day-background-color-selected",
},
"--calcite-input-date-picker-calendar-day-text-color-selected": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[selected]`,
targetProp: "--calcite-date-picker-day-text-color-selected",
},
});
});

describe("range", () => {
themed(
async () => {
const page = await newE2EPage();
await page.setContent(html`<calcite-input-date-picker range open></calcite-input-date-picker>`);
await page.$eval("calcite-input-date-picker", (el: InputDatePicker["el"]) => {
el.value = ["2025-01-01", "2025-02-20"];
});
await page.waitForChanges();
return { tag: "calcite-input-date-picker", page };
},
{
"--calcite-input-date-picker-border-color": {
shadowSelector: `.${CSS.dividerContainer}`,
targetProp: "borderColor",
},
"--calcite-input-date-picker-background-color": {
shadowSelector: `.${CSS.dividerContainer}`,
targetProp: "backgroundColor",
},
"--calcite-input-date-picker-calendar-range-divider-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month`,
targetProp: "--calcite-date-picker-range-calendar-divider-color",
},
"--calcite-input-date-picker-calendar-day-range-text-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[highlighted]`,
targetProp: "--calcite-date-picker-day-range-text-color",
},
"--calcite-input-date-picker-calendar-selected-background-color": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[highlighted]`,
targetProp: "--calcite-date-picker-day-range-background-color",
},
"--calcite-input-date-picker-calendar-day-outside-range-background-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[id='20250105']`,
targetProp: "--calcite-date-picker-day-outside-range-background-color-hover",
state: {
hover: `calcite-input-date-picker >>> calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[id='20250106']`,
},
},
"--calcite-input-date-picker-calendar-day-outside-range-text-color-hover": {
shadowSelector: `calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[id='20250105']`,
targetProp: "--calcite-date-picker-day-outside-range-text-color-hover",
state: {
hover: `calcite-input-date-picker >>> calcite-date-picker >>> calcite-date-picker-month >>> calcite-date-picker-day[id='20250106']`,
},
},
},
);
});

describe("range with vertical layout", () => {
themed(html`<calcite-input-date-picker range layout="vertical"></calcite-input-date-picker>`, {
"--calcite-input-date-picker-background-color": {
shadowSelector: `.${CSS.verticalChevronContainer}`,
targetProp: "backgroundColor",
},
"--calcite-input-date-picker-border-color": {
shadowSelector: `.${CSS.verticalChevronContainer}`,
targetProp: "borderColor",
},
});
});
});
});

describe("proximitySelectionDisabled", () => {
Expand Down
Loading
Loading