@warp-ds/elements 2.2.0-next.3 → 2.2.0-next.4

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.
Files changed (38) hide show
  1. package/dist/custom-elements.json +812 -0
  2. package/dist/index.js +3125 -3100
  3. package/dist/index.js.map +4 -4
  4. package/dist/packages/affix/index.js +1 -0
  5. package/dist/packages/affix/index.js.map +2 -2
  6. package/dist/packages/alert/alert.test.d.ts +1 -0
  7. package/dist/packages/alert/index.d.ts +13 -17
  8. package/dist/packages/attention/index.js +1 -3
  9. package/dist/packages/attention/index.js.map +2 -2
  10. package/dist/packages/breadcrumbs/index.js +2 -4
  11. package/dist/packages/breadcrumbs/index.js.map +2 -2
  12. package/dist/packages/button/button.test.d.ts +1 -1
  13. package/dist/packages/button/index.d.ts +3 -3
  14. package/dist/packages/card/card.test.d.ts +1 -0
  15. package/dist/packages/card/index.d.ts +6 -16
  16. package/dist/packages/expandable/expandable.test.d.ts +1 -0
  17. package/dist/packages/expandable/index.d.ts +13 -51
  18. package/dist/packages/modal/index.js +129 -129
  19. package/dist/packages/modal/index.js.map +2 -2
  20. package/dist/packages/modal/modal-main.d.ts +1 -1
  21. package/dist/packages/pill/index.js +1 -3
  22. package/dist/packages/pill/index.js.map +2 -2
  23. package/dist/packages/select/index.js +2 -4
  24. package/dist/packages/select/index.js.map +2 -2
  25. package/dist/packages/textfield/index.d.ts +2 -2
  26. package/dist/packages/textfield/index.js +5 -2
  27. package/dist/packages/textfield/index.js.map +2 -2
  28. package/dist/packages/toast/index.js +1 -3
  29. package/dist/packages/toast/index.js.map +2 -2
  30. package/package.json +21 -12
  31. package/dist/packages/alert/index.js +0 -2466
  32. package/dist/packages/alert/index.js.map +0 -7
  33. package/dist/packages/button/index.js +0 -2479
  34. package/dist/packages/button/index.js.map +0 -7
  35. package/dist/packages/card/index.js +0 -2131
  36. package/dist/packages/card/index.js.map +0 -7
  37. package/dist/packages/expandable/index.js +0 -2346
  38. package/dist/packages/expandable/index.js.map +0 -7
@@ -1 +1 @@
1
- import "./index.js";
1
+ import './index.js';
@@ -1,6 +1,6 @@
1
- import { PropertyValues } from "lit";
2
- type ButtonVariant = "primary" | "secondary" | "negative" | "utility" | "pill" | "link";
3
- type ButtonType = "button" | "submit" | "reset";
1
+ import { PropertyValues } from 'lit';
2
+ type ButtonVariant = 'primary' | 'secondary' | 'negative' | 'utility' | 'pill' | 'link';
3
+ type ButtonType = 'button' | 'submit' | 'reset';
4
4
  declare const WarpButton_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & {
5
5
  new (): {
6
6
  [x: string]: any;
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -1,25 +1,15 @@
1
- export class WarpCard extends WarpElement {
2
- static properties: {
3
- selected: {
4
- type: BooleanConstructor;
5
- reflect: boolean;
6
- };
7
- flat: {
8
- type: BooleanConstructor;
9
- };
10
- clickable: {
11
- type: BooleanConstructor;
12
- };
13
- };
14
- static styles: (import("lit").CSSResult | (import("lit").CSSResult | CSSStyleSheet | import("lit").CSSResultArray)[])[];
1
+ import { LitElement } from 'lit';
2
+ declare class WarpCard extends LitElement {
3
+ static styles: import("lit").CSSResult[];
15
4
  selected: boolean;
16
5
  flat: boolean;
17
6
  clickable: boolean;
18
7
  buttonText: string;
8
+ constructor();
19
9
  get _containerClasses(): string;
20
10
  get _outlineClasses(): string;
21
11
  get _interactiveElement(): import("lit").TemplateResult<1> | "";
22
- keypressed(e: any): void;
12
+ keypressed(e: KeyboardEvent): void;
23
13
  render(): import("lit").TemplateResult<1>;
24
14
  }
25
- import WarpElement from '@warp-ds/elements-core';
15
+ export { WarpCard };
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -1,61 +1,23 @@
1
- declare const WarpExpandable_base: {
2
- new (): {
3
- [x: string]: any;
4
- };
5
- [x: string]: any;
6
- createProperty(name: any, options: any): void;
7
- };
8
- export class WarpExpandable extends WarpExpandable_base {
9
- static properties: {
10
- expanded: {
11
- type: BooleanConstructor;
12
- reflect: boolean;
13
- };
14
- title: {
15
- type: StringConstructor;
16
- };
17
- box: {
18
- type: BooleanConstructor;
19
- };
20
- bleed: {
21
- type: BooleanConstructor;
22
- };
23
- buttonClass: {
24
- type: StringConstructor;
25
- };
26
- contentClass: {
27
- type: StringConstructor;
28
- };
29
- noChevron: {
30
- type: BooleanConstructor;
31
- };
32
- animated: {
33
- type: BooleanConstructor;
34
- };
35
- headingLevel: {
36
- type: NumberConstructor;
37
- };
38
- _hasTitle: {
39
- type: BooleanConstructor;
40
- state: boolean;
41
- };
42
- _showChevronUp: {
43
- type: BooleanConstructor;
44
- state: boolean;
45
- };
46
- };
47
- static styles: (import("lit").CSSResult | (import("lit").CSSResult | CSSStyleSheet | import("lit").CSSResultArray)[])[];
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import '@warp-ds/icons/elements/chevron-down-16';
3
+ import '@warp-ds/icons/elements/chevron-up-16';
4
+ declare class WarpExpandable extends LitElement {
5
+ #private;
48
6
  expanded: boolean;
49
- animated: boolean;
7
+ title: string;
50
8
  box: boolean;
51
9
  bleed: boolean;
10
+ buttonClass: string;
11
+ contentClass: string;
52
12
  noChevron: boolean;
13
+ animated: boolean;
14
+ headingLevel: number;
53
15
  _hasTitle: boolean;
54
16
  _showChevronUp: boolean;
55
- updated(changedProperties: any): void;
17
+ static styles: import("lit").CSSResult[];
18
+ updated(changedProperties: PropertyValues<this>): void;
56
19
  firstUpdated(): void;
57
20
  get _expandableSlot(): import("lit").TemplateResult<1>;
58
21
  render(): import("lit").TemplateResult<1>;
59
- #private;
60
22
  }
61
- export {};
23
+ export { WarpExpandable };
@@ -1061,17 +1061,17 @@ var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(LitEl
1061
1061
  };
1062
1062
  ModalFooter.styles = css`
1063
1063
  .footer {
1064
- display:flex;
1065
- flex-shrink:0;
1066
- justify-content:flex-end;
1067
- padding-left:1.6rem;
1068
- padding-right:1.6rem;
1069
- padding-top:2.4rem;
1064
+ display: flex;
1065
+ flex-shrink: 0;
1066
+ justify-content: flex-end;
1067
+ padding-left: 1.6rem;
1068
+ padding-right: 1.6rem;
1069
+ padding-top: 2.4rem;
1070
1070
  }
1071
- @media (min-width: 480px){
1071
+ @media (min-width: 480px) {
1072
1072
  .footer {
1073
- padding-left:3.2rem;
1074
- padding-right:3.2rem;
1073
+ padding-left: 3.2rem;
1074
+ padding-right: 3.2rem;
1075
1075
  }
1076
1076
  }
1077
1077
  `;
@@ -2076,9 +2076,7 @@ if (!customElements.get("w-icon-close-16")) {
2076
2076
  var supportedLocales3 = ["en", "nb", "fi", "da", "sv"];
2077
2077
  var defaultLocale4 = "en";
2078
2078
  var getSupportedLocale3 = (usedLocale) => {
2079
- return supportedLocales3.find(
2080
- (locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
2081
- ) || defaultLocale4;
2079
+ return supportedLocales3.find((locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)) || defaultLocale4;
2082
2080
  };
2083
2081
  function detectLocale3() {
2084
2082
  if (typeof window === "undefined") {
@@ -2197,109 +2195,111 @@ ModalHeader.styles = css2`
2197
2195
  padding-bottom: 0.8rem;
2198
2196
  }
2199
2197
  .header-title-bar {
2200
- display:grid;
2201
- flex-shrink:0 !important;
2202
- gap:1.2rem;
2203
- grid-template-columns:auto 1fr auto;
2204
- align-items:flex-start;
2205
- padding-left:1.6rem;
2206
- padding-right:1.6rem;
2207
- padding-top:1.6rem;
2198
+ display: grid;
2199
+ flex-shrink: 0 !important;
2200
+ gap: 1.2rem;
2201
+ grid-template-columns: auto 1fr auto;
2202
+ align-items: flex-start;
2203
+ padding-left: 1.6rem;
2204
+ padding-right: 1.6rem;
2205
+ padding-top: 1.6rem;
2208
2206
  }
2209
2207
  .header-title {
2210
- font-weight:700;
2211
- font-size:var(--w-font-size-l);
2212
- line-height:var(--w-line-height-l);
2213
- align-self:center;
2208
+ font-weight: 700;
2209
+ font-size: var(--w-font-size-l);
2210
+ line-height: var(--w-line-height-l);
2211
+ align-self: center;
2214
2212
  margin: 0;
2215
2213
  }
2216
2214
  .header-title-with-back-button {
2217
- justify-self:center;
2215
+ justify-self: center;
2218
2216
  }
2219
2217
  .header-title-without-back-button {
2220
- grid-column:span 2/span 2;
2218
+ grid-column: span 2 / span 2;
2221
2219
  }
2222
2220
  .header-title-with-top-area {
2223
- padding-left:1.6rem;
2224
- padding-right:1.6rem;
2225
- padding-top:1.6rem;
2221
+ padding-left: 1.6rem;
2222
+ padding-right: 1.6rem;
2223
+ padding-top: 1.6rem;
2226
2224
  }
2227
2225
  .header-button:hover {
2228
- -webkit-background-clip:padding-box;
2229
- background-clip:padding-box;
2226
+ -webkit-background-clip: padding-box;
2227
+ background-clip: padding-box;
2230
2228
  }
2231
- .header-button:focus, .header-button:focus-visible {
2232
- outline:2px solid var(--w-s-color-border-focus);
2233
- outline-offset:var(--w-outline-offset, 1px);
2229
+ .header-button:focus,
2230
+ .header-button:focus-visible {
2231
+ outline: 2px solid var(--w-s-color-border-focus);
2232
+ outline-offset: var(--w-outline-offset, 1px);
2234
2233
  }
2235
- .header-button:not(:focus-visible){
2236
- outline:none;
2234
+ .header-button:not(:focus-visible) {
2235
+ outline: none;
2237
2236
  }
2238
2237
  .header-button {
2239
- border-width:0;
2240
- border-radius:9999px;
2241
- display:inline-flex;
2242
- align-items:center;
2243
- justify-content:center;
2244
- min-height:40px;
2245
- min-width:40px;
2246
- padding:0.4rem;
2247
- font-weight:700;
2248
- transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;
2249
- transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
2250
- transition-duration:150ms;
2251
- font-size:var(--w-font-size-m);line-height:var(--w-line-height-m);
2252
- line-height:2.4rem;
2238
+ border-width: 0;
2239
+ border-radius: 9999px;
2240
+ display: inline-flex;
2241
+ align-items: center;
2242
+ justify-content: center;
2243
+ min-height: 40px;
2244
+ min-width: 40px;
2245
+ padding: 0.4rem;
2246
+ font-weight: 700;
2247
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
2248
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2249
+ transition-duration: 150ms;
2250
+ font-size: var(--w-font-size-m);
2251
+ line-height: var(--w-line-height-m);
2252
+ line-height: 2.4rem;
2253
2253
  }
2254
2254
  .header-button-left {
2255
- background-color:transparent;
2256
- color:var(--w-s-color-icon);
2257
- margin-left:-0.8rem;
2255
+ background-color: transparent;
2256
+ color: var(--w-s-color-icon);
2257
+ margin-left: -0.8rem;
2258
2258
  }
2259
2259
  .header-button-left:hover {
2260
- background-color:var(--w-color-button-pill-background-hover);
2260
+ background-color: var(--w-color-button-pill-background-hover);
2261
2261
  }
2262
2262
  .header-button-left:active {
2263
- background-color:var(--w-color-button-pill-background-active);
2263
+ background-color: var(--w-color-button-pill-background-active);
2264
2264
  }
2265
2265
  .header-close-button {
2266
- background-color:transparent;
2267
- color:var(--w-s-color-icon);
2268
- margin-right:-0.8rem;
2266
+ background-color: transparent;
2267
+ color: var(--w-s-color-icon);
2268
+ margin-right: -0.8rem;
2269
2269
  }
2270
2270
  .header-close-button:hover {
2271
- background-color:var(--w-color-button-pill-background-hover);
2271
+ background-color: var(--w-color-button-pill-background-hover);
2272
2272
  }
2273
2273
  .header-close-button:active {
2274
- background-color:var(--w-color-button-pill-background-active);
2274
+ background-color: var(--w-color-button-pill-background-active);
2275
2275
  }
2276
2276
  .header-close-button-on-image {
2277
- background-color:rgba(var(--w-rgb-black),0.7);
2278
- right:0.8rem;
2279
- top:0.8rem;
2280
- position:absolute;
2281
- z-index:10;
2282
- color:var(--w-s-color-text-inverted);
2277
+ background-color: rgba(var(--w-rgb-black), 0.7);
2278
+ right: 0.8rem;
2279
+ top: 0.8rem;
2280
+ position: absolute;
2281
+ z-index: 10;
2282
+ color: var(--w-s-color-text-inverted);
2283
2283
  }
2284
2284
  .header-close-button-on-image:hover {
2285
- background-color:rgba(var(--w-rgb-black),0.85);
2285
+ background-color: rgba(var(--w-rgb-black), 0.85);
2286
2286
  }
2287
2287
  .header-close-button-on-image:active {
2288
- background-color:var(--w-black);
2288
+ background-color: var(--w-black);
2289
2289
  }
2290
- @media (min-width: 480px){
2290
+ @media (min-width: 480px) {
2291
2291
  .header-title-bar {
2292
- padding-left:3.2rem;
2293
- padding-right:3.2rem;
2294
- padding-top:2.4rem;
2292
+ padding-left: 3.2rem;
2293
+ padding-right: 3.2rem;
2294
+ padding-top: 2.4rem;
2295
2295
  }
2296
2296
  .header-title-with-top-area {
2297
- padding-left:3.2rem;
2298
- padding-right:3.2rem;
2297
+ padding-left: 3.2rem;
2298
+ padding-right: 3.2rem;
2299
2299
  }
2300
2300
  .header-button {
2301
- min-height:32px;
2302
- min-width:32px;
2301
+ min-height: 32px;
2302
+ min-width: 32px;
2303
2303
  }
2304
2304
  }
2305
2305
  `;
@@ -2321,6 +2321,7 @@ __decorateClass([
2321
2321
 
2322
2322
  // packages/modal/modal-main.ts
2323
2323
  import { css as css3, html as html5, LitElement as LitElement5 } from "lit";
2324
+ import { property as property2, query as query2 } from "lit/decorators.js";
2324
2325
 
2325
2326
  // node_modules/.pnpm/scroll-doctor@2.0.2/node_modules/scroll-doctor/dist/scroll-doctor.js
2326
2327
  var n = [];
@@ -2381,7 +2382,6 @@ function T() {
2381
2382
  }
2382
2383
 
2383
2384
  // packages/modal/modal-main.ts
2384
- import { property as property2, query as query2 } from "lit/decorators.js";
2385
2385
  var ModalMain = class extends ProvidesCanCloseToSlotsMixin(LitElement5) {
2386
2386
  constructor() {
2387
2387
  super();
@@ -2456,77 +2456,77 @@ ModalMain.styles = [
2456
2456
  css3`
2457
2457
  .dialog-el {
2458
2458
  --w-modal-translate-distance: 100%;
2459
- --w-modal-max-height:80%;
2460
- --w-modal-width:640px;
2461
- background-color:transparent;
2462
- border-width:0;
2463
- align-items:flex-end;
2464
- inset:0rem;
2465
- height:unset;
2466
- max-height:unset;
2467
- max-width:unset;
2468
- width:unset;
2469
- margin:auto;
2470
- padding:0rem;
2471
- backface-visibility:hidden;
2459
+ --w-modal-max-height: 80%;
2460
+ --w-modal-width: 640px;
2461
+ background-color: transparent;
2462
+ border-width: 0;
2463
+ align-items: flex-end;
2464
+ inset: 0rem;
2465
+ height: unset;
2466
+ max-height: unset;
2467
+ max-width: unset;
2468
+ width: unset;
2469
+ margin: auto;
2470
+ padding: 0rem;
2471
+ backface-visibility: hidden;
2472
2472
  }
2473
2473
  .dialog-inner-el {
2474
- will-change:height;
2475
- border-radius:8px;
2476
- display:flex;
2477
- flex-direction:column;
2478
- overflow:hidden;
2479
- position:relative;
2480
- background-color:var(--w-s-color-background);
2481
- box-shadow:var(--w-shadow-m);
2482
- height:var(--w-modal-height);
2483
- max-height:var(--w-modal-max-height);
2484
- min-height:var(--w-modal-min-height);
2485
- width:var(--w-modal-width);
2486
- backface-visibility:hidden;
2487
- padding-bottom:calc(32px + env(safe-area-inset-bottom, 0px));
2488
- transition-property:all;
2489
- transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
2490
- transition-duration:150ms;
2491
- transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
2474
+ will-change: height;
2475
+ border-radius: 8px;
2476
+ display: flex;
2477
+ flex-direction: column;
2478
+ overflow: hidden;
2479
+ position: relative;
2480
+ background-color: var(--w-s-color-background);
2481
+ box-shadow: var(--w-shadow-m);
2482
+ height: var(--w-modal-height);
2483
+ max-height: var(--w-modal-max-height);
2484
+ min-height: var(--w-modal-min-height);
2485
+ width: var(--w-modal-width);
2486
+ backface-visibility: hidden;
2487
+ padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
2488
+ transition-property: all;
2489
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2490
+ transition-duration: 150ms;
2491
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2492
2492
  }
2493
2493
  .content-el {
2494
- display:block;
2495
- flex-shrink:1;
2496
- flex-grow:1;
2497
- overflow-x:hidden;
2498
- overflow-y:auto;
2499
- position:relative;
2500
- margin-bottom:0rem;
2501
- padding-left:1.6rem;
2502
- padding-right:1.6rem;
2494
+ display: block;
2495
+ flex-shrink: 1;
2496
+ flex-grow: 1;
2497
+ overflow-x: hidden;
2498
+ overflow-y: auto;
2499
+ position: relative;
2500
+ margin-bottom: 0rem;
2501
+ padding-left: 1.6rem;
2502
+ padding-right: 1.6rem;
2503
2503
  }
2504
2504
  @media (min-width: 480px) {
2505
2505
  .dialog-el {
2506
2506
  --w-modal-translate-distance: 50%;
2507
- place-content:center;
2508
- place-items:center;
2507
+ place-content: center;
2508
+ place-items: center;
2509
2509
  }
2510
2510
  .dialog-inner-el {
2511
- margin-left:1.6rem;
2512
- margin-right:1.6rem;
2513
- padding-bottom:3.2rem;
2511
+ margin-left: 1.6rem;
2512
+ margin-right: 1.6rem;
2513
+ padding-bottom: 3.2rem;
2514
2514
  }
2515
2515
  .content-el {
2516
- padding-left:3.2rem;
2517
- padding-right:3.2rem;
2516
+ padding-left: 3.2rem;
2517
+ padding-right: 3.2rem;
2518
2518
  }
2519
2519
  }
2520
- @media (max-width: 479.9px){
2520
+ @media (max-width: 479.9px) {
2521
2521
  .dialog-inner-el {
2522
- border-bottom-left-radius:0;
2523
- border-bottom-right-radius:0;
2522
+ border-bottom-left-radius: 0;
2523
+ border-bottom-right-radius: 0;
2524
2524
  }
2525
2525
  }
2526
2526
  .dialog-el[open] {
2527
2527
  animation: w-modal-in 0.3s ease-in-out forwards;
2528
- display:flex;
2529
- position:fixed;
2528
+ display: flex;
2529
+ position: fixed;
2530
2530
  }
2531
2531
  .dialog-el.close {
2532
2532
  animation: w-modal-out 0.3s ease-in-out forwards;