dap-design-system 0.45.0 → 0.45.2

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.
@@ -2,6 +2,7 @@ import { ColumnDef } from '@tanstack/lit-table';
2
2
  import { CSSResult } from 'lit';
3
3
  import { Dayjs } from 'dayjs';
4
4
  import { default as default_2 } from 'dayjs';
5
+ import { default as i18next } from 'i18next';
5
6
  import { LitElement } from 'lit';
6
7
  import { nothing } from 'lit';
7
8
  import { PaginationState } from '@tanstack/lit-table';
@@ -1234,7 +1235,7 @@ export declare class DapDSCalendar extends DdsElement {
1234
1235
  */
1235
1236
  disabledDate: (date: Dayjs) => boolean;
1236
1237
  /** The locale of the calendar.
1237
- * @type {string}
1238
+ * @type {'hu' | 'en' | 'de'}
1238
1239
  * @default dayjs.locale()
1239
1240
  */
1240
1241
  locale: string;
@@ -2687,7 +2688,7 @@ export declare class DapDSDatePicker extends GenericFormElement {
2687
2688
  /** The floating strategy of the datepicker. */
2688
2689
  floatingStrategy: FloatingStrategy;
2689
2690
  /** The locale of the datepicker. By default it uses the global locale from dayjs. It is determined from the browser language.
2690
- * @type {'hu' | 'en'}
2691
+ * @type {'hu' | 'en' | 'de'}
2691
2692
  */
2692
2693
  locale: string;
2693
2694
  /** Whether to hide dates from adjacent months (previous/next) in the calendar grid. When not explicitly set, defaults to `false` for single mode and `true` for range mode.
@@ -4272,17 +4273,32 @@ declare const DapDSOptionList_base: typeof DdsElement & {
4272
4273
  * @element dap-ds-overlay
4273
4274
  * @title - Overlay
4274
4275
  *
4276
+ * @property {boolean} open - The open state of the overlay.
4277
+ *
4278
+ * @event {CustomEvent} dds-before-open - Fires before the overlay opens.
4279
+ * @event {CustomEvent} dds-opened - Fires after the overlay opens.
4280
+ * @event {CustomEvent} dds-before-close - Fires before the overlay closes.
4281
+ * @event {CustomEvent} dds-closed - Fires after the overlay closes.
4282
+ *
4283
+ * @slot - The content of the overlay.
4284
+ *
4275
4285
  * @csspart overlay - The overlay element
4276
4286
  *
4277
4287
  * @cssproperty --dds-overlay-z-index - Controls the z-index of the overlay (default: 1)
4278
4288
  * @cssproperty --dds-overlay-background-color - Controls the background color of the overlay (default: var(--dds-black-10))
4279
4289
  * @cssproperty --dds-overlay-opacity-closed - Controls the opacity when overlay is closed (default: 0)
4280
4290
  * @cssproperty --dds-overlay-opacity-open - Controls the opacity when overlay is open (default: 1)
4291
+ * @cssproperty --dds-overlay-transition-duration - Controls the transition duration (default: var(--dds-transition-fast))
4292
+ * @cssproperty --dds-overlay-transition-timing - Controls the transition timing function (default: var(--dds-easing-ease-in-out))
4281
4293
  */
4282
4294
  export declare class DapDSOverlay extends DdsElement {
4283
4295
  /** The open state of the overlay. */
4284
- open?: boolean;
4296
+ open: boolean;
4285
4297
  static readonly styles: CSSResult;
4298
+ connectedCallback(): void;
4299
+ protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
4300
+ private handleOpen;
4301
+ private handleClose;
4286
4302
  render(): TemplateResult_2<1>;
4287
4303
  }
4288
4304
 
@@ -4358,10 +4374,10 @@ export declare class DapDSPager extends DdsElement {
4358
4374
  nextButtonLabel: string;
4359
4375
  /** The last button label. */
4360
4376
  lastButtonLabel: string;
4361
- /** The function to determine the pager text
4377
+ /** The function to determine the pager text. If not provided, uses default reactive translation.
4362
4378
  * @type {Function}
4363
4379
  */
4364
- pageStateText: (pageIndex: number, pageSize: number, totalRows: number) => string;
4380
+ pageStateText?: (pageIndex: number, pageSize: number, totalRows: number) => unknown;
4365
4381
  static readonly styles: CSSResult;
4366
4382
  protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
4367
4383
  private updatePageIndex;
@@ -5067,6 +5083,9 @@ export declare class DapDSSelect extends GenericFormElement {
5067
5083
  */
5068
5084
  selectedItem: any;
5069
5085
  static readonly styles: CSSResult;
5086
+ private languageChangeHandler;
5087
+ connectedCallback(): void;
5088
+ disconnectedCallback(): void;
5070
5089
  /**
5071
5090
  * Lifecycle method to handle property changes
5072
5091
  */
@@ -5083,6 +5102,8 @@ export declare class DapDSSelect extends GenericFormElement {
5083
5102
  get focusElement(): HTMLButtonElement;
5084
5103
  get validity(): ValidityState;
5085
5104
  get validationMessage(): string;
5105
+ /** Get the current display text for the selected item, dynamically fetching from the option */
5106
+ get selectedDisplayText(): string | null;
5086
5107
  checkValidity(): boolean;
5087
5108
  reportValidity(): boolean;
5088
5109
  setValidity(): void;
@@ -6175,7 +6196,7 @@ export declare class DapDSTimePicker extends GenericFormElement {
6175
6196
  /** The floating strategy of the timepicker. */
6176
6197
  floatingStrategy: FloatingStrategy;
6177
6198
  /** The locale of the timepicker. By default it uses the global locale from dayjs.
6178
- * @type {'hu' | 'en'}
6199
+ * @type {'hu' | 'en' | 'de'}
6179
6200
  */
6180
6201
  locale: string;
6181
6202
  /** Whether the dropdown should close when a time is selected. */
@@ -6934,6 +6955,8 @@ export declare class HttpError extends Error {
6934
6955
  constructor(message: string, response: any, status: number);
6935
6956
  }
6936
6957
 
6958
+ export { i18next }
6959
+
6937
6960
  declare type IconSize = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
6938
6961
 
6939
6962
  declare class InputBaseElement extends GenericFormElement {