Skip to content

Commit ab7f24a

Browse files
authored
Merge branch 'master' into mpopov/calendar/refactoring
2 parents 61fffdf + 66dfc34 commit ab7f24a

File tree

95 files changed

+1599
-1716
lines changed

Some content is hidden

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

95 files changed

+1599
-1716
lines changed

.github/workflows/gh-pages-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212

1313
jobs:
1414
deploy:
15+
if: "!contains(github.ref, '-alpha.') && !contains(github.ref, '-beta.') && !contains(github.ref, '-rc.')"
1516
environment:
1617
name: github-pages
1718
url: ${{ steps.build-publish.outputs.page_url }}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
8+
### Added
9+
- #### Localization
10+
- New localization implementation. Now you can set global localization for all localized Ignite UI components using the `registerI18n` and `setCurrentI18n` methods.
11+
- Calendar, Date Input, Date Picker and Date Range Picker components now implement the new localization for formatting as well, which internally uses new implementation of the Intl.
12+
- Added localization for Carousel, Chip, Combo, File Input and Tree. They now have `locale` and `resourceStrings` properties as well, which you can set to customize them individually.
13+
814
### Fixed
915
- #### Tooltip
1016
- Do not show tooltip when target is clicked [#1828](https://github.com/IgniteUI/igniteui-webcomponents/issues/1828)
17+
- #### Date input, Date picker, Date range picker
18+
- Default display format now follows strictly locale format as per specification without leading zeros.
19+
20+
## [6.3.6] - 2025-11-14
21+
### Fixed
22+
- #### Date picker
23+
- Value not committed on browser auto-fill behavior [#1932](https://github.com/IgniteUI/igniteui-webcomponents/pull/1932)
1124

1225
## [6.3.5] - 2025-11-13
1326
### Changed
@@ -1059,6 +1072,7 @@ Initial release of Ignite UI Web Components
10591072
- Ripple component
10601073
- Switch component
10611074

1075+
[6.3.6]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.5...6.3.6
10621076
[6.3.5]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.4...6.3.5
10631077
[6.3.4]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.3...6.3.4
10641078
[6.3.3]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.2...6.3.3

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"noUnusedVariables": "error",
3131
"noUnusedFunctionParameters": "error",
3232
"noUnusedImports": "error",
33-
"noUnusedPrivateClassMembers": "error",
33+
"noUnusedPrivateClassMembers": "off",
3434
"useImportExtensions": {
3535
"level": "error",
3636
"options": { "forceJsExtensions": true }

package-lock.json

Lines changed: 728 additions & 675 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@
5656
"@floating-ui/dom": "^1.7.4",
5757
"@lit-labs/virtualizer": "^2.1.1",
5858
"@lit/context": "^1.1.6",
59-
"igniteui-i18n-core": "0.6.0-alpha.4",
59+
"igniteui-i18n-core": "0.7.0-alpha.8",
6060
"lit": "^3.3.1"
6161
},
6262
"devDependencies": {
63-
"@biomejs/biome": "~2.3.5",
63+
"@biomejs/biome": "~2.3.6",
6464
"@custom-elements-manifest/analyzer": "^0.11.0",
6565
"@igniteui/material-icons-extended": "^3.1.0",
6666
"@open-wc/testing": "^4.0.0",
67-
"@storybook/addon-a11y": "^10.0.7",
68-
"@storybook/addon-docs": "^10.0.7",
69-
"@storybook/addon-links": "^10.0.7",
70-
"@storybook/web-components-vite": "^10.0.7",
67+
"@storybook/addon-a11y": "^10.0.8",
68+
"@storybook/addon-docs": "^10.0.8",
69+
"@storybook/addon-links": "^10.0.8",
70+
"@storybook/web-components-vite": "^10.0.8",
7171
"@types/mocha": "^10.0.10",
7272
"@web/dev-server-esbuild": "^1.0.4",
7373
"@web/test-runner": "^0.20.2",
@@ -78,11 +78,11 @@
7878
"concurrently": "^9.2.1",
7979
"custom-element-jet-brains-integration": "^1.7.0",
8080
"custom-element-vs-code-integration": "^1.5.0",
81-
"globby": "^15.0.0",
81+
"globby": "^16.0.0",
8282
"husky": "^9.1.7",
8383
"ig-typedoc-theme": "^7.0.0",
84-
"igniteui-i18n-resources": "0.6.0-alpha.4",
85-
"igniteui-theming": "^22.1.0",
84+
"igniteui-i18n-resources": "0.7.0-alpha.8",
85+
"igniteui-theming": "^23.1.0",
8686
"keep-a-changelog": "^2.7.1",
8787
"lint-staged": "^16.2.6",
8888
"lit-analyzer": "^2.0.3",
@@ -94,7 +94,7 @@
9494
"rimraf": "^6.1.0",
9595
"sass-embedded": "~1.93.3",
9696
"sinon": "^21.0.0",
97-
"storybook": "^10.0.7",
97+
"storybook": "^10.0.8",
9898
"stylelint": "^16.25.0",
9999
"stylelint-config-standard-scss": "^16.0.0",
100100
"stylelint-prettier": "^5.0.3",

scripts/_package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
"lit": "^3.3.0"
8787
},
8888
"peerDependencies": {
89-
"dompurify": "^3.2.0",
90-
"marked": "^16.3.0",
89+
"dompurify": "^3.3.0",
90+
"marked": "^17.0.0",
9191
"marked-shiki": "^1.2.0",
92-
"shiki": "^3.12.0"
92+
"shiki": "^3.15.0"
9393
},
9494
"peerDependenciesMeta": {
9595
"dompurify": {

src/components/button-group/themes/shared/button/button.bootstrap.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ $group-item-border-thickness: rem(1px);
5656
background: var-get($theme, 'item-selected-focus-background');
5757
}
5858
}
59+
60+
[part='toggle focused'] {
61+
box-shadow: 0 0 0 rem(4px) var-get($theme, 'selected-shadow-color');
62+
}
5963
}

src/components/button/themes/button/shared/button.material.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $outlined-theme: $material-outlined;
5151
}
5252

5353
&:active {
54-
box-shadow: var-get($contained-theme, 'hover-elevation');
54+
box-shadow: var-get($contained-theme, 'active-elevation');
5555
}
5656
}
5757

src/components/calendar/calendar.ts

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getDateFormatter } from 'igniteui-i18n-core';
12
import { html, nothing } from 'lit';
23
import { property, query, queryAll, state } from 'lit/decorators.js';
34
import { choose } from 'lit/directives/choose.js';
@@ -15,9 +16,7 @@ import {
1516
pageUpKey,
1617
shiftKey,
1718
} from '../common/controllers/key-bindings.js';
18-
import { watch } from '../common/decorators/watch.js';
1919
import { registerComponent } from '../common/definitions/register.js';
20-
import { createDateTimeFormatters } from '../common/localization/intl-formatters.js';
2120
import type { Constructor } from '../common/mixins/constructor.js';
2221
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
2322
import { partMap } from '../common/part-map.js';
@@ -219,30 +218,21 @@ export default class IgcCalendarComponent extends EventEmitterMixin<
219218
public formatOptions: Pick<Intl.DateTimeFormatOptions, 'month' | 'weekday'> =
220219
{ month: 'long', weekday: 'narrow' };
221220

222-
private _intl = createDateTimeFormatters(this.locale, {
223-
month: {
224-
month: this.formatOptions.month,
225-
},
226-
monthLabel: { month: 'long' },
227-
weekday: { weekday: 'short' },
228-
monthDay: { month: 'short', day: 'numeric' },
229-
yearLabel: { month: 'long', year: 'numeric' },
230-
});
231-
232-
@watch('locale')
233-
protected localeChange() {
234-
this._intl.locale = this.locale;
235-
}
236-
237-
@watch('formatOptions')
238-
protected formatOptionsChange() {
239-
this._intl.update({
240-
month: {
241-
month: this.formatOptions.month,
242-
},
243-
});
221+
private get _monthOptions(): Intl.DateTimeFormatOptions {
222+
return { month: this.formatOptions.month };
244223
}
245224

225+
private _monthLabelOptions: Intl.DateTimeFormatOptions = { month: 'long' };
226+
private _weekdayOptions: Intl.DateTimeFormatOptions = { weekday: 'short' };
227+
private _monthDayOptions: Intl.DateTimeFormatOptions = {
228+
month: 'short',
229+
day: 'numeric',
230+
};
231+
private _yearLabelOptions: Intl.DateTimeFormatOptions = {
232+
month: 'long',
233+
year: 'numeric',
234+
};
235+
246236
/** @private @hidden @internal */
247237
public async [focusActiveDate](options?: FocusOptions) {
248238
await this.updateComplete;
@@ -462,23 +452,34 @@ export default class IgcCalendarComponent extends EventEmitterMixin<
462452
active: CalendarDay,
463453
viewIndex: number
464454
) {
465-
const labelFmt = this._intl.get('monthLabel').format;
466-
const valueFmt = this._intl.get('month').format;
467-
const ariaLabel = `${labelFmt(active.native)}, ${this.resourceStrings.selectMonth}`;
455+
const label = getDateFormatter().formatDateTime(
456+
active.native,
457+
this.locale,
458+
this._monthLabelOptions
459+
);
460+
const value = getDateFormatter().formatDateTime(
461+
active.native,
462+
this.locale,
463+
this._monthOptions
464+
);
465+
const ariaLabel = `${label}, ${this.resourceStrings.selectMonth}`;
468466

469467
return html`
470468
<button
471469
part="months-navigation"
472470
aria-label=${ariaLabel}
473471
@click=${() => this.switchToMonths(viewIndex)}
474472
>
475-
${valueFmt(active.native)}
473+
${value}
476474
</button>
477475
`;
478476
}
479477

480478
protected renderYearButtonNavigation(active: CalendarDay, viewIndex: number) {
481-
const fmt = this._intl.get('yearLabel').format;
479+
const fmt = getDateFormatter().getIntlFormatter(
480+
this.locale,
481+
this._yearLabelOptions
482+
).format;
482483
const ariaLabel = `${active.year}, ${this.resourceStrings.selectYear}`;
483484
const ariaSkip = this._isDayView ? fmt(active.native) : active.year;
484485

@@ -548,19 +549,30 @@ export default class IgcCalendarComponent extends EventEmitterMixin<
548549

549550
protected renderHeaderDateSingle() {
550551
const date = this.value ?? CalendarDay.today.native;
551-
const day = this._intl.get('weekday').format(date);
552-
const month = this._intl.get('monthDay').format(date);
552+
const weekday = getDateFormatter().formatDateTime(
553+
date,
554+
this.locale,
555+
this._weekdayOptions
556+
);
557+
const monthDay = getDateFormatter().formatDateTime(
558+
date,
559+
this.locale,
560+
this._monthDayOptions
561+
);
553562
const separator =
554563
this.headerOrientation === 'vertical' ? html`<br />` : ' ';
555564

556-
const formatted = html`${day},${separator}${month}`;
565+
const formatted = html`${weekday},${separator}${monthDay}`;
557566

558567
return html`<slot name="header-date">${formatted}</slot>`;
559568
}
560569

561570
protected renderHeaderDateRange() {
562571
const values = this.values;
563-
const fmt = this._intl.get('monthDay').format;
572+
const fmt = getDateFormatter().getIntlFormatter(
573+
this.locale,
574+
this._monthDayOptions
575+
).format;
564576
const { startDate, endDate } = this.resourceStrings;
565577

566578
const start = this._hasValues ? fmt(first(values)) : startDate;

src/components/calendar/days-view/days-view.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
import { getDateFormatter } from 'igniteui-i18n-core';
12
import { html, nothing } from 'lit';
23
import { property, query, state } from 'lit/decorators.js';
3-
44
import { addThemingController } from '../../../theming/theming-controller.js';
55
import { addKeybindings } from '../../common/controllers/key-bindings.js';
66
import { blazorIndirectRender } from '../../common/decorators/blazorIndirectRender.js';
77
import { blazorSuppressComponent } from '../../common/decorators/blazorSuppressComponent.js';
88
import { watch } from '../../common/decorators/watch.js';
99
import { registerComponent } from '../../common/definitions/register.js';
10-
import { createDateTimeFormatters } from '../../common/localization/intl-formatters.js';
1110
import type { Constructor } from '../../common/mixins/constructor.js';
1211
import { EventEmitterMixin } from '../../common/mixins/event-emitter.js';
1312
import { partMap } from '../../common/part-map.js';
@@ -107,21 +106,17 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
107106
@property({ attribute: 'week-day-format' })
108107
public weekDayFormat: 'long' | 'short' | 'narrow' = 'narrow';
109108

110-
private _intl = createDateTimeFormatters(this.locale, {
111-
weekday: { weekday: this.weekDayFormat },
112-
label: { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' },
113-
ariaWeekday: { weekday: 'long' },
114-
});
115-
116-
@watch('locale')
117-
protected localeChange() {
118-
this._intl.locale = this.locale;
109+
private get _weekdayOptions(): Intl.DateTimeFormatOptions {
110+
return { weekday: this.weekDayFormat };
119111
}
120112

121-
@watch('weekDayFormat')
122-
protected weekDayFormatChange() {
123-
this._intl.update({ weekday: { weekday: this.weekDayFormat } });
124-
}
113+
private _labelOptions: Intl.DateTimeFormatOptions = {
114+
weekday: 'long',
115+
year: 'numeric',
116+
month: 'long',
117+
day: 'numeric',
118+
};
119+
private _ariaWeekdayOptions: Intl.DateTimeFormatOptions = { weekday: 'long' };
125120

126121
@watch('weekStart')
127122
@watch('activeDate')
@@ -336,7 +331,10 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
336331
}
337332

338333
private intlFormatDay(day: CalendarDay) {
339-
const fmt = this._intl.get('label');
334+
const fmt = getDateFormatter().getIntlFormatter(
335+
this.locale,
336+
this._labelOptions
337+
);
340338

341339
// Range selection in progress
342340
if (this._rangePreviewDate?.equalTo(day)) {
@@ -444,8 +442,14 @@ export default class IgcDaysViewComponent extends EventEmitterMixin<
444442
}
445443

446444
protected renderHeaders() {
447-
const label = this._intl.get('weekday');
448-
const aria = this._intl.get('ariaWeekday');
445+
const label = getDateFormatter().getIntlFormatter(
446+
this.locale,
447+
this._weekdayOptions
448+
);
449+
const aria = getDateFormatter().getIntlFormatter(
450+
this.locale,
451+
this._ariaWeekdayOptions
452+
);
449453
const days = take(
450454
generateMonth(this._activeDate, this._firstDayOfWeek),
451455
daysInWeek

0 commit comments

Comments
 (0)