@justeattakeaway/pie-modal 0.49.3 → 1.0.0

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/index.d.ts CHANGED
@@ -22,7 +22,7 @@ declare type ActionProps = {
22
22
  ariaLabel?: string;
23
23
  };
24
24
 
25
- export declare type AriaProps = {
25
+ declare type AriaProps = {
26
26
  close?: string;
27
27
  back?: string;
28
28
  loading?: string;
package/dist/index.js CHANGED
@@ -10,13 +10,13 @@ import "@justeattakeaway/pie-icons-webc/dist/IconClose.js";
10
10
  import "@justeattakeaway/pie-icons-webc/dist/IconChevronLeft.js";
11
11
  import "@justeattakeaway/pie-icons-webc/dist/IconChevronRight.js";
12
12
  import "@justeattakeaway/pie-spinner";
13
- function R(n) {
14
- if (Array.isArray(n)) {
15
- for (var e = 0, o = Array(n.length); e < n.length; e++)
16
- o[e] = n[e];
13
+ function R(a) {
14
+ if (Array.isArray(a)) {
15
+ for (var e = 0, o = Array(a.length); e < a.length; e++)
16
+ o[e] = a[e];
17
17
  return o;
18
18
  } else
19
- return Array.from(n);
19
+ return Array.from(a);
20
20
  }
21
21
  var x = !1;
22
22
  if (typeof window < "u") {
@@ -86,9 +86,9 @@ const X = '*,*:after,*:before{box-sizing:inherit}dialog{position:absolute;left:0
86
86
  position: "center",
87
87
  size: "medium"
88
88
  };
89
- var oe = Object.defineProperty, l = (n, e, o, t) => {
90
- for (var i = void 0, c = n.length - 1, g; c >= 0; c--)
91
- (g = n[c]) && (i = g(e, o, i) || i);
89
+ var oe = Object.defineProperty, l = (a, e, o, t) => {
90
+ for (var i = void 0, c = a.length - 1, g; c >= 0; c--)
91
+ (g = a[c]) && (i = g(e, o, i) || i);
92
92
  return i && oe(e, o, i), i;
93
93
  };
94
94
  const v = "pie-modal", C = class C extends I(F) {
@@ -383,67 +383,67 @@ const v = "pie-modal", C = class C extends I(F) {
383
383
  }
384
384
  };
385
385
  C.styles = T(X);
386
- let a = C;
386
+ let n = C;
387
387
  l([
388
388
  d({ type: Object })
389
- ], a.prototype, "aria");
389
+ ], n.prototype, "aria");
390
390
  l([
391
391
  d({ type: String }),
392
392
  N(v)
393
- ], a.prototype, "heading");
393
+ ], n.prototype, "heading");
394
394
  l([
395
- d(),
395
+ d({ type: String }),
396
396
  _(v, G, r.headingLevel)
397
- ], a.prototype, "headingLevel");
397
+ ], n.prototype, "headingLevel");
398
398
  l([
399
399
  d({ type: Boolean })
400
- ], a.prototype, "hasBackButton");
400
+ ], n.prototype, "hasBackButton");
401
401
  l([
402
402
  d({ type: Boolean })
403
- ], a.prototype, "hasStackedActions");
403
+ ], n.prototype, "hasStackedActions");
404
404
  l([
405
405
  d({ type: Boolean, reflect: !0 })
406
- ], a.prototype, "isDismissible");
406
+ ], n.prototype, "isDismissible");
407
407
  l([
408
408
  d({ type: Boolean })
409
- ], a.prototype, "isFooterPinned");
409
+ ], n.prototype, "isFooterPinned");
410
410
  l([
411
411
  d({ type: Boolean })
412
- ], a.prototype, "isFullWidthBelowMid");
412
+ ], n.prototype, "isFullWidthBelowMid");
413
413
  l([
414
414
  d({ type: Boolean, reflect: !0 })
415
- ], a.prototype, "isLoading");
415
+ ], n.prototype, "isLoading");
416
416
  l([
417
417
  d({ type: Boolean })
418
- ], a.prototype, "isOpen");
418
+ ], n.prototype, "isOpen");
419
419
  l([
420
420
  d({ type: Object })
421
- ], a.prototype, "leadingAction");
421
+ ], n.prototype, "leadingAction");
422
422
  l([
423
- d(),
423
+ d({ type: String }),
424
424
  _(v, Q, r.position)
425
- ], a.prototype, "position");
425
+ ], n.prototype, "position");
426
426
  l([
427
- d()
428
- ], a.prototype, "returnFocusAfterCloseSelector");
427
+ d({ type: String })
428
+ ], n.prototype, "returnFocusAfterCloseSelector");
429
429
  l([
430
- d(),
430
+ d({ type: String }),
431
431
  _(v, J, r.size)
432
- ], a.prototype, "size");
432
+ ], n.prototype, "size");
433
433
  l([
434
434
  d({ type: Object })
435
- ], a.prototype, "supportingAction");
435
+ ], n.prototype, "supportingAction");
436
436
  l([
437
437
  K("dialog")
438
- ], a.prototype, "_dialog");
439
- W(v, a);
438
+ ], n.prototype, "_dialog");
439
+ W(v, n);
440
440
  export {
441
441
  L as ON_MODAL_BACK_EVENT,
442
442
  A as ON_MODAL_CLOSE_EVENT,
443
443
  Z as ON_MODAL_LEADING_ACTION_CLICK,
444
444
  w as ON_MODAL_OPEN_EVENT,
445
445
  ee as ON_MODAL_SUPPORTING_ACTION_CLICK,
446
- a as PieModal,
446
+ n as PieModal,
447
447
  r as defaultProps,
448
448
  G as headingLevels,
449
449
  Q as positions,
package/dist/react.d.ts CHANGED
@@ -23,7 +23,7 @@ declare type ActionProps = {
23
23
  ariaLabel?: string;
24
24
  };
25
25
 
26
- export declare type AriaProps = {
26
+ declare type AriaProps = {
27
27
  close?: string;
28
28
  back?: string;
29
29
  loading?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-modal",
3
- "version": "0.49.3",
3
+ "version": "1.0.0",
4
4
  "description": "PIE design system modal built using web components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "**/*.d.ts"
14
14
  ],
15
15
  "pieMetadata": {
16
- "componentStatus": "beta"
16
+ "componentStatus": "stable"
17
17
  },
18
18
  "scripts": {
19
19
  "build": "run -T vite build",
@@ -37,10 +37,10 @@
37
37
  "devDependencies": {
38
38
  "@custom-elements-manifest/analyzer": "0.9.0",
39
39
  "@justeat/pie-design-tokens": "6.5.0",
40
- "@justeattakeaway/pie-button": "0.49.3",
40
+ "@justeattakeaway/pie-button": "1.0.0",
41
41
  "@justeattakeaway/pie-components-config": "0.18.0",
42
42
  "@justeattakeaway/pie-css": "0.13.1",
43
- "@justeattakeaway/pie-text-input": "0.24.4",
43
+ "@justeattakeaway/pie-text-input": "0.24.5",
44
44
  "@justeattakeaway/pie-wrapper-react": "0.14.2",
45
45
  "@types/body-scroll-lock": "3.1.2",
46
46
  "cem-plugin-module-file-extensions": "0.0.5"
@@ -49,10 +49,10 @@
49
49
  "extends": "../../../package.json"
50
50
  },
51
51
  "dependencies": {
52
- "@justeattakeaway/pie-button": "0.49.3",
53
- "@justeattakeaway/pie-icon-button": "0.29.1",
52
+ "@justeattakeaway/pie-button": "1.0.0",
53
+ "@justeattakeaway/pie-icon-button": "1.0.0",
54
54
  "@justeattakeaway/pie-icons-webc": "1.1.0",
55
- "@justeattakeaway/pie-spinner": "0.7.2",
55
+ "@justeattakeaway/pie-spinner": "1.0.0",
56
56
  "@justeattakeaway/pie-webc-core": "0.24.2",
57
57
  "body-scroll-lock": "3.1.5",
58
58
  "dialog-polyfill": "0.5.6"
package/src/defs.ts CHANGED
@@ -6,7 +6,7 @@ export const headingLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;
6
6
  export const sizes = ['small', 'medium', 'large'] as const;
7
7
  export const positions = ['top', 'center'] as const;
8
8
 
9
- export type AriaProps = {
9
+ type AriaProps = {
10
10
  close?: string;
11
11
  back?: string;
12
12
  loading?: string;
package/src/index.ts CHANGED
@@ -61,7 +61,7 @@ export class PieModal extends RtlMixin(LitElement) implements ModalProps {
61
61
  @requiredProperty(componentSelector)
62
62
  public heading!: string;
63
63
 
64
- @property()
64
+ @property({ type: String })
65
65
  @validPropertyValues(componentSelector, headingLevels, defaultProps.headingLevel)
66
66
  public headingLevel = defaultProps.headingLevel;
67
67
 
@@ -89,14 +89,14 @@ export class PieModal extends RtlMixin(LitElement) implements ModalProps {
89
89
  @property({ type: Object })
90
90
  public leadingAction: ModalProps['leadingAction'];
91
91
 
92
- @property()
92
+ @property({ type: String })
93
93
  @validPropertyValues(componentSelector, positions, defaultProps.position)
94
94
  public position = defaultProps.position;
95
95
 
96
- @property()
96
+ @property({ type: String })
97
97
  public returnFocusAfterCloseSelector: ModalProps['returnFocusAfterCloseSelector'];
98
98
 
99
- @property()
99
+ @property({ type: String })
100
100
  @validPropertyValues(componentSelector, sizes, defaultProps.size)
101
101
  public size = defaultProps.size;
102
102