@justeattakeaway/pie-link 0.4.0 → 0.5.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.js +0 -1
- package/dist/react.js +15 -16
- package/package.json +1 -1
- package/src/index.ts +8 -2
package/dist/index.js
CHANGED
package/dist/react.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import * as L from "react";
|
|
2
2
|
import { PieLink as g } from "./index.js";
|
|
3
|
-
import { buttonTypes as
|
|
3
|
+
import { buttonTypes as j, iconPlacements as D, sizes as G, tags as O, underlineTypes as S, variants as _ } from "./index.js";
|
|
4
4
|
import "lit";
|
|
5
5
|
import "lit/decorators.js";
|
|
6
|
-
import "lit/decorators/property.js";
|
|
7
6
|
/**
|
|
8
7
|
* @license
|
|
9
8
|
* Copyright 2018 Google LLC
|
|
10
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
10
|
*/
|
|
12
|
-
const E = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), w = /* @__PURE__ */ new WeakMap(), P = (
|
|
11
|
+
const E = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), w = /* @__PURE__ */ new WeakMap(), P = (d, l, p, m, h) => {
|
|
13
12
|
const n = h == null ? void 0 : h[l];
|
|
14
|
-
n === void 0 ||
|
|
13
|
+
n === void 0 || p === m ? p == null && l in HTMLElement.prototype ? d.removeAttribute(l) : d[l] = p : ((s, t, u) => {
|
|
15
14
|
let o = w.get(s);
|
|
16
15
|
o === void 0 && w.set(s, o = /* @__PURE__ */ new Map());
|
|
17
16
|
let a = o.get(t);
|
|
18
17
|
u !== void 0 ? a === void 0 ? (o.set(t, a = { handleEvent: u }), s.addEventListener(t, a)) : a.handleEvent = u : a !== void 0 && (o.delete(t), s.removeEventListener(t, a));
|
|
19
|
-
})(
|
|
18
|
+
})(d, n, p);
|
|
20
19
|
};
|
|
21
|
-
function b(
|
|
20
|
+
function b(d = window.React, l, p, m, h) {
|
|
22
21
|
let n, s, t;
|
|
23
22
|
if (l === void 0) {
|
|
24
|
-
const r =
|
|
23
|
+
const r = d;
|
|
25
24
|
({ tagName: s, elementClass: t, events: m, displayName: h } = r), n = r.react;
|
|
26
25
|
} else
|
|
27
|
-
n =
|
|
26
|
+
n = d, t = p, s = l;
|
|
28
27
|
const u = n.Component, o = n.createElement, a = new Set(Object.keys(m ?? {}));
|
|
29
28
|
class f extends u {
|
|
30
29
|
constructor() {
|
|
@@ -58,7 +57,7 @@ function b(p = window.React, l, d, m, h) {
|
|
|
58
57
|
const N = n.forwardRef((r, e) => o(f, { ...r, _$Gl: e }, r == null ? void 0 : r.children));
|
|
59
58
|
return N.displayName = f.displayName, N;
|
|
60
59
|
}
|
|
61
|
-
const
|
|
60
|
+
const R = b({
|
|
62
61
|
displayName: "PieLink",
|
|
63
62
|
elementClass: g,
|
|
64
63
|
react: L,
|
|
@@ -66,11 +65,11 @@ const T = b({
|
|
|
66
65
|
events: {}
|
|
67
66
|
});
|
|
68
67
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
R as PieLink,
|
|
69
|
+
j as buttonTypes,
|
|
70
|
+
D as iconPlacements,
|
|
71
|
+
G as sizes,
|
|
72
|
+
O as tags,
|
|
73
|
+
S as underlineTypes,
|
|
74
|
+
_ as variants
|
|
76
75
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,8 +5,14 @@ import { property } from 'lit/decorators.js';
|
|
|
5
5
|
import { validPropertyValues } from '@justeattakeaway/pie-webc-core';
|
|
6
6
|
import styles from './link.scss?inline';
|
|
7
7
|
import {
|
|
8
|
-
LinkProps,
|
|
9
|
-
|
|
8
|
+
LinkProps,
|
|
9
|
+
variants,
|
|
10
|
+
sizes,
|
|
11
|
+
iconPlacements,
|
|
12
|
+
tags,
|
|
13
|
+
buttonTypes,
|
|
14
|
+
underlineTypes,
|
|
15
|
+
type AriaProps,
|
|
10
16
|
} from './defs';
|
|
11
17
|
|
|
12
18
|
// Valid values available to consumers
|