dap-design-system 0.15.1 → 0.15.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.
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.
@@ -1231,7 +1235,7 @@ declare const DapDSCardTitle_base: typeof DdsElement & {
1231
1235
  * @attribute {string} ariaLabelCheckbox - The aria label of the checkbox.
1232
1236
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
1233
1237
  * @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`.
1238
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the checkbox. Can be `negative`, `positive`, or `warning`.
1235
1239
  * @attribute {boolean} invalid - The invalid state of the checkbox.
1236
1240
  * @attribute {boolean} optional - The optional state of the checkbox.
1237
1241
  * @attribute {string} optionalLabel - The optional label of the checkbox.
@@ -1377,7 +1381,7 @@ export declare class DapDSContentSwitcherItem extends DdsElement {
1377
1381
  * @attribute {boolean} readonly - The readonly state of the input. Default is false.
1378
1382
  * @attribute {boolean} autofocus - The autofocus state of the input. Default is false.
1379
1383
  * @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`.
1384
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
1381
1385
  * @attribute {boolean} loading - The loading state of the input. Default is false.
1382
1386
  * @attribute {boolean} optional - The optional state of the input.
1383
1387
  * @attribute {string} optionalLabel - The optional label of the input.
@@ -1506,7 +1510,7 @@ export declare class DapDSDatePicker extends GenericFormElement {
1506
1510
  handleDocumentMouseDown: (event: MouseEvent) => void;
1507
1511
  handleInput: (event: InputEvent) => void;
1508
1512
  handleKeyDown: (event: KeyboardEvent) => Promise<void>;
1509
- get focusElement(): void;
1513
+ get focusElement(): HTMLInputElement;
1510
1514
  handleClick: () => void;
1511
1515
  handleClearClick: () => void;
1512
1516
  showCalendar(): Promise<void>;
@@ -1859,7 +1863,7 @@ export declare class DapDSIconButton extends DdsElement {
1859
1863
  * @attribute {string} inputmode - The inputmode of the input.
1860
1864
  * @attribute {string} pattern - The regex pattern of the input.
1861
1865
  * @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`.
1866
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
1863
1867
  * @attribute {boolean} loading - The loading state of the input. Default is false.
1864
1868
  *
1865
1869
  * @event dds-change - Fired when the input value changes.
@@ -2067,7 +2071,7 @@ export declare class DapDSModal extends ModalBaseElement {
2067
2071
  * @attribute {number} max - The maximum value of the number input.
2068
2072
  * @attribute {number} step - The step value of the number input.
2069
2073
  * @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`.
2074
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
2071
2075
  * @attribute {boolean} loading - The loading state of the input. Default is false.
2072
2076
  * @attribute {boolean} optional - The optional state of the input.
2073
2077
  * @attribute {string} optionalLabel - The optional label of the input.
@@ -2238,7 +2242,7 @@ export declare class DapDSOverlay extends DdsElement {
2238
2242
  * @attribute {boolean} readonly - The readonly state of the password input. Default is false.
2239
2243
  * @attribute {boolean} autofocus - The autofocus state of the password input. Default is false.
2240
2244
  * @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`.
2245
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.
2242
2246
  * @attribute {boolean} loading - The loading state of the password input. Default is false.
2243
2247
  * @attribute {boolean} optional - The optional state of the password input.
2244
2248
  * @attribute {string} optionalLabel - The optional label of the password input.
@@ -2337,9 +2341,10 @@ export declare class DapDSPopup extends DdsElement {
2337
2341
  */
2338
2342
  export declare class DapDSRadioButton extends LabelPositionedFormElement {
2339
2343
  input: HTMLInputElement;
2344
+ focusable: boolean;
2340
2345
  static styles: CSSResult;
2341
2346
  private handleClick;
2342
- get focusElement(): void;
2347
+ get focusElement(): HTMLInputElement;
2343
2348
  render(): TemplateResult_2;
2344
2349
  }
2345
2350
 
@@ -2362,7 +2367,7 @@ export declare class DapDSRadioButton extends LabelPositionedFormElement {
2362
2367
  * @attribute {string} description - The description of the radio group.
2363
2368
  * @attribute {string} tooltip - The tooltip of the radio group.
2364
2369
  * @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`.
2370
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the radio group. Can be `negative`, `positive`, or `warning`.
2366
2371
  * @attribute {boolean} optional - The optional state of the radio group.
2367
2372
  * @attribute {string} optionalLabel - Text of optional label.
2368
2373
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
@@ -2378,14 +2383,17 @@ export declare class DapDSRadioButton extends LabelPositionedFormElement {
2378
2383
  * @csspart container - The container of the radio group items.
2379
2384
  */
2380
2385
  export declare class DapDSRadioGroup extends GenericFormElement {
2386
+ hiddenInput: HTMLInputElement;
2381
2387
  optionalLabel: string;
2382
2388
  static styles: CSSResult;
2389
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
2383
2390
  private _handleSlotChange;
2384
2391
  private getAllRadios;
2385
2392
  private syncRadioElements;
2386
2393
  private handleRadioClick;
2387
2394
  private handleKeyDown;
2388
2395
  setValidity(): void;
2396
+ get validationMessage(): string;
2389
2397
  checkValidity(): boolean;
2390
2398
  get validity(): {
2391
2399
  valid: boolean;
@@ -2400,8 +2408,9 @@ export declare class DapDSRadioGroup extends GenericFormElement {
2400
2408
  tooShort: boolean;
2401
2409
  typeMismatch: boolean;
2402
2410
  };
2411
+ reportValidity(): boolean;
2403
2412
  handleLabelClick(): void;
2404
- attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
2413
+ handleInvalid(event: Event): void;
2405
2414
  render(): TemplateResult_2;
2406
2415
  private _renderFeedback;
2407
2416
  }
@@ -2484,7 +2493,7 @@ export declare class DapDSSearch extends ComboboxBaseElement {
2484
2493
  * @attribute {boolean} loading - Whether the select is loading.
2485
2494
  * @attribute {number} maxHeight - The max height of the floating dropdown.
2486
2495
  * @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`.
2496
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the select. Can be `negative`, `positive`, or `warning`.
2488
2497
  * @attribute {boolean} isMobile - Whether the select is in mobile mode.
2489
2498
  * @attribute {string} status - The status of the select. Can be `success` or `error`.
2490
2499
  * @attribute {boolean} optional - The optional state of the select.
@@ -2522,7 +2531,7 @@ export declare class DapDSSelect extends GenericFormElement {
2522
2531
  handleBlur: () => void;
2523
2532
  showDropDown(key?: string): Promise<void>;
2524
2533
  hideDropDown(): Promise<void>;
2525
- get focusElement(): void;
2534
+ get focusElement(): HTMLButtonElement;
2526
2535
  get validity(): ValidityState;
2527
2536
  get validationMessage(): string;
2528
2537
  checkValidity(): boolean;
@@ -2630,7 +2639,7 @@ export declare class DapDSStack extends DdsElement {
2630
2639
  * @attribute {string} ariaLabelCheckbox - The aria label of the checkbox.
2631
2640
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
2632
2641
  * @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`.
2642
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the switch. Can be `negative`, `positive`, or `warning`.
2634
2643
  * @attribute {boolean} optional - The optional state of the switch.
2635
2644
  * @attribute {string} optionalLabel - The optional label of the switch.
2636
2645
  *
@@ -2810,7 +2819,7 @@ export declare class DapDSTableRow extends DdsElement {
2810
2819
  * @attribute {string} description - The description of the textarea.
2811
2820
  * @attribute {'hard' | 'soft'} wrap - Indicates how the control should wrap the value for form submission. Can be `hard` or `soft`.
2812
2821
  * @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`.
2822
+ * @attribute {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the textarea. Can be `negative`, `positive`, or `warning`.
2814
2823
  * @attribute {boolean} optional - The optional state of the textarea.
2815
2824
  * @attribute {string} optionalLabel - The optional label of the textarea.
2816
2825
  * @attribute {boolean} subtle - The weight of the label. Default is `false`
@@ -2933,7 +2942,7 @@ export declare class DapDSTooltip extends DdsElement {
2933
2942
  content: string;
2934
2943
  placement: PopupPlacement;
2935
2944
  opened?: boolean | undefined;
2936
- mode?: TooltipMode;
2945
+ mode?: TooltipMode_2;
2937
2946
  noArrow?: boolean | undefined;
2938
2947
  floatingStrategy: 'absolute' | 'fixed';
2939
2948
  private _trigger;
@@ -3103,13 +3112,17 @@ export declare type DdsUploadStartEvent = CustomEvent<Record<PropertyKey, never>
3103
3112
 
3104
3113
  export declare type DdsValidDateEvent = CustomEvent<Record<PropertyKey, never>>;
3105
3114
 
3106
- declare type DescriptionPlacement = Extract<Placement, 'top' | 'bottom'>;
3115
+ export declare type DescriptionPlacement = Extract<Placement, 'top' | 'bottom'>;
3107
3116
 
3108
3117
  declare type DescriptionProps = {
3109
3118
  variant: Extract<TypographyVariant, 'description'>;
3110
3119
  size: Extract<TypographySize, 'lg' | 'sm'>;
3111
3120
  };
3112
3121
 
3122
+ declare type DisableableElement = HTMLElement & {
3123
+ disabled?: boolean;
3124
+ };
3125
+
3113
3126
  /**
3114
3127
  * `dap-ds-icon-clipboard-line`
3115
3128
  * @summary An icon
@@ -3182,6 +3195,12 @@ declare interface EventOptions {
3182
3195
 
3183
3196
  declare type FeedbackType = 'negative' | 'positive' | 'warning';
3184
3197
 
3198
+ export declare class FileError extends Error {
3199
+ file: File;
3200
+ type: string;
3201
+ constructor(message: string, file: File, type: string);
3202
+ }
3203
+
3185
3204
  declare type FileListElement = {
3186
3205
  name: string;
3187
3206
  type: string;
@@ -3189,11 +3208,15 @@ declare type FileListElement = {
3189
3208
  lastModified: number;
3190
3209
  };
3191
3210
 
3192
- declare type FloatingStrategy = 'absolute' | 'fixed';
3211
+ export declare type FloatingStrategy = 'absolute' | 'fixed';
3193
3212
 
3194
3213
  declare interface FocusableElementInterface {
3195
3214
  disabled: boolean;
3196
3215
  autofocus: boolean;
3216
+ focusElement: DisableableElement;
3217
+ focus(options?: FocusOptions): void;
3218
+ blur(): void;
3219
+ click(): void;
3197
3220
  }
3198
3221
 
3199
3222
  declare interface FormElementInterface {
@@ -3244,7 +3267,7 @@ declare type Heading = {
3244
3267
  text: any;
3245
3268
  };
3246
3269
 
3247
- declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3270
+ export declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3248
3271
 
3249
3272
  declare type HeadingProps = {
3250
3273
  variant: Extract<TypographyVariant, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
@@ -3257,6 +3280,12 @@ declare type HtmlButtonType = 'button' | 'submit' | 'reset';
3257
3280
 
3258
3281
  declare type HtmlButtonType_2 = 'button' | 'submit' | 'reset';
3259
3282
 
3283
+ export declare class HttpError extends Error {
3284
+ response: any;
3285
+ status: number;
3286
+ constructor(message: string, response: any, status: number);
3287
+ }
3288
+
3260
3289
  declare type IconSize = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3261
3290
 
3262
3291
  declare class InputBaseElement extends GenericFormElement {
@@ -3297,9 +3326,9 @@ declare class InputBaseElement extends GenericFormElement {
3297
3326
  private _renderFeedback;
3298
3327
  }
3299
3328
 
3300
- declare type InputStatus = 'success' | 'error';
3329
+ export declare type InputStatus = 'success' | 'error';
3301
3330
 
3302
- declare type InputTypes = 'text' | 'number' | 'button' | 'color' | 'email' | 'hidden' | 'reset' | 'submit' | 'url' | 'password' | 'file';
3331
+ export declare type InputTypes = 'text' | 'number' | 'button' | 'color' | 'email' | 'hidden' | 'reset' | 'submit' | 'url' | 'password' | 'file';
3303
3332
 
3304
3333
  declare interface LabelableElementInterface {
3305
3334
  label?: string;
@@ -3317,7 +3346,7 @@ declare interface LabelableElementInterface {
3317
3346
  renderLabel(content: unknown): unknown;
3318
3347
  }
3319
3348
 
3320
- declare type LabelPlacement = Extract<Placement, 'left' | 'right'>;
3349
+ export declare type LabelPlacement = Extract<Placement, 'left' | 'right'>;
3321
3350
 
3322
3351
  declare interface LabelPositionedElementInterface {
3323
3352
  labelPlacement: LabelPlacement;
@@ -3344,9 +3373,11 @@ declare const LabelPositionedFormElement: {
3344
3373
  prototype: LabelPositionedElementInterface;
3345
3374
  };
3346
3375
 
3376
+ export declare type Layout = 'horizontal' | 'vertical';
3377
+
3347
3378
  declare type LinkSize = Extract<Size, 'lg' | 'md' | 'sm' | 'xs'>;
3348
3379
 
3349
- declare type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
3380
+ export declare type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
3350
3381
 
3351
3382
  declare type LinkVariant = 'neutral' | 'brand' | 'inverted';
3352
3383
 
@@ -3417,18 +3448,20 @@ export declare class OthersCookieLine extends DdsElement {
3417
3448
  render(): TemplateResult_2;
3418
3449
  }
3419
3450
 
3420
- declare type Placement = 'top' | 'right' | 'bottom' | 'left' | 'center';
3451
+ export declare type Placement = 'top' | 'right' | 'bottom' | 'left' | 'center';
3421
3452
 
3422
- declare type PopupPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
3453
+ 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
3454
 
3424
- declare type Size = 'lg' | 'md' | 'sm' | 'xs';
3455
+ export declare type PopupTrigger = 'click' | 'hover' | 'focus' | 'manual' | 'hover focus';
3456
+
3457
+ export declare type Size = 'lg' | 'md' | 'sm' | 'xs';
3425
3458
 
3426
3459
  declare interface SizedElementInterface {
3427
3460
  size: Size;
3428
3461
  parentSized: string;
3429
3462
  }
3430
3463
 
3431
- declare type Spacing = 0 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 1000 | 1200 | 1400 | 1600 | 1800 | 2000 | 2400 | 3000 | 4000 | 5000 | 6000;
3464
+ 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
3465
 
3433
3466
  declare type SpinnerVariant = 'neutral' | 'brand' | 'negative' | 'positive' | 'inverted';
3434
3467
 
@@ -4392,7 +4425,9 @@ export declare class SystemSubtractLine2 extends DdsElement {
4392
4425
  render(): TemplateResult_2;
4393
4426
  }
4394
4427
 
4395
- declare type TooltipMode = 'tooltip' | 'toggle';
4428
+ export declare type TooltipMode = 'tooltip' | 'toggle';
4429
+
4430
+ declare type TooltipMode_2 = 'tooltip' | 'toggle';
4396
4431
 
4397
4432
  declare type TypographyProps = HeadingProps | BodyProps | CaptionProps | DescriptionProps;
4398
4433