nve-designsystem 0.1.83 → 0.1.84

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.
@@ -9,7 +9,7 @@ export default class NveButton extends SlButton implements INveComponent {
9
9
  constructor();
10
10
  static styles: import("lit").CSSResultGroup[];
11
11
  size: 'small' | 'medium' | 'large';
12
- testId: string;
12
+ testId: string | undefined;
13
13
  }
14
14
  declare global {
15
15
  interface HTMLElementTagNameMap {
@@ -234,7 +234,7 @@ var I = Object.defineProperty, k = Object.getOwnPropertyDescriptor, d = (o, i, a
234
234
  };
235
235
  let n = class extends b {
236
236
  constructor() {
237
- super(), this.size = "large", this.testId = "";
237
+ super(), this.size = "large", this.testId = void 0;
238
238
  }
239
239
  };
240
240
  n.styles = [b.styles, z];
@@ -8,6 +8,8 @@ const n = t`
8
8
  box-sizing: border-box;
9
9
  position: relative;
10
10
  border: none;
11
+ min-width: 48px;
12
+ transition: background-color 0.3s ease;
11
13
  }
12
14
 
13
15
  .button ::slotted(nve-badge) {
@@ -20,6 +22,7 @@ const n = t`
20
22
 
21
23
  :host::part(spinner) {
22
24
  --track-color: none;
25
+ --track-width: 2.5px;
23
26
  position: relative;
24
27
  top: 0;
25
28
  left: 0;
@@ -0,0 +1,23 @@
1
+ import { INveComponent } from '../../interfaces/NveComponent.interface';
2
+ import NveButton from '../nve-button/nve-button.component';
3
+ /**
4
+ * Knapp som viser kun ikon. Den har de samme egenskapene som en vanlig nve-button.
5
+ *
6
+ * @dependency nve-icon
7
+ * @dependency nve-button
8
+ */
9
+ export default class NveIconButton extends NveButton implements INveComponent {
10
+ testId: string | undefined;
11
+ /** Navnet på ikonet som skal vises */
12
+ iconName: string;
13
+ /** Den blir lest av hjelpemidler. Bruk den for optimal universell utforming og beskriv hva knappen gjør */
14
+ label: string | undefined;
15
+ static styles: import("lit").CSSResult[];
16
+ constructor();
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'nve-icon-button': NveIconButton;
22
+ }
23
+ }
@@ -0,0 +1,49 @@
1
+ import { x as v } from "../../chunks/lit-element.js";
2
+ import { n as d, t as c } from "../../chunks/property.js";
3
+ import h from "./nve-icon-button.styles.js";
4
+ import "../nve-icon/nve-icon.component.js";
5
+ import { o as e } from "../../chunks/if-defined.js";
6
+ import u from "../nve-button/nve-button.component.js";
7
+ var m = Object.defineProperty, f = Object.getOwnPropertyDescriptor, s = (p, o, n, r) => {
8
+ for (var t = r > 1 ? void 0 : r ? f(o, n) : o, l = p.length - 1, a; l >= 0; l--)
9
+ (a = p[l]) && (t = (r ? a(o, n, t) : a(t)) || t);
10
+ return r && t && m(o, n, t), t;
11
+ };
12
+ let i = class extends u {
13
+ constructor() {
14
+ super(), this.testId = void 0, this.iconName = "", this.label = void 0;
15
+ }
16
+ render() {
17
+ return v`
18
+ <nve-button
19
+ aria-label=${e(this.label ? this.label : void 0)}
20
+ loading=${e(this.loading ? !0 : void 0)}
21
+ disabled=${e(this.disabled ? !0 : void 0)}
22
+ size=${this.size}
23
+ variant=${this.variant}
24
+ testId=${e(this.testId ? this.testId : void 0)}
25
+ >
26
+ ${e(this.loading) ? "" : v`<nve-icon
27
+ testId=${e(this.testId ? "icon-${this.testId}" : void 0)}
28
+ name=${this.iconName}
29
+ ></nve-icon>`}
30
+ </nve-button>
31
+ `;
32
+ }
33
+ };
34
+ i.styles = [h];
35
+ s([
36
+ d({ reflect: !0, type: String })
37
+ ], i.prototype, "testId", 2);
38
+ s([
39
+ d({ reflect: !0, type: String })
40
+ ], i.prototype, "iconName", 2);
41
+ s([
42
+ d({ reflect: !0, type: String })
43
+ ], i.prototype, "label", 2);
44
+ i = s([
45
+ c("nve-icon-button")
46
+ ], i);
47
+ export {
48
+ i as default
49
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { i as s } from "../../chunks/lit-element.js";
2
+ const i = s`
3
+ :host::part(base) {
4
+ min-width: 0;
5
+ padding: 0px var(--spacing-small);
6
+ gap: 0;
7
+ }
8
+
9
+ :host::part(spinner) {
10
+ margin-right: 0;
11
+ font-size: 24px;
12
+ }
13
+
14
+ :host([size='medium'])::part(base) {
15
+ padding: 0px var(--spacing-x-small);
16
+ }
17
+
18
+ :host([size='small'])::part(base) {
19
+ padding: 0px var(--spacing-xx-small, 4px);
20
+ }
21
+
22
+ :host([size='small']) ::slotted(nve-icon) {
23
+ font-size: 24px;
24
+ }
25
+
26
+ :host([circle])::part(base) {
27
+ border-radius: 50%;
28
+ }
29
+ `;
30
+ export {
31
+ i as default
32
+ };
@@ -373,9 +373,9 @@
373
373
  "kind": "field",
374
374
  "name": "testId",
375
375
  "type": {
376
- "text": "string"
376
+ "text": "string | undefined"
377
377
  },
378
- "default": "''"
378
+ "default": "undefined"
379
379
  },
380
380
  {
381
381
  "kind": "field",
@@ -3145,6 +3145,860 @@
3145
3145
  }
3146
3146
  ]
3147
3147
  },
3148
+ {
3149
+ "kind": "javascript-module",
3150
+ "path": "components/nve-icon-button/nve-icon-button.js",
3151
+ "declarations": [
3152
+ {
3153
+ "kind": "class",
3154
+ "description": "Knapp som viser kun ikon. Den har de samme egenskapene som en vanlig nve-button.",
3155
+ "name": "NveIconButton",
3156
+ "members": [
3157
+ {
3158
+ "kind": "field",
3159
+ "name": "testId",
3160
+ "type": {
3161
+ "text": "string | undefined"
3162
+ },
3163
+ "default": "undefined",
3164
+ "inheritedFrom": {
3165
+ "name": "NveButton",
3166
+ "module": "components/nve-button/nve-button.js"
3167
+ }
3168
+ },
3169
+ {
3170
+ "kind": "field",
3171
+ "name": "iconName",
3172
+ "type": {
3173
+ "text": "string"
3174
+ },
3175
+ "default": "''",
3176
+ "description": "Navnet på ikonet som skal vises"
3177
+ },
3178
+ {
3179
+ "kind": "field",
3180
+ "name": "label",
3181
+ "type": {
3182
+ "text": "string | undefined"
3183
+ },
3184
+ "default": "undefined",
3185
+ "description": "Den blir lest av hjelpemidler. Bruk den for optimal universell utforming og beskriv hva knappen gjør"
3186
+ },
3187
+ {
3188
+ "kind": "field",
3189
+ "name": "styles",
3190
+ "type": {
3191
+ "text": "array"
3192
+ },
3193
+ "static": true,
3194
+ "default": "[styles]",
3195
+ "inheritedFrom": {
3196
+ "name": "NveButton",
3197
+ "module": "components/nve-button/nve-button.js"
3198
+ }
3199
+ },
3200
+ {
3201
+ "kind": "method",
3202
+ "name": "render"
3203
+ },
3204
+ {
3205
+ "kind": "field",
3206
+ "name": "size",
3207
+ "type": {
3208
+ "text": "'small' | 'medium' | 'large'"
3209
+ },
3210
+ "default": "'large'",
3211
+ "inheritedFrom": {
3212
+ "name": "NveButton",
3213
+ "module": "components/nve-button/nve-button.js"
3214
+ }
3215
+ },
3216
+ {
3217
+ "kind": "field",
3218
+ "name": "dependencies",
3219
+ "type": {
3220
+ "text": "object"
3221
+ },
3222
+ "static": true,
3223
+ "default": "{\n 'sl-icon': SlIcon,\n 'sl-spinner': SlSpinner\n }",
3224
+ "inheritedFrom": {
3225
+ "name": "SlButton"
3226
+ }
3227
+ },
3228
+ {
3229
+ "kind": "field",
3230
+ "name": "button",
3231
+ "type": {
3232
+ "text": "HTMLButtonElement | HTMLLinkElement"
3233
+ },
3234
+ "inheritedFrom": {
3235
+ "name": "SlButton"
3236
+ }
3237
+ },
3238
+ {
3239
+ "kind": "field",
3240
+ "name": "invalid",
3241
+ "type": {
3242
+ "text": "boolean"
3243
+ },
3244
+ "default": "false",
3245
+ "inheritedFrom": {
3246
+ "name": "SlButton"
3247
+ }
3248
+ },
3249
+ {
3250
+ "kind": "field",
3251
+ "name": "title",
3252
+ "type": {
3253
+ "text": "string"
3254
+ },
3255
+ "default": "''",
3256
+ "attribute": "title",
3257
+ "inheritedFrom": {
3258
+ "name": "SlButton"
3259
+ }
3260
+ },
3261
+ {
3262
+ "kind": "field",
3263
+ "name": "variant",
3264
+ "type": {
3265
+ "text": "'default' | 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'text'"
3266
+ },
3267
+ "default": "'default'",
3268
+ "description": "The button's theme variant.",
3269
+ "attribute": "variant",
3270
+ "reflects": true,
3271
+ "inheritedFrom": {
3272
+ "name": "SlButton"
3273
+ }
3274
+ },
3275
+ {
3276
+ "kind": "field",
3277
+ "name": "caret",
3278
+ "type": {
3279
+ "text": "boolean"
3280
+ },
3281
+ "default": "false",
3282
+ "description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.",
3283
+ "attribute": "caret",
3284
+ "reflects": true,
3285
+ "inheritedFrom": {
3286
+ "name": "SlButton"
3287
+ }
3288
+ },
3289
+ {
3290
+ "kind": "field",
3291
+ "name": "disabled",
3292
+ "type": {
3293
+ "text": "boolean"
3294
+ },
3295
+ "default": "false",
3296
+ "description": "Disables the button.",
3297
+ "attribute": "disabled",
3298
+ "reflects": true,
3299
+ "inheritedFrom": {
3300
+ "name": "SlButton"
3301
+ }
3302
+ },
3303
+ {
3304
+ "kind": "field",
3305
+ "name": "loading",
3306
+ "type": {
3307
+ "text": "boolean"
3308
+ },
3309
+ "default": "false",
3310
+ "description": "Draws the button in a loading state.",
3311
+ "attribute": "loading",
3312
+ "reflects": true,
3313
+ "inheritedFrom": {
3314
+ "name": "SlButton"
3315
+ }
3316
+ },
3317
+ {
3318
+ "kind": "field",
3319
+ "name": "outline",
3320
+ "type": {
3321
+ "text": "boolean"
3322
+ },
3323
+ "default": "false",
3324
+ "description": "Draws an outlined button.",
3325
+ "attribute": "outline",
3326
+ "reflects": true,
3327
+ "inheritedFrom": {
3328
+ "name": "SlButton"
3329
+ }
3330
+ },
3331
+ {
3332
+ "kind": "field",
3333
+ "name": "pill",
3334
+ "type": {
3335
+ "text": "boolean"
3336
+ },
3337
+ "default": "false",
3338
+ "description": "Draws a pill-style button with rounded edges.",
3339
+ "attribute": "pill",
3340
+ "reflects": true,
3341
+ "inheritedFrom": {
3342
+ "name": "SlButton"
3343
+ }
3344
+ },
3345
+ {
3346
+ "kind": "field",
3347
+ "name": "circle",
3348
+ "type": {
3349
+ "text": "boolean"
3350
+ },
3351
+ "default": "false",
3352
+ "description": "Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the\ndefault slot.",
3353
+ "attribute": "circle",
3354
+ "reflects": true,
3355
+ "inheritedFrom": {
3356
+ "name": "SlButton"
3357
+ }
3358
+ },
3359
+ {
3360
+ "kind": "field",
3361
+ "name": "type",
3362
+ "type": {
3363
+ "text": "'button' | 'submit' | 'reset'"
3364
+ },
3365
+ "default": "'button'",
3366
+ "description": "The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.",
3367
+ "attribute": "type",
3368
+ "inheritedFrom": {
3369
+ "name": "SlButton"
3370
+ }
3371
+ },
3372
+ {
3373
+ "kind": "field",
3374
+ "name": "name",
3375
+ "type": {
3376
+ "text": "string"
3377
+ },
3378
+ "default": "''",
3379
+ "description": "The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.",
3380
+ "attribute": "name",
3381
+ "inheritedFrom": {
3382
+ "name": "SlButton"
3383
+ }
3384
+ },
3385
+ {
3386
+ "kind": "field",
3387
+ "name": "value",
3388
+ "type": {
3389
+ "text": "string"
3390
+ },
3391
+ "default": "''",
3392
+ "description": "The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.",
3393
+ "attribute": "value",
3394
+ "inheritedFrom": {
3395
+ "name": "SlButton"
3396
+ }
3397
+ },
3398
+ {
3399
+ "kind": "field",
3400
+ "name": "href",
3401
+ "type": {
3402
+ "text": "string"
3403
+ },
3404
+ "default": "''",
3405
+ "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
3406
+ "attribute": "href",
3407
+ "inheritedFrom": {
3408
+ "name": "SlButton"
3409
+ }
3410
+ },
3411
+ {
3412
+ "kind": "field",
3413
+ "name": "target",
3414
+ "type": {
3415
+ "text": "'_blank' | '_parent' | '_self' | '_top'"
3416
+ },
3417
+ "description": "Tells the browser where to open the link. Only used when `href` is present.",
3418
+ "attribute": "target",
3419
+ "inheritedFrom": {
3420
+ "name": "SlButton"
3421
+ }
3422
+ },
3423
+ {
3424
+ "kind": "field",
3425
+ "name": "rel",
3426
+ "type": {
3427
+ "text": "string"
3428
+ },
3429
+ "default": "'noreferrer noopener'",
3430
+ "description": "When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\ndefault is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\nspecific tab/window, this will prevent that from working correctly. You can remove or change the default value by\nsetting the attribute to an empty string or a value of your choice, respectively.",
3431
+ "attribute": "rel",
3432
+ "inheritedFrom": {
3433
+ "name": "SlButton"
3434
+ }
3435
+ },
3436
+ {
3437
+ "kind": "field",
3438
+ "name": "download",
3439
+ "type": {
3440
+ "text": "string | undefined"
3441
+ },
3442
+ "description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.",
3443
+ "attribute": "download",
3444
+ "inheritedFrom": {
3445
+ "name": "SlButton"
3446
+ }
3447
+ },
3448
+ {
3449
+ "kind": "field",
3450
+ "name": "form",
3451
+ "type": {
3452
+ "text": "string"
3453
+ },
3454
+ "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
3455
+ "attribute": "form",
3456
+ "inheritedFrom": {
3457
+ "name": "SlButton"
3458
+ }
3459
+ },
3460
+ {
3461
+ "kind": "field",
3462
+ "name": "formAction",
3463
+ "type": {
3464
+ "text": "string"
3465
+ },
3466
+ "description": "Used to override the form owner's `action` attribute.",
3467
+ "attribute": "formaction",
3468
+ "inheritedFrom": {
3469
+ "name": "SlButton"
3470
+ }
3471
+ },
3472
+ {
3473
+ "kind": "field",
3474
+ "name": "formEnctype",
3475
+ "type": {
3476
+ "text": "'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"
3477
+ },
3478
+ "description": "Used to override the form owner's `enctype` attribute.",
3479
+ "attribute": "formenctype",
3480
+ "inheritedFrom": {
3481
+ "name": "SlButton"
3482
+ }
3483
+ },
3484
+ {
3485
+ "kind": "field",
3486
+ "name": "formMethod",
3487
+ "type": {
3488
+ "text": "'post' | 'get'"
3489
+ },
3490
+ "description": "Used to override the form owner's `method` attribute.",
3491
+ "attribute": "formmethod",
3492
+ "inheritedFrom": {
3493
+ "name": "SlButton"
3494
+ }
3495
+ },
3496
+ {
3497
+ "kind": "field",
3498
+ "name": "formNoValidate",
3499
+ "type": {
3500
+ "text": "boolean"
3501
+ },
3502
+ "description": "Used to override the form owner's `novalidate` attribute.",
3503
+ "attribute": "formnovalidate",
3504
+ "inheritedFrom": {
3505
+ "name": "SlButton"
3506
+ }
3507
+ },
3508
+ {
3509
+ "kind": "field",
3510
+ "name": "formTarget",
3511
+ "type": {
3512
+ "text": "'_self' | '_blank' | '_parent' | '_top' | string"
3513
+ },
3514
+ "description": "Used to override the form owner's `target` attribute.",
3515
+ "attribute": "formtarget",
3516
+ "inheritedFrom": {
3517
+ "name": "SlButton"
3518
+ }
3519
+ },
3520
+ {
3521
+ "kind": "field",
3522
+ "name": "validity",
3523
+ "description": "Gets the validity state object",
3524
+ "readonly": true,
3525
+ "inheritedFrom": {
3526
+ "name": "SlButton"
3527
+ }
3528
+ },
3529
+ {
3530
+ "kind": "field",
3531
+ "name": "validationMessage",
3532
+ "description": "Gets the validation message",
3533
+ "readonly": true,
3534
+ "inheritedFrom": {
3535
+ "name": "SlButton"
3536
+ }
3537
+ },
3538
+ {
3539
+ "kind": "method",
3540
+ "name": "handleDisabledChange",
3541
+ "inheritedFrom": {
3542
+ "name": "SlButton"
3543
+ }
3544
+ },
3545
+ {
3546
+ "kind": "method",
3547
+ "name": "click",
3548
+ "description": "Simulates a click on the button.",
3549
+ "inheritedFrom": {
3550
+ "name": "SlButton"
3551
+ }
3552
+ },
3553
+ {
3554
+ "kind": "method",
3555
+ "name": "focus",
3556
+ "parameters": [
3557
+ {
3558
+ "name": "options",
3559
+ "optional": true,
3560
+ "type": {
3561
+ "text": "FocusOptions"
3562
+ }
3563
+ }
3564
+ ],
3565
+ "description": "Sets focus on the button.",
3566
+ "inheritedFrom": {
3567
+ "name": "SlButton"
3568
+ }
3569
+ },
3570
+ {
3571
+ "kind": "method",
3572
+ "name": "blur",
3573
+ "description": "Removes focus from the button.",
3574
+ "inheritedFrom": {
3575
+ "name": "SlButton"
3576
+ }
3577
+ },
3578
+ {
3579
+ "kind": "method",
3580
+ "name": "checkValidity",
3581
+ "description": "Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.",
3582
+ "inheritedFrom": {
3583
+ "name": "SlButton"
3584
+ }
3585
+ },
3586
+ {
3587
+ "kind": "method",
3588
+ "name": "getForm",
3589
+ "return": {
3590
+ "type": {
3591
+ "text": "HTMLFormElement | null"
3592
+ }
3593
+ },
3594
+ "description": "Gets the associated form, if one exists.",
3595
+ "inheritedFrom": {
3596
+ "name": "SlButton"
3597
+ }
3598
+ },
3599
+ {
3600
+ "kind": "method",
3601
+ "name": "reportValidity",
3602
+ "description": "Checks for validity and shows the browser's validation message if the control is invalid.",
3603
+ "inheritedFrom": {
3604
+ "name": "SlButton"
3605
+ }
3606
+ },
3607
+ {
3608
+ "kind": "method",
3609
+ "name": "setCustomValidity",
3610
+ "parameters": [
3611
+ {
3612
+ "name": "message",
3613
+ "type": {
3614
+ "text": "string"
3615
+ }
3616
+ }
3617
+ ],
3618
+ "description": "Sets a custom validation message. Pass an empty string to restore validity.",
3619
+ "inheritedFrom": {
3620
+ "name": "SlButton"
3621
+ }
3622
+ }
3623
+ ],
3624
+ "superclass": {
3625
+ "name": "NveButton",
3626
+ "module": "/src/components/nve-button/nve-button.component"
3627
+ },
3628
+ "tagNameWithoutPrefix": "icon-button",
3629
+ "tagName": "nve-icon-button",
3630
+ "customElement": true,
3631
+ "jsDoc": "/**\n * Knapp som viser kun ikon. Den har de samme egenskapene som en vanlig nve-button.\n *\n * @dependency nve-icon\n * @dependency nve-button\n */",
3632
+ "dependencies": [
3633
+ "nve-icon",
3634
+ "nve-button"
3635
+ ],
3636
+ "cssParts": [
3637
+ {
3638
+ "description": "The component's base wrapper.",
3639
+ "name": "base",
3640
+ "inheritedFrom": {
3641
+ "name": "SlButton"
3642
+ }
3643
+ },
3644
+ {
3645
+ "description": "The container that wraps the prefix.",
3646
+ "name": "prefix",
3647
+ "inheritedFrom": {
3648
+ "name": "SlButton"
3649
+ }
3650
+ },
3651
+ {
3652
+ "description": "The button's label.",
3653
+ "name": "label",
3654
+ "inheritedFrom": {
3655
+ "name": "SlButton"
3656
+ }
3657
+ },
3658
+ {
3659
+ "description": "The container that wraps the suffix.",
3660
+ "name": "suffix",
3661
+ "inheritedFrom": {
3662
+ "name": "SlButton"
3663
+ }
3664
+ },
3665
+ {
3666
+ "description": "The button's caret icon, an `<sl-icon>` element.",
3667
+ "name": "caret",
3668
+ "inheritedFrom": {
3669
+ "name": "SlButton"
3670
+ }
3671
+ },
3672
+ {
3673
+ "description": "The spinner that shows when the button is in the loading state.",
3674
+ "name": "spinner",
3675
+ "inheritedFrom": {
3676
+ "name": "SlButton"
3677
+ }
3678
+ }
3679
+ ],
3680
+ "attributes": [
3681
+ {
3682
+ "name": "title",
3683
+ "type": {
3684
+ "text": "string"
3685
+ },
3686
+ "default": "''",
3687
+ "fieldName": "title",
3688
+ "inheritedFrom": {
3689
+ "name": "SlButton"
3690
+ }
3691
+ },
3692
+ {
3693
+ "name": "variant",
3694
+ "type": {
3695
+ "text": "'default' | 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'text'"
3696
+ },
3697
+ "default": "'default'",
3698
+ "description": "The button's theme variant.",
3699
+ "fieldName": "variant",
3700
+ "inheritedFrom": {
3701
+ "name": "SlButton"
3702
+ }
3703
+ },
3704
+ {
3705
+ "name": "size",
3706
+ "type": {
3707
+ "text": "'small' | 'medium' | 'large'"
3708
+ },
3709
+ "default": "'medium'",
3710
+ "description": "The button's size.",
3711
+ "fieldName": "size",
3712
+ "inheritedFrom": {
3713
+ "name": "SlButton"
3714
+ }
3715
+ },
3716
+ {
3717
+ "name": "caret",
3718
+ "type": {
3719
+ "text": "boolean"
3720
+ },
3721
+ "default": "false",
3722
+ "description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.",
3723
+ "fieldName": "caret",
3724
+ "inheritedFrom": {
3725
+ "name": "SlButton"
3726
+ }
3727
+ },
3728
+ {
3729
+ "name": "disabled",
3730
+ "type": {
3731
+ "text": "boolean"
3732
+ },
3733
+ "default": "false",
3734
+ "description": "Disables the button.",
3735
+ "fieldName": "disabled",
3736
+ "inheritedFrom": {
3737
+ "name": "SlButton"
3738
+ }
3739
+ },
3740
+ {
3741
+ "name": "loading",
3742
+ "type": {
3743
+ "text": "boolean"
3744
+ },
3745
+ "default": "false",
3746
+ "description": "Draws the button in a loading state.",
3747
+ "fieldName": "loading",
3748
+ "inheritedFrom": {
3749
+ "name": "SlButton"
3750
+ }
3751
+ },
3752
+ {
3753
+ "name": "outline",
3754
+ "type": {
3755
+ "text": "boolean"
3756
+ },
3757
+ "default": "false",
3758
+ "description": "Draws an outlined button.",
3759
+ "fieldName": "outline",
3760
+ "inheritedFrom": {
3761
+ "name": "SlButton"
3762
+ }
3763
+ },
3764
+ {
3765
+ "name": "pill",
3766
+ "type": {
3767
+ "text": "boolean"
3768
+ },
3769
+ "default": "false",
3770
+ "description": "Draws a pill-style button with rounded edges.",
3771
+ "fieldName": "pill",
3772
+ "inheritedFrom": {
3773
+ "name": "SlButton"
3774
+ }
3775
+ },
3776
+ {
3777
+ "name": "circle",
3778
+ "type": {
3779
+ "text": "boolean"
3780
+ },
3781
+ "default": "false",
3782
+ "description": "Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the\ndefault slot.",
3783
+ "fieldName": "circle",
3784
+ "inheritedFrom": {
3785
+ "name": "SlButton"
3786
+ }
3787
+ },
3788
+ {
3789
+ "name": "type",
3790
+ "type": {
3791
+ "text": "'button' | 'submit' | 'reset'"
3792
+ },
3793
+ "default": "'button'",
3794
+ "description": "The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.",
3795
+ "fieldName": "type",
3796
+ "inheritedFrom": {
3797
+ "name": "SlButton"
3798
+ }
3799
+ },
3800
+ {
3801
+ "name": "name",
3802
+ "type": {
3803
+ "text": "string"
3804
+ },
3805
+ "default": "''",
3806
+ "description": "The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.",
3807
+ "fieldName": "name",
3808
+ "inheritedFrom": {
3809
+ "name": "SlButton"
3810
+ }
3811
+ },
3812
+ {
3813
+ "name": "value",
3814
+ "type": {
3815
+ "text": "string"
3816
+ },
3817
+ "default": "''",
3818
+ "description": "The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.",
3819
+ "fieldName": "value",
3820
+ "inheritedFrom": {
3821
+ "name": "SlButton"
3822
+ }
3823
+ },
3824
+ {
3825
+ "name": "href",
3826
+ "type": {
3827
+ "text": "string"
3828
+ },
3829
+ "default": "''",
3830
+ "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
3831
+ "fieldName": "href",
3832
+ "inheritedFrom": {
3833
+ "name": "SlButton"
3834
+ }
3835
+ },
3836
+ {
3837
+ "name": "target",
3838
+ "type": {
3839
+ "text": "'_blank' | '_parent' | '_self' | '_top'"
3840
+ },
3841
+ "description": "Tells the browser where to open the link. Only used when `href` is present.",
3842
+ "fieldName": "target",
3843
+ "inheritedFrom": {
3844
+ "name": "SlButton"
3845
+ }
3846
+ },
3847
+ {
3848
+ "name": "rel",
3849
+ "type": {
3850
+ "text": "string"
3851
+ },
3852
+ "default": "'noreferrer noopener'",
3853
+ "description": "When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\ndefault is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\nspecific tab/window, this will prevent that from working correctly. You can remove or change the default value by\nsetting the attribute to an empty string or a value of your choice, respectively.",
3854
+ "fieldName": "rel",
3855
+ "inheritedFrom": {
3856
+ "name": "SlButton"
3857
+ }
3858
+ },
3859
+ {
3860
+ "name": "download",
3861
+ "type": {
3862
+ "text": "string | undefined"
3863
+ },
3864
+ "description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.",
3865
+ "fieldName": "download",
3866
+ "inheritedFrom": {
3867
+ "name": "SlButton"
3868
+ }
3869
+ },
3870
+ {
3871
+ "name": "form",
3872
+ "type": {
3873
+ "text": "string"
3874
+ },
3875
+ "description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
3876
+ "fieldName": "form",
3877
+ "inheritedFrom": {
3878
+ "name": "SlButton"
3879
+ }
3880
+ },
3881
+ {
3882
+ "name": "formaction",
3883
+ "type": {
3884
+ "text": "string"
3885
+ },
3886
+ "description": "Used to override the form owner's `action` attribute.",
3887
+ "fieldName": "formAction",
3888
+ "inheritedFrom": {
3889
+ "name": "SlButton"
3890
+ }
3891
+ },
3892
+ {
3893
+ "name": "formenctype",
3894
+ "type": {
3895
+ "text": "'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"
3896
+ },
3897
+ "description": "Used to override the form owner's `enctype` attribute.",
3898
+ "fieldName": "formEnctype",
3899
+ "inheritedFrom": {
3900
+ "name": "SlButton"
3901
+ }
3902
+ },
3903
+ {
3904
+ "name": "formmethod",
3905
+ "type": {
3906
+ "text": "'post' | 'get'"
3907
+ },
3908
+ "description": "Used to override the form owner's `method` attribute.",
3909
+ "fieldName": "formMethod",
3910
+ "inheritedFrom": {
3911
+ "name": "SlButton"
3912
+ }
3913
+ },
3914
+ {
3915
+ "name": "formnovalidate",
3916
+ "type": {
3917
+ "text": "boolean"
3918
+ },
3919
+ "description": "Used to override the form owner's `novalidate` attribute.",
3920
+ "fieldName": "formNoValidate",
3921
+ "inheritedFrom": {
3922
+ "name": "SlButton"
3923
+ }
3924
+ },
3925
+ {
3926
+ "name": "formtarget",
3927
+ "type": {
3928
+ "text": "'_self' | '_blank' | '_parent' | '_top' | string"
3929
+ },
3930
+ "description": "Used to override the form owner's `target` attribute.",
3931
+ "fieldName": "formTarget",
3932
+ "inheritedFrom": {
3933
+ "name": "SlButton"
3934
+ }
3935
+ }
3936
+ ],
3937
+ "events": [
3938
+ {
3939
+ "description": "Emitted when the button loses focus.",
3940
+ "name": "sl-blur",
3941
+ "reactName": "onSlBlur",
3942
+ "eventName": "SlBlurEvent",
3943
+ "inheritedFrom": {
3944
+ "name": "SlButton"
3945
+ }
3946
+ },
3947
+ {
3948
+ "description": "Emitted when the button gains focus.",
3949
+ "name": "sl-focus",
3950
+ "reactName": "onSlFocus",
3951
+ "eventName": "SlFocusEvent",
3952
+ "inheritedFrom": {
3953
+ "name": "SlButton"
3954
+ }
3955
+ },
3956
+ {
3957
+ "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied.",
3958
+ "name": "sl-invalid",
3959
+ "reactName": "onSlInvalid",
3960
+ "eventName": "SlInvalidEvent",
3961
+ "inheritedFrom": {
3962
+ "name": "SlButton"
3963
+ }
3964
+ }
3965
+ ],
3966
+ "slots": [
3967
+ {
3968
+ "description": "The button's label.",
3969
+ "name": "",
3970
+ "inheritedFrom": {
3971
+ "name": "SlButton"
3972
+ }
3973
+ },
3974
+ {
3975
+ "description": "A presentational prefix icon or similar element.",
3976
+ "name": "prefix",
3977
+ "inheritedFrom": {
3978
+ "name": "SlButton"
3979
+ }
3980
+ },
3981
+ {
3982
+ "description": "A presentational suffix icon or similar element.",
3983
+ "name": "suffix",
3984
+ "inheritedFrom": {
3985
+ "name": "SlButton"
3986
+ }
3987
+ }
3988
+ ]
3989
+ }
3990
+ ],
3991
+ "exports": [
3992
+ {
3993
+ "kind": "js",
3994
+ "name": "default",
3995
+ "declaration": {
3996
+ "name": "NveIconButton",
3997
+ "module": "components/nve-icon-button/nve-icon-button.js"
3998
+ }
3999
+ }
4000
+ ]
4001
+ },
3148
4002
  {
3149
4003
  "kind": "javascript-module",
3150
4004
  "path": "components/nve-input/nve-input.js",
@@ -10168,7 +11022,7 @@
10168
11022
  "package": {
10169
11023
  "name": "nve-designsystem",
10170
11024
  "description": "Designsystem for NVE",
10171
- "version": "0.1.82",
11025
+ "version": "0.1.83",
10172
11026
  "author": {
10173
11027
  "name": "NVE",
10174
11028
  "email": "nve@nve.no"
@@ -4,8 +4,8 @@
4
4
  */
5
5
  export interface INveComponent {
6
6
  /**
7
- * En unik identifikator for testformål.
8
- * Standardverdien er en tom streng, men du kan angi id-en til komponenten med for eksempel testId="example_id"
9
- */
10
- testId: string;
7
+ * En unik identifikator for testformål.
8
+ * Standardverdien er undefined (så at den ikke vises i DOMen hvis man ikke skal bruke den), men du kan angi id-en til komponenten med for eksempel testId="example_id"
9
+ */
10
+ testId: string | undefined;
11
11
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "MIT",
9
9
  "homepage": "https://github.com/NVE/Designsystem/",
10
- "version": "0.1.83",
10
+ "version": "0.1.84",
11
11
  "customElements": "custom-elements.json",
12
12
  "exports": {
13
13
  ".": {