dap-design-system 0.15.1 → 0.15.3

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.
package/dist/dds.d.ts CHANGED
@@ -7,7 +7,9 @@ import { PropertyValueMap } from 'lit';
7
7
  import { TemplateResult } from 'lit';
8
8
  import { TemplateResult as TemplateResult_2 } from 'lit-html';
9
9
 
10
- declare type Alignment = 'vertical' | 'horizontal';
10
+ export declare type Alignment = 'vertical' | 'horizontal';
11
+
12
+ export declare const anchorClass = "dds-anchor";
11
13
 
12
14
  /**
13
15
  * `dap-ds-icon-arrow-down-line`
@@ -489,7 +491,7 @@ export declare class ArrowsExpandUpDownFill extends DdsElement {
489
491
  render(): TemplateResult_2;
490
492
  }
491
493
 
492
- declare type BackgroundShade = 'subtle' | 'base' | 'medium' | 'strong';
494
+ export declare type BackgroundShade = 'subtle' | 'base' | 'medium' | 'strong';
493
495
 
494
496
  declare type BadgeType = 'neutral' | 'brand' | 'info' | 'positive' | 'warning' | 'negative';
495
497
 
@@ -624,7 +626,7 @@ declare class ComboboxBaseElement extends GenericFormElement {
624
626
  handleBlur: () => void;
625
627
  showDropDown(): Promise<void>;
626
628
  hideDropDown(): Promise<void>;
627
- get focusElement(): void;
629
+ get focusElement(): HTMLInputElement;
628
630
  handleSelectedChange: (event: CustomEvent) => Promise<void>;
629
631
  handleCurrentOptionChange: (event: CustomEvent) => void;
630
632
  handleListChanged: (event: CustomEvent) => void;
@@ -643,11 +645,13 @@ declare class ComboboxBaseElement extends GenericFormElement {
643
645
  renderCombobox(): TemplateResult_2;
644
646
  }
645
647
 
646
- declare type Common<T> = Pick<T, keyof T>;
648
+ export declare type Common<T> = Pick<T, keyof T>;
649
+
650
+ export declare type CommonFormElementSize = Extract<Size, 'sm' | 'md' | 'lg'>;
647
651
 
648
- declare type CommonSize = Extract<Size, 'sm' | 'lg'>;
652
+ export declare type CommonSize = Extract<Size, 'sm' | 'lg'>;
649
653
 
650
- declare type CSSFlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
654
+ export declare type CSSFlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
651
655
 
652
656
  /**
653
657
  * `dap-ds-accordion` is a custom accordion component.
@@ -794,12 +798,14 @@ export declare class DapDSBadge extends DdsElement {
794
798
  * @csspart title - The title of the banner.
795
799
  */
796
800
  export declare class DapDSBanner extends DdsElement {
801
+ actionSlot: HTMLElement[];
797
802
  variant: BannerVariant;
798
803
  closeable: boolean;
799
804
  opened: string;
800
805
  closeButtonLabel: string;
801
806
  icon: string;
802
807
  static styles: CSSResult;
808
+ protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
803
809
  private onCloseClick;
804
810
  render(): TemplateResult_2 | typeof nothing;
805
811
  }
@@ -1231,7 +1237,7 @@ declare const DapDSCardTitle_base: typeof DdsElement & {
1231
1237
  * @attribute {string} ariaLabelCheckbox - The aria label of the checkbox.
1232
1238
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
1233
1239
  * @attribute {string} feedback - The feedback of the checkbox.
1234
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the checkbox. Can be `info`, `success`, or `error`.
1240
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the checkbox. Can be `negative`, `positive`, or `warning`.
1235
1241
  * @attribute {boolean} invalid - The invalid state of the checkbox.
1236
1242
  * @attribute {boolean} optional - The optional state of the checkbox.
1237
1243
  * @attribute {string} optionalLabel - The optional label of the checkbox.
@@ -1377,7 +1383,7 @@ export declare class DapDSContentSwitcherItem extends DdsElement {
1377
1383
  * @attribute {boolean} readonly - The readonly state of the input. Default is false.
1378
1384
  * @attribute {boolean} autofocus - The autofocus state of the input. Default is false.
1379
1385
  * @attribute {string} feedback - The feedback of the input.
1380
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the input. Can be `info`, `success`, or `error`.
1386
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
1381
1387
  * @attribute {boolean} loading - The loading state of the input. Default is false.
1382
1388
  * @attribute {boolean} optional - The optional state of the input.
1383
1389
  * @attribute {string} optionalLabel - The optional label of the input.
@@ -1506,7 +1512,7 @@ export declare class DapDSDatePicker extends GenericFormElement {
1506
1512
  handleDocumentMouseDown: (event: MouseEvent) => void;
1507
1513
  handleInput: (event: InputEvent) => void;
1508
1514
  handleKeyDown: (event: KeyboardEvent) => Promise<void>;
1509
- get focusElement(): void;
1515
+ get focusElement(): HTMLInputElement;
1510
1516
  handleClick: () => void;
1511
1517
  handleClearClick: () => void;
1512
1518
  showCalendar(): Promise<void>;
@@ -1859,7 +1865,7 @@ export declare class DapDSIconButton extends DdsElement {
1859
1865
  * @attribute {string} inputmode - The inputmode of the input.
1860
1866
  * @attribute {string} pattern - The regex pattern of the input.
1861
1867
  * @attribute {string} feedback - The feedback of the input.
1862
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the input. Can be `info`, `success`, or `error`.
1868
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
1863
1869
  * @attribute {boolean} loading - The loading state of the input. Default is false.
1864
1870
  *
1865
1871
  * @event dds-change - Fired when the input value changes.
@@ -2067,7 +2073,7 @@ export declare class DapDSModal extends ModalBaseElement {
2067
2073
  * @attribute {number} max - The maximum value of the number input.
2068
2074
  * @attribute {number} step - The step value of the number input.
2069
2075
  * @attribute {string} feedback - The feedback of the input.
2070
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the input. Can be `info`, `success`, or `error`.
2076
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
2071
2077
  * @attribute {boolean} loading - The loading state of the input. Default is false.
2072
2078
  * @attribute {boolean} optional - The optional state of the input.
2073
2079
  * @attribute {string} optionalLabel - The optional label of the input.
@@ -2238,7 +2244,7 @@ export declare class DapDSOverlay extends DdsElement {
2238
2244
  * @attribute {boolean} readonly - The readonly state of the password input. Default is false.
2239
2245
  * @attribute {boolean} autofocus - The autofocus state of the password input. Default is false.
2240
2246
  * @attribute {string} feedback - The feedback of the input.
2241
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the password input. Can be `info`, `success`, or `error`.
2247
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
2242
2248
  * @attribute {boolean} loading - The loading state of the password input. Default is false.
2243
2249
  * @attribute {boolean} optional - The optional state of the password input.
2244
2250
  * @attribute {string} optionalLabel - The optional label of the password input.
@@ -2337,9 +2343,10 @@ export declare class DapDSPopup extends DdsElement {
2337
2343
  */
2338
2344
  export declare class DapDSRadioButton extends LabelPositionedFormElement {
2339
2345
  input: HTMLInputElement;
2346
+ focusable: boolean;
2340
2347
  static styles: CSSResult;
2341
2348
  private handleClick;
2342
- get focusElement(): void;
2349
+ get focusElement(): HTMLInputElement;
2343
2350
  render(): TemplateResult_2;
2344
2351
  }
2345
2352
 
@@ -2362,7 +2369,7 @@ export declare class DapDSRadioButton extends LabelPositionedFormElement {
2362
2369
  * @attribute {string} description - The description of the radio group.
2363
2370
  * @attribute {string} tooltip - The tooltip of the radio group.
2364
2371
  * @attribute {string} feedback - The feedback of the radio group.
2365
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the radio group. Can be `info`, `success`, or `error`.
2372
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the radio group. Can be `negative`, `positive`, or `warning`.
2366
2373
  * @attribute {boolean} optional - The optional state of the radio group.
2367
2374
  * @attribute {string} optionalLabel - Text of optional label.
2368
2375
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
@@ -2378,14 +2385,17 @@ export declare class DapDSRadioButton extends LabelPositionedFormElement {
2378
2385
  * @csspart container - The container of the radio group items.
2379
2386
  */
2380
2387
  export declare class DapDSRadioGroup extends GenericFormElement {
2388
+ hiddenInput: HTMLInputElement;
2381
2389
  optionalLabel: string;
2382
2390
  static styles: CSSResult;
2391
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
2383
2392
  private _handleSlotChange;
2384
2393
  private getAllRadios;
2385
2394
  private syncRadioElements;
2386
2395
  private handleRadioClick;
2387
2396
  private handleKeyDown;
2388
2397
  setValidity(): void;
2398
+ get validationMessage(): string;
2389
2399
  checkValidity(): boolean;
2390
2400
  get validity(): {
2391
2401
  valid: boolean;
@@ -2400,8 +2410,9 @@ export declare class DapDSRadioGroup extends GenericFormElement {
2400
2410
  tooShort: boolean;
2401
2411
  typeMismatch: boolean;
2402
2412
  };
2413
+ reportValidity(): boolean;
2403
2414
  handleLabelClick(): void;
2404
- attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
2415
+ handleInvalid(event: Event): void;
2405
2416
  render(): TemplateResult_2;
2406
2417
  private _renderFeedback;
2407
2418
  }
@@ -2484,7 +2495,7 @@ export declare class DapDSSearch extends ComboboxBaseElement {
2484
2495
  * @attribute {boolean} loading - Whether the select is loading.
2485
2496
  * @attribute {number} maxHeight - The max height of the floating dropdown.
2486
2497
  * @attribute {string} feedback - The feedback of the select.
2487
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the select. Can be `info`, `success`, or `error`.
2498
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the select. Can be `negative`, `positive`, or `warning`.
2488
2499
  * @attribute {boolean} isMobile - Whether the select is in mobile mode.
2489
2500
  * @attribute {string} status - The status of the select. Can be `success` or `error`.
2490
2501
  * @attribute {boolean} optional - The optional state of the select.
@@ -2522,7 +2533,7 @@ export declare class DapDSSelect extends GenericFormElement {
2522
2533
  handleBlur: () => void;
2523
2534
  showDropDown(key?: string): Promise<void>;
2524
2535
  hideDropDown(): Promise<void>;
2525
- get focusElement(): void;
2536
+ get focusElement(): HTMLButtonElement;
2526
2537
  get validity(): ValidityState;
2527
2538
  get validationMessage(): string;
2528
2539
  checkValidity(): boolean;
@@ -2630,7 +2641,7 @@ export declare class DapDSStack extends DdsElement {
2630
2641
  * @attribute {string} ariaLabelCheckbox - The aria label of the checkbox.
2631
2642
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
2632
2643
  * @attribute {string} feedback - The feedback of the switch.
2633
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the switch. Can be `info`, `success`, or `error`.
2644
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the switch. Can be `negative`, `positive`, or `warning`.
2634
2645
  * @attribute {boolean} optional - The optional state of the switch.
2635
2646
  * @attribute {string} optionalLabel - The optional label of the switch.
2636
2647
  *
@@ -2810,7 +2821,7 @@ export declare class DapDSTableRow extends DdsElement {
2810
2821
  * @attribute {string} description - The description of the textarea.
2811
2822
  * @attribute {'hard' | 'soft'} wrap - Indicates how the control should wrap the value for form submission. Can be `hard` or `soft`.
2812
2823
  * @attribute {string} feedback - The feedback of the textarea.
2813
- * @attribute {'info' | 'success' | 'error'} feedbackType - The feedback type of the textarea. Can be `info`, `success`, or `error`.
2824
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the textarea. Can be `negative`, `positive`, or `warning`.
2814
2825
  * @attribute {boolean} optional - The optional state of the textarea.
2815
2826
  * @attribute {string} optionalLabel - The optional label of the textarea.
2816
2827
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
@@ -2933,7 +2944,7 @@ export declare class DapDSTooltip extends DdsElement {
2933
2944
  content: string;
2934
2945
  placement: PopupPlacement;
2935
2946
  opened?: boolean | undefined;
2936
- mode?: TooltipMode;
2947
+ mode?: TooltipMode_2;
2937
2948
  noArrow?: boolean | undefined;
2938
2949
  floatingStrategy: 'absolute' | 'fixed';
2939
2950
  private _trigger;
@@ -3103,13 +3114,17 @@ export declare type DdsUploadStartEvent = CustomEvent<Record<PropertyKey, never>
3103
3114
 
3104
3115
  export declare type DdsValidDateEvent = CustomEvent<Record<PropertyKey, never>>;
3105
3116
 
3106
- declare type DescriptionPlacement = Extract<Placement, 'top' | 'bottom'>;
3117
+ export declare type DescriptionPlacement = Extract<Placement, 'top' | 'bottom'>;
3107
3118
 
3108
3119
  declare type DescriptionProps = {
3109
3120
  variant: Extract<TypographyVariant, 'description'>;
3110
3121
  size: Extract<TypographySize, 'lg' | 'sm'>;
3111
3122
  };
3112
3123
 
3124
+ declare type DisableableElement = HTMLElement & {
3125
+ disabled?: boolean;
3126
+ };
3127
+
3113
3128
  /**
3114
3129
  * `dap-ds-icon-clipboard-line`
3115
3130
  * @summary An icon
@@ -3182,6 +3197,12 @@ declare interface EventOptions {
3182
3197
 
3183
3198
  declare type FeedbackType = 'negative' | 'positive' | 'warning';
3184
3199
 
3200
+ export declare class FileError extends Error {
3201
+ file: File;
3202
+ type: string;
3203
+ constructor(message: string, file: File, type: string);
3204
+ }
3205
+
3185
3206
  declare type FileListElement = {
3186
3207
  name: string;
3187
3208
  type: string;
@@ -3189,11 +3210,15 @@ declare type FileListElement = {
3189
3210
  lastModified: number;
3190
3211
  };
3191
3212
 
3192
- declare type FloatingStrategy = 'absolute' | 'fixed';
3213
+ export declare type FloatingStrategy = 'absolute' | 'fixed';
3193
3214
 
3194
3215
  declare interface FocusableElementInterface {
3195
3216
  disabled: boolean;
3196
3217
  autofocus: boolean;
3218
+ focusElement: DisableableElement;
3219
+ focus(options?: FocusOptions): void;
3220
+ blur(): void;
3221
+ click(): void;
3197
3222
  }
3198
3223
 
3199
3224
  declare interface FormElementInterface {
@@ -3244,7 +3269,7 @@ declare type Heading = {
3244
3269
  text: any;
3245
3270
  };
3246
3271
 
3247
- declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3272
+ export declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3248
3273
 
3249
3274
  declare type HeadingProps = {
3250
3275
  variant: Extract<TypographyVariant, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
@@ -3257,6 +3282,12 @@ declare type HtmlButtonType = 'button' | 'submit' | 'reset';
3257
3282
 
3258
3283
  declare type HtmlButtonType_2 = 'button' | 'submit' | 'reset';
3259
3284
 
3285
+ export declare class HttpError extends Error {
3286
+ response: any;
3287
+ status: number;
3288
+ constructor(message: string, response: any, status: number);
3289
+ }
3290
+
3260
3291
  declare type IconSize = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3261
3292
 
3262
3293
  declare class InputBaseElement extends GenericFormElement {
@@ -3297,9 +3328,9 @@ declare class InputBaseElement extends GenericFormElement {
3297
3328
  private _renderFeedback;
3298
3329
  }
3299
3330
 
3300
- declare type InputStatus = 'success' | 'error';
3331
+ export declare type InputStatus = 'success' | 'error';
3301
3332
 
3302
- declare type InputTypes = 'text' | 'number' | 'button' | 'color' | 'email' | 'hidden' | 'reset' | 'submit' | 'url' | 'password' | 'file';
3333
+ export declare type InputTypes = 'text' | 'number' | 'button' | 'color' | 'email' | 'hidden' | 'reset' | 'submit' | 'url' | 'password' | 'file';
3303
3334
 
3304
3335
  declare interface LabelableElementInterface {
3305
3336
  label?: string;
@@ -3317,7 +3348,7 @@ declare interface LabelableElementInterface {
3317
3348
  renderLabel(content: unknown): unknown;
3318
3349
  }
3319
3350
 
3320
- declare type LabelPlacement = Extract<Placement, 'left' | 'right'>;
3351
+ export declare type LabelPlacement = Extract<Placement, 'left' | 'right'>;
3321
3352
 
3322
3353
  declare interface LabelPositionedElementInterface {
3323
3354
  labelPlacement: LabelPlacement;
@@ -3344,11 +3375,13 @@ declare const LabelPositionedFormElement: {
3344
3375
  prototype: LabelPositionedElementInterface;
3345
3376
  };
3346
3377
 
3378
+ export declare type Layout = 'horizontal' | 'vertical';
3379
+
3347
3380
  declare type LinkSize = Extract<Size, 'lg' | 'md' | 'sm' | 'xs'>;
3348
3381
 
3349
- declare type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
3382
+ export declare type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
3350
3383
 
3351
- declare type LinkVariant = 'neutral' | 'brand' | 'inverted';
3384
+ declare type LinkVariant = 'neutral' | 'brand' | 'inverted' | 'warning';
3352
3385
 
3353
3386
  declare type ListItemStatus = 'brand' | 'neutral' | 'positive' | 'negative';
3354
3387
 
@@ -3417,18 +3450,20 @@ export declare class OthersCookieLine extends DdsElement {
3417
3450
  render(): TemplateResult_2;
3418
3451
  }
3419
3452
 
3420
- declare type Placement = 'top' | 'right' | 'bottom' | 'left' | 'center';
3453
+ export declare type Placement = 'top' | 'right' | 'bottom' | 'left' | 'center';
3421
3454
 
3422
- declare type PopupPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
3455
+ export declare type PopupPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
3423
3456
 
3424
- declare type Size = 'lg' | 'md' | 'sm' | 'xs';
3457
+ export declare type PopupTrigger = 'click' | 'hover' | 'focus' | 'manual' | 'hover focus';
3458
+
3459
+ export declare type Size = 'lg' | 'md' | 'sm' | 'xs';
3425
3460
 
3426
3461
  declare interface SizedElementInterface {
3427
3462
  size: Size;
3428
3463
  parentSized: string;
3429
3464
  }
3430
3465
 
3431
- declare type Spacing = 0 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 1000 | 1200 | 1400 | 1600 | 1800 | 2000 | 2400 | 3000 | 4000 | 5000 | 6000;
3466
+ export declare type Spacing = 0 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 1000 | 1200 | 1400 | 1600 | 1800 | 2000 | 2400 | 3000 | 4000 | 5000 | 6000;
3432
3467
 
3433
3468
  declare type SpinnerVariant = 'neutral' | 'brand' | 'negative' | 'positive' | 'inverted';
3434
3469
 
@@ -4392,7 +4427,9 @@ export declare class SystemSubtractLine2 extends DdsElement {
4392
4427
  render(): TemplateResult_2;
4393
4428
  }
4394
4429
 
4395
- declare type TooltipMode = 'tooltip' | 'toggle';
4430
+ export declare type TooltipMode = 'tooltip' | 'toggle';
4431
+
4432
+ declare type TooltipMode_2 = 'tooltip' | 'toggle';
4396
4433
 
4397
4434
  declare type TypographyProps = HeadingProps | BodyProps | CaptionProps | DescriptionProps;
4398
4435