@justeattakeaway/pie-webc-core 0.16.0 → 0.17.1
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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +12 -0
- package/dist/index.js +19 -9
- package/package.json +3 -3
- package/src/functions/index.ts +1 -0
- package/src/functions/wrapNativeEvent.ts +14 -0
- package/tsconfig.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[36mvite v4.3.9 [32mbuilding for production...[36m[39m
|
|
2
2
|
transforming...
|
|
3
|
-
[32m✓[39m
|
|
3
|
+
[32m✓[39m 11 modules transformed.
|
|
4
4
|
rendering chunks...
|
|
5
5
|
computing gzip size...
|
|
6
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m2.
|
|
7
|
-
[32m✓ built in
|
|
6
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m2.40 kB[22m[1m[22m[2m │ gzip: 1.09 kB[22m
|
|
7
|
+
[32m✓ built in 198ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [Changed] - Updated Lit to 3.1.1 ([#1178](https://github.com/justeattakeaway/pie/pull/1178)) by [@renovate](https://github.com/apps/renovate)
|
|
8
|
+
|
|
9
|
+
## 0.17.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [Added] - new wrapNativeEvent function to standardise how we structure custom versions of native browser events such as 'change' ([#1173](https://github.com/justeattakeaway/pie/pull/1173)) by [@jamieomaguire](https://github.com/jamieomaguire)
|
|
14
|
+
|
|
3
15
|
## 0.16.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
1
|
+
import { isServer as l } from "lit";
|
|
2
|
+
const a = (e) => {
|
|
3
3
|
class t extends e {
|
|
4
4
|
/**
|
|
5
5
|
* A getter to determine whether the text direction is right-to-left (RTL).
|
|
@@ -11,11 +11,11 @@ const l = (e) => {
|
|
|
11
11
|
* @returns {boolean} - Returns `true` if the text direction is RTL, otherwise `false`.
|
|
12
12
|
*/
|
|
13
13
|
get isRTL() {
|
|
14
|
-
return this.dir ? this.dir === "rtl" : !
|
|
14
|
+
return this.dir ? this.dir === "rtl" : !l && !this.dir ? document.documentElement.getAttribute("dir") === "rtl" : !1;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
return t;
|
|
18
|
-
},
|
|
18
|
+
}, d = (e) => {
|
|
19
19
|
class t extends e {
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
constructor(...i) {
|
|
@@ -53,13 +53,23 @@ const l = (e) => {
|
|
|
53
53
|
configurable: !0
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
function
|
|
56
|
+
function b(e, t) {
|
|
57
57
|
customElements.get(e) ? console.warn(`PIE Web Component: "${e}" has already been defined. Please ensure the component is only being defined once in your application.`) : customElements.define(e, t);
|
|
58
58
|
}
|
|
59
|
+
function p(e) {
|
|
60
|
+
return new CustomEvent(e.type, {
|
|
61
|
+
detail: {
|
|
62
|
+
sourceEvent: e
|
|
63
|
+
},
|
|
64
|
+
bubbles: e.bubbles,
|
|
65
|
+
cancelable: e.cancelable
|
|
66
|
+
});
|
|
67
|
+
}
|
|
59
68
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
d as FormControlMixin,
|
|
70
|
+
a as RtlMixin,
|
|
71
|
+
b as defineCustomElement,
|
|
63
72
|
m as requiredProperty,
|
|
64
|
-
f as validPropertyValues
|
|
73
|
+
f as validPropertyValues,
|
|
74
|
+
p as wrapNativeEvent
|
|
65
75
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-webc-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "PIE design system base classes, mixins and utilities for web components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"test:watch": "run -T vitest"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"lit": "3.1.
|
|
20
|
+
"lit": "3.1.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
23
|
+
"@justeattakeaway/pie-components-config": "0.9.0"
|
|
24
24
|
},
|
|
25
25
|
"volta": {
|
|
26
26
|
"extends": "../../../package.json"
|
package/src/functions/index.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps the native event in a custom event. This is useful for native events that have `composed` set to `false`
|
|
3
|
+
* as these cannot propagate outside of the shadow DOM.
|
|
4
|
+
* @param event - The native event.
|
|
5
|
+
*/
|
|
6
|
+
export function wrapNativeEvent (event: Event) {
|
|
7
|
+
return new CustomEvent(event.type, {
|
|
8
|
+
detail: {
|
|
9
|
+
sourceEvent: event,
|
|
10
|
+
},
|
|
11
|
+
bubbles: event.bubbles,
|
|
12
|
+
cancelable: event.cancelable,
|
|
13
|
+
});
|
|
14
|
+
}
|
package/tsconfig.json
CHANGED