@fluid-topics/ftds-period-picker 2.2.16 → 2.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,7 @@ export declare class FtdsPeriodPickerInSelect extends FtdsPeriodPickerInSelect_b
41
41
  private resizeObserver?;
42
42
  get displayValue(): string;
43
43
  constructor();
44
+ focus(): void;
44
45
  closeOnEscape(event: KeyboardEvent): void;
45
46
  connectedCallback(): void;
46
47
  disconnectedCallback(): void;
@@ -41,6 +41,10 @@ export class FtdsPeriodPickerInSelect extends withI18n(toFtInput(FtdsBase)) {
41
41
  this.isMenuOpen = false;
42
42
  this.addI18nContext(ftPeriodI18nContext, periodPickerDefaultMessages);
43
43
  }
44
+ focus() {
45
+ var _a;
46
+ (_a = this.periodPickerTriggerButton) === null || _a === void 0 ? void 0 : _a.focus();
47
+ }
44
48
  closeOnEscape(event) {
45
49
  var _a, _b;
46
50
  if (event.key === "Escape") {
@@ -1,12 +1,12 @@
1
1
  import { PropertyValues } from "lit";
2
- import { FtdsBase } from "@fluid-topics/ft-wc-utils";
2
+ import { FtdsBase, FtInputChangeEvent } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtdsPeriodPickerDateInputsVisibility, FtdsPeriodPickerProperties, FtPeriod, FtPeriodPickerConfigOption, FtPeriodPickerOption, FtPeriodSelection } from "./ftds-period-picker.properties";
4
4
  import { FtdsRadio, FtdsRadioGroup } from "@fluid-topics/ftds-radio";
5
5
  import { FtdsTextInput } from "@fluid-topics/ftds-text-input";
6
6
  import { FtdsIcon } from "@fluid-topics/ftds-icon";
7
7
  import { FtdsFloatingMenu } from "@fluid-topics/ftds-floating-menu";
8
8
  import { FtdsButton } from "@fluid-topics/ftds-button";
9
- export declare class FtPeriodChangeEvent extends CustomEvent<FtPeriodSelection> {
9
+ export declare class FtPeriodChangeEvent extends FtInputChangeEvent<FtPeriodSelection> {
10
10
  constructor(detail: FtPeriodSelection);
11
11
  }
12
12
  declare const FtdsPeriodPicker_base: typeof FtdsBase & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-wc-utils").FtInputInterface<FtPeriod>> & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
@@ -36,6 +36,7 @@ export declare class FtdsPeriodPicker extends FtdsPeriodPicker_base implements F
36
36
  constructor();
37
37
  protected willUpdate(props: PropertyValues): void;
38
38
  protected firstUpdated(props: PropertyValues): void;
39
+ focus(): void;
39
40
  protected render(): import("lit-html").TemplateResult<1>;
40
41
  protected renderRadioOptions(): import("lit-html").TemplateResult<1>;
41
42
  protected renderDateInputs(): import("lit-html").TemplateResult<1>;
@@ -8,7 +8,7 @@ import { html, } from "lit";
8
8
  import { property, query, state, } from "lit/decorators.js";
9
9
  import { when } from "lit/directives/when.js";
10
10
  import { repeat } from "lit/directives/repeat.js";
11
- import { DateFormatter, dateProperty, FtdsBase, toFtInput, } from "@fluid-topics/ft-wc-utils";
11
+ import { DateFormatter, dateProperty, FtdsBase, FtInputChangeEvent, toFtInput, } from "@fluid-topics/ft-wc-utils";
12
12
  import { i18n, withI18n, } from "@fluid-topics/ft-i18n";
13
13
  import { FtdsPeriodPickerDateInputsVisibility, } from "./ftds-period-picker.properties";
14
14
  import { styles } from "./ftds-period-picker.styles";
@@ -19,9 +19,9 @@ import { FtdsTextInput } from "@fluid-topics/ftds-text-input";
19
19
  import { FtdsIcon } from "@fluid-topics/ftds-icon";
20
20
  import { FtdsFloatingMenu } from "@fluid-topics/ftds-floating-menu";
21
21
  import { FtdsButton } from "@fluid-topics/ftds-button";
22
- export class FtPeriodChangeEvent extends CustomEvent {
22
+ export class FtPeriodChangeEvent extends FtInputChangeEvent {
23
23
  constructor(detail) {
24
- super("change", { detail });
24
+ super(detail);
25
25
  }
26
26
  }
27
27
  export class FtdsPeriodPicker extends withI18n(toFtInput(FtdsBase)) {
@@ -74,6 +74,10 @@ export class FtdsPeriodPicker extends withI18n(toFtInput(FtdsBase)) {
74
74
  this.updatePeriodInputs();
75
75
  }
76
76
  }
77
+ focus() {
78
+ var _a;
79
+ (_a = this.ftdsRadioGroup) === null || _a === void 0 ? void 0 : _a.focus();
80
+ }
77
81
  render() {
78
82
  var _a;
79
83
  return html `