@justeattakeaway/pie-link 0.7.0 → 0.9.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/README.md +40 -13
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/link.scss +1 -0
- package/LICENSE +0 -17
package/README.md
CHANGED
|
@@ -11,17 +11,53 @@
|
|
|
11
11
|
# Table of Contents
|
|
12
12
|
|
|
13
13
|
1. [Introduction](#pie-link)
|
|
14
|
-
2. [
|
|
14
|
+
2. [Installation](#installation)
|
|
15
15
|
3. [Importing the component](#importing-the-component)
|
|
16
|
-
4. [
|
|
17
|
-
5. [
|
|
16
|
+
4. [Peer Dependencies](#peer-dependencies)
|
|
17
|
+
5. [Local Development](#local-development)
|
|
18
|
+
6. [Props](#props)
|
|
19
|
+
7. [Testing](#testing)
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
## pie-link
|
|
20
23
|
|
|
21
24
|
`pie-link` is a Web Component built using the Lit library.
|
|
22
25
|
|
|
23
26
|
This component can be easily integrated into various frontend frameworks and customized through a set of properties.
|
|
24
27
|
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
To install `pie-link` in your application, run the following on your command line:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# npm
|
|
35
|
+
$ npm i @justeattakeaway/pie-link
|
|
36
|
+
|
|
37
|
+
# yarn
|
|
38
|
+
$ yarn add @justeattakeaway/pie-link
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For full information on using PIE components as part of an application, check out the [Getting Started Guide](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components).
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Importing the component
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
// default
|
|
48
|
+
import { PieLink } from '@justeattakeaway/pie-link';
|
|
49
|
+
|
|
50
|
+
// react
|
|
51
|
+
import { PieLink } from '@justeattakeaway/pie-link/dist/react';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Peer Dependencies
|
|
56
|
+
|
|
57
|
+
> [!IMPORTANT]
|
|
58
|
+
> When using `pie-link`, you will also need to include a couple of dependencies to ensure the component renders as expected. See [the PIE Wiki](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components#expected-dependencies) for more information and how to include these in your application.
|
|
59
|
+
|
|
60
|
+
|
|
25
61
|
## Local development
|
|
26
62
|
|
|
27
63
|
Install the dependencies. Note that this, and the following commands below, should be run from the **root of the monorepo**:
|
|
@@ -45,15 +81,6 @@ yarn watch --filter=pie-link
|
|
|
45
81
|
yarn dev --filter=pie-storybook
|
|
46
82
|
```
|
|
47
83
|
|
|
48
|
-
### Importing the component
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
// default
|
|
52
|
-
import { PieLink } from '@justeattakeaway/pie-link';
|
|
53
|
-
|
|
54
|
-
// react
|
|
55
|
-
import { PieLink } from '@justeattakeaway/pie-link/dist/react';
|
|
56
|
-
```
|
|
57
84
|
|
|
58
85
|
## Props
|
|
59
86
|
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const d = (p, t, o) => function(r, s) {
|
|
|
15
15
|
), this[l] = o), this.requestUpdate(s, f);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
}, y = `.c-link{--link-font-family: var(--dt-font-interactive-m-family);--link-font-size: calc(var(--dt-font-size-16) * 1px);--link-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--link-font-weight: var(--dt-font-weight-regular);--link-text-color: var(--dt-color-content-link);--link-text-decoration: var(--dt-font-style-underline);--link-icon-size: 16px;--link-icon-offset-top: var(--dt-spacing-a);display:inline-block;font-family:var(--link-font-family);font-size:var(--link-font-size);line-height:var(--link-line-height);font-weight:var(--link-font-weight);color:var(--link-text-color);text-decoration:var(--link-text-decoration);cursor:pointer}.c-link:hover,.c-link:active{--link-text-decoration: none}.c-link[tag=button]{outline:none;border:none;user-select:none;background:transparent;padding:0}.c-link[variant=high-visibility]{--link-text-color: var(--dt-color-content-link-distinct)}.c-link[variant=inverse]{--link-text-color: var(--dt-color-content-link-inverse)}.c-link[size=small]{--link-font-size: calc(var(--dt-font-size-14) * 1px);--link-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--link-icon-offset-top: 2px}.c-link[underline=reversed][isStandalone]{--link-text-decoration: none}.c-link[underline=reversed][isStandalone]:hover,.c-link[underline=reversed][isStandalone]:active{--link-text-decoration: var(--dt-font-style-underline)}.c-link[isBold]{--link-font-weight: var(--dt-font-weight-bold)}.c-link[isStandalone]{display:block}.c-link[hasVisited]:visited{color:var(--dt-color-content-link-visited)}.c-link[hasVisited]:visited[variant=inverse]{color:var(--dt-color-content-link-visited-inverse)}.c-link:focus-visible{outline:none;border-radius:2px;box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer)}.c-link-content{display:flex;gap:var(--dt-spacing-a)}::slotted(.c-pieIcon),::slotted(svg){display:inline-flex;margin-block-start:var(--link-icon-offset-top);height:var(--link-icon-size);width:var(--link-icon-size)}
|
|
18
|
+
}, y = `.c-link{--link-font-family: var(--dt-font-interactive-m-family);--link-font-size: calc(var(--dt-font-size-16) * 1px);--link-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--link-font-weight: var(--dt-font-weight-regular);--link-text-color: var(--dt-color-content-link);--link-text-decoration: var(--dt-font-style-underline);--link-icon-size: 16px;--link-icon-offset-top: var(--dt-spacing-a);display:inline-block;font-family:var(--link-font-family);font-size:var(--link-font-size);line-height:var(--link-line-height);font-weight:var(--link-font-weight);color:var(--link-text-color);text-decoration:var(--link-text-decoration);cursor:pointer}.c-link:hover,.c-link:active{--link-text-decoration: none}.c-link[tag=button]{outline:none;border:none;user-select:none;background:transparent;padding:0}.c-link[variant=high-visibility]{--link-text-color: var(--dt-color-content-link-distinct)}.c-link[variant=inverse]{--link-text-color: var(--dt-color-content-link-inverse)}.c-link[size=small]{--link-font-size: calc(var(--dt-font-size-14) * 1px);--link-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--link-icon-offset-top: 2px}.c-link[underline=reversed][isStandalone]{--link-text-decoration: none}.c-link[underline=reversed][isStandalone]:hover,.c-link[underline=reversed][isStandalone]:active{--link-text-decoration: var(--dt-font-style-underline)}.c-link[isBold]{--link-font-weight: var(--dt-font-weight-bold)}.c-link[isStandalone]{display:block;width:fit-content}.c-link[hasVisited]:visited{color:var(--dt-color-content-link-visited)}.c-link[hasVisited]:visited[variant=inverse]{color:var(--dt-color-content-link-visited-inverse)}.c-link:focus-visible{outline:none;border-radius:2px;box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer)}.c-link-content{display:flex;gap:var(--dt-spacing-a)}::slotted(.c-pieIcon),::slotted(svg){display:inline-flex;margin-block-start:var(--link-icon-offset-top);height:var(--link-icon-size);width:var(--link-icon-size)}
|
|
19
19
|
`, m = ["default", "high-visibility", "inverse"], b = ["small", "medium"], $ = ["leading", "trailing"], x = ["a", "button"], S = ["submit", "button", "reset", "menu"], z = ["default", "reversed"];
|
|
20
20
|
var B = Object.defineProperty, P = Object.getOwnPropertyDescriptor, n = (p, t, o, h) => {
|
|
21
21
|
for (var r = h > 1 ? void 0 : h ? P(t, o) : t, s = p.length - 1, l; s >= 0; s--)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-link",
|
|
3
3
|
"description": "PIE Design System Link built using Web Components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@justeattakeaway/pie-components-config": "0.4.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
34
|
+
"@justeattakeaway/pie-webc-core": "0.10.0"
|
|
35
35
|
},
|
|
36
36
|
"volta": {
|
|
37
37
|
"extends": "../../../package.json"
|
package/src/link.scss
CHANGED
package/LICENSE
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
Copyright (c) Just Eat Takeaway.com
|
|
6
|
-
|
|
7
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License.
|
|
9
|
-
You may obtain a copy of the License at
|
|
10
|
-
|
|
11
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
|
|
13
|
-
Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
See the License for the specific language governing permissions and
|
|
17
|
-
limitations under the License.
|