dap-design-system 0.54.3 → 0.54.5

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.
@@ -20,6 +20,7 @@ export default class ComboboxBaseElement extends GenericFormElement {
20
20
  noAnimation?: boolean;
21
21
  textComplete?: boolean;
22
22
  openOnEmpty?: boolean;
23
+ disableViewportAutoClose: boolean;
23
24
  searchButtonAriaLabel?: string;
24
25
  subtle: boolean;
25
26
  multiselect: boolean;
@@ -85,10 +86,13 @@ export default class ComboboxBaseElement extends GenericFormElement {
85
86
  set value(val: string | undefined);
86
87
  handleListKeyDown: (event: CustomEvent) => void;
87
88
  handleDocumentMouseDown: (event: MouseEvent) => void;
89
+ private readonly handlePopupAutoClose;
88
90
  handleFocus: () => void;
89
91
  handleBlur: () => void;
90
92
  showDropDown(): Promise<void>;
91
- hideDropDown(): Promise<void>;
93
+ hideDropDown(options?: {
94
+ skipFocus?: boolean;
95
+ }): Promise<void>;
92
96
  get focusElement(): HTMLInputElement;
93
97
  handleSelectedChange: (event: CustomEvent) => Promise<void>;
94
98
  handleOptionDeselect: (event: CustomEvent) => void;
@@ -35,8 +35,11 @@ export default class DapDSCommand extends DapDSPopup {
35
35
  private handleClick;
36
36
  private handleDocumentMouseDown;
37
37
  showDropDown(): Promise<void>;
38
- hideDropDown(): Promise<void>;
38
+ hideDropDown(options?: {
39
+ skipFocus?: boolean;
40
+ }): Promise<void>;
39
41
  private _handleFocusOut;
42
+ private _handlePopupAutoClose;
40
43
  focus(): void;
41
44
  private _handleTriggerChange;
42
45
  private _handleDefaultSlotChange;
@@ -154,6 +154,8 @@ export default class DapDSDatePicker extends GenericFormElement {
154
154
  clearButtonAriaLabel?: string;
155
155
  /** The floating strategy of the datepicker. */
156
156
  floatingStrategy: FloatingStrategy;
157
+ /** Whether to keep popup open when trigger leaves viewport. */
158
+ disableViewportAutoClose: boolean;
157
159
  /** The locale of the datepicker. By default it uses the global locale from dayjs. It is determined from the browser language.
158
160
  * @type {'hu' | 'en' | 'de'}
159
161
  */
@@ -180,13 +182,16 @@ export default class DapDSDatePicker extends GenericFormElement {
180
182
  setValue(value?: Dayjs, setInputValue?: boolean, sendEmptyEventOnInput?: boolean): void;
181
183
  clearSelection(): Promise<void>;
182
184
  private readonly handleDocumentMouseDown;
185
+ private readonly handlePopupAutoClose;
183
186
  private readonly handleInput;
184
187
  private readonly handleKeyDown;
185
188
  get focusElement(): HTMLInputElement;
186
189
  private readonly handleClick;
187
190
  private readonly handleClearClick;
188
191
  showCalendar(): Promise<void>;
189
- hideCalendar(): Promise<void>;
192
+ hideCalendar(options?: {
193
+ skipFocus?: boolean;
194
+ }): Promise<void>;
190
195
  private readonly handleFocus;
191
196
  private readonly handleBlur;
192
197
  getValidity(): boolean;
@@ -38,6 +38,8 @@ export default class PopupBaseElement extends PopupBaseElement_base {
38
38
  overflow: boolean;
39
39
  /** Whether the popup should take full width of the screen. */
40
40
  fullWidth: boolean;
41
+ /** Whether to keep popup open when trigger leaves viewport. */
42
+ disableViewportAutoClose: boolean;
41
43
  connectedCallback(): Promise<void>;
42
44
  protected firstUpdated(changedProps: Map<string, unknown>): void;
43
45
  updated(changedProps: Map<string, unknown>): Promise<void>;
@@ -17,6 +17,7 @@ import { default as PopupBaseElement } from './popup-base-element';
17
17
  * @property {boolean} hasArrow - Whether the popup has an arrow.
18
18
  * @property {boolean} overflow - Whether the popup should overflow.
19
19
  * @property {boolean} fullWidth - Whether the popup should take full width of the screen.
20
+ * @property {boolean} disableViewportAutoClose - Keep popup open when trigger leaves viewport.
20
21
  *
21
22
  * @event {{ void }} dds-opened - Fired when the popup is opened.
22
23
  * @event {{ void }} dds-closed - Fired when the popup is closed.
@@ -113,6 +113,8 @@ export default class DapDSSelect extends GenericFormElement {
113
113
  * @type {'absolute' | 'fixed'}
114
114
  */
115
115
  floatingStrategy: FloatingStrategy;
116
+ /** Whether to keep popup open when trigger leaves viewport. */
117
+ disableViewportAutoClose: boolean;
116
118
  /**
117
119
  * @ignore
118
120
  */
@@ -129,11 +131,14 @@ export default class DapDSSelect extends GenericFormElement {
129
131
  private readonly handleKeyDown;
130
132
  private readonly handleListKeyDown;
131
133
  private readonly handleDocumentMouseDown;
134
+ private readonly handlePopupAutoClose;
132
135
  private readonly handleFocus;
133
136
  private readonly handleBlur;
134
137
  formResetCallback(): void;
135
138
  showDropDown(key?: string): Promise<void>;
136
- hideDropDown(): Promise<void>;
139
+ hideDropDown(options?: {
140
+ skipFocus?: boolean;
141
+ }): Promise<void>;
137
142
  get focusElement(): HTMLButtonElement;
138
143
  /**
139
144
  * Get the active descendant element for aria-activedescendant
@@ -144,6 +144,8 @@ export default class DapDSTimePicker extends GenericFormElement {
144
144
  clearButtonAriaLabel?: string;
145
145
  /** The floating strategy of the timepicker. */
146
146
  floatingStrategy: FloatingStrategy;
147
+ /** Whether to keep popup open when trigger leaves viewport. */
148
+ disableViewportAutoClose: boolean;
147
149
  /** The locale of the timepicker. By default it uses the global locale from dayjs.
148
150
  * @type {'hu' | 'en' | 'de'}
149
151
  */
@@ -199,6 +201,7 @@ export default class DapDSTimePicker extends GenericFormElement {
199
201
  setValue(value?: Dayjs, setInputValue?: boolean, sendEmptyEventOnInput?: boolean): void;
200
202
  clearSelection(): Promise<void>;
201
203
  private readonly handleDocumentMouseDown;
204
+ private readonly handlePopupAutoClose;
202
205
  private readonly handleInput;
203
206
  private readonly handleKeyDown;
204
207
  get focusElement(): HTMLInputElement;
@@ -206,7 +209,9 @@ export default class DapDSTimePicker extends GenericFormElement {
206
209
  private readonly handleClearClick;
207
210
  private readonly handleTimeChange;
208
211
  showTimePicker(): Promise<void>;
209
- hideTimePicker(): Promise<void>;
212
+ hideTimePicker(options?: {
213
+ skipFocus?: boolean;
214
+ }): Promise<void>;
210
215
  private readonly handleFocus;
211
216
  private readonly handleBlur;
212
217
  private readonly handlePopupOpened;
@@ -44,6 +44,8 @@ export default class DapDSTooltip extends DdsElement {
44
44
  * @type { 'absolute' | 'fixed' }
45
45
  */
46
46
  floatingStrategy: 'absolute' | 'fixed';
47
+ /** Whether to keep popup open when trigger leaves viewport. */
48
+ disableViewportAutoClose: boolean;
47
49
  private _trigger;
48
50
  /** Sets custom trigger event (hover, focus, click). Default is `hover focus`. */
49
51
  set trigger(value: string);