Skip to content

Commit

Permalink
Add changeset + small windows high contrast mode fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fymmot committed Jan 11, 2023
1 parent ecab27b commit fe0538c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "Sqrrl/wc-datepicker" }
{ "repo": "fymmot/inclusive-dates" }
],
"commit": false,
"fixed": [],
Expand Down
5 changes: 5 additions & 0 deletions .changeset/curvy-flies-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"inclusive-dates": minor
---

Basic functionality working with Chrono.js parsing, calendar in modal and CSS theming. Added windows high contrast design fixes.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "wc-datepicker",
"version": "0.4.0",
"description": "A small, accessible and customizable datepicker written in TypeScript.",
"name": "inclusive-dates",
"version": "0.0.1",
"description": "A small, accessible datepicker Web Component with natural language date input.",
"repository": {
"type": "git",
"url": "/~https://github.com/Sqrrl/wc-datepicker.git"
"url": "/~https://github.com/fymmot/inclusive-dates"
},
"main": "dist/index.cjs.js",
"module": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,14 @@ describe("inclusive-dates-calendar", () => {

const today = new Date();

expect(header.innerText.includes("January 1, 1989")).toBeTruthy();
expect(header.innerText.includes("January 1989")).toBeTruthy();

todayButton.click();
await page.waitForChanges();

expect(
header.innerText.includes(
Intl.DateTimeFormat("en-US", {
day: "numeric",
month: "long",
year: "numeric"
}).format(today)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ export class InclusiveDatesCalendar {
if (!Boolean(this.currentDate)) {
return;
}

return Intl.DateTimeFormat(this.locale, {
day: "numeric",
month: "long",
year: "numeric"
}).format(this.currentDate);
Expand Down Expand Up @@ -555,6 +553,7 @@ export class InclusiveDatesCalendar {
class={this.getClassName("calendar")}
onKeyDown={this.onKeyDown}
role="grid"
aria-label={this.getTitle()}
>
<thead class={this.getClassName("calendar-header")}>
<tr class={this.getClassName("weekday-row")}>
Expand Down
9 changes: 9 additions & 0 deletions src/themes/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ inclusive-dates-calendar {
background: var(--bg2-color);
font: inherit;
line-height: 1.125;
@media screen and (forced-colors: active) {
border: 1px solid transparent;
}
}

.inclusive-dates-calendar__month-select {
Expand Down Expand Up @@ -161,6 +164,9 @@ inclusive-dates-calendar {

.inclusive-dates-calendar__date:focus-visible > * {
outline: 0.125rem solid var(--focus-color);
@media screen and (forced-colors: active) {
outline-color: Highlight;
}
}

.inclusive-dates-calendar__date:hover > * {
Expand Down Expand Up @@ -196,6 +202,9 @@ inclusive-dates-calendar {
background-color: var(--focus-color);
font-weight: 500;
outline-offset: 0.125rem;
@media screen and (forced-colors: active) {
background-color: Highlight;
}
}

.inclusive-dates-calendar__date--disabled {
Expand Down

1 comment on commit fe0538c

@vercel
Copy link

@vercel vercel bot commented on fe0538c Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

inclusive-dates – ./

inclusive-dates.vercel.app
inclusive-dates-git-main-fymmot.vercel.app
inclusive-dates-fymmot.vercel.app

Please sign in to comment.