@justeattakeaway/pie-webc-core 0.17.1 → 0.18.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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/dist/index.js +38 -37
- package/package.json +3 -3
- package/src/index.ts +2 -1
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/pie-input-element.ts +3 -0
- package/vite.config.js +7 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
[36mvite v4.
|
|
1
|
+
[36mvite v4.5.2 [32mbuilding for production...[36m[39m
|
|
2
2
|
transforming...
|
|
3
|
-
[32m✓[39m
|
|
3
|
+
[32m✓[39m 13 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.41 kB[22m[1m[22m[2m │ gzip: 1.10 kB[22m
|
|
7
|
+
[32m✓ built in 229ms[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
1
|
import { isServer as l } from "lit";
|
|
2
|
-
const a = (e) => {
|
|
3
|
-
class t extends e {
|
|
4
|
-
/**
|
|
5
|
-
* A getter to determine whether the text direction is right-to-left (RTL).
|
|
6
|
-
* If the `dir` property is present on the component, it will be used to determine the text direction.
|
|
7
|
-
* If running on the client-side (not SSR) and the `dir` property is not present, the text direction will be inferred
|
|
8
|
-
* from the document's root element. This inference is not available during SSR.
|
|
9
|
-
* In all other cases, it will return `false`, indicating a left-to-right (LTR) text direction.
|
|
10
|
-
*
|
|
11
|
-
* @returns {boolean} - Returns `true` if the text direction is RTL, otherwise `false`.
|
|
12
|
-
*/
|
|
13
|
-
get isRTL() {
|
|
14
|
-
return this.dir ? this.dir === "rtl" : !l && !this.dir ? document.documentElement.getAttribute("dir") === "rtl" : !1;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return t;
|
|
18
|
-
}, d = (e) => {
|
|
19
|
-
class t extends e {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
constructor(...i) {
|
|
22
|
-
super(...i), this._internals = this.attachInternals();
|
|
23
|
-
}
|
|
24
|
-
get form() {
|
|
25
|
-
return this._internals.form;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return t.formAssociated = !0, t;
|
|
29
|
-
}, f = (e, t, n) => function(o, r) {
|
|
2
|
+
const a = (e, t, n) => function(o, r) {
|
|
30
3
|
const s = `#${r}`;
|
|
31
4
|
Object.defineProperty(o, r, {
|
|
32
5
|
get() {
|
|
@@ -41,7 +14,7 @@ const a = (e) => {
|
|
|
41
14
|
},
|
|
42
15
|
configurable: !0
|
|
43
16
|
});
|
|
44
|
-
},
|
|
17
|
+
}, d = (e) => function(n, i) {
|
|
45
18
|
const o = `#${i}`;
|
|
46
19
|
Object.defineProperty(n, i, {
|
|
47
20
|
get() {
|
|
@@ -53,10 +26,10 @@ const a = (e) => {
|
|
|
53
26
|
configurable: !0
|
|
54
27
|
});
|
|
55
28
|
};
|
|
56
|
-
function
|
|
29
|
+
function f(e, t) {
|
|
57
30
|
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
31
|
}
|
|
59
|
-
function
|
|
32
|
+
function m(e) {
|
|
60
33
|
return new CustomEvent(e.type, {
|
|
61
34
|
detail: {
|
|
62
35
|
sourceEvent: e
|
|
@@ -65,11 +38,39 @@ function p(e) {
|
|
|
65
38
|
cancelable: e.cancelable
|
|
66
39
|
});
|
|
67
40
|
}
|
|
41
|
+
const b = (e) => {
|
|
42
|
+
class t extends e {
|
|
43
|
+
/**
|
|
44
|
+
* A getter to determine whether the text direction is right-to-left (RTL).
|
|
45
|
+
* If the `dir` property is present on the component, it will be used to determine the text direction.
|
|
46
|
+
* If running on the client-side (not SSR) and the `dir` property is not present, the text direction will be inferred
|
|
47
|
+
* from the document's root element. This inference is not available during SSR.
|
|
48
|
+
* In all other cases, it will return `false`, indicating a left-to-right (LTR) text direction.
|
|
49
|
+
*
|
|
50
|
+
* @returns {boolean} - Returns `true` if the text direction is RTL, otherwise `false`.
|
|
51
|
+
*/
|
|
52
|
+
get isRTL() {
|
|
53
|
+
return this.dir ? this.dir === "rtl" : !l && !this.dir ? document.documentElement.getAttribute("dir") === "rtl" : !1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}, p = (e) => {
|
|
58
|
+
class t extends e {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
constructor(...i) {
|
|
61
|
+
super(...i), this._internals = this.attachInternals();
|
|
62
|
+
}
|
|
63
|
+
get form() {
|
|
64
|
+
return this._internals.form;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return t.formAssociated = !0, t;
|
|
68
|
+
};
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
p as FormControlMixin,
|
|
71
|
+
b as RtlMixin,
|
|
72
|
+
f as defineCustomElement,
|
|
73
|
+
d as requiredProperty,
|
|
74
|
+
a as validPropertyValues,
|
|
75
|
+
m as wrapNativeEvent
|
|
75
76
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-webc-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "PIE design system base classes, mixins and utilities for web components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "run -T vite build",
|
|
11
11
|
"lint:scripts": "run -T eslint .",
|
|
12
12
|
"lint:scripts:fix": "run -T eslint . --fix",
|
|
13
|
-
"test": "run -T vitest run",
|
|
13
|
+
"test": "run -T vitest run --config ../../../vite.config.js",
|
|
14
14
|
"test:ci": "yarn test",
|
|
15
15
|
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
|
|
16
16
|
"test:browsers:ci": "yarn test:browsers",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lit": "3.1.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
23
|
+
"@justeattakeaway/pie-components-config": "0.11.0"
|
|
24
24
|
},
|
|
25
25
|
"volta": {
|
|
26
26
|
"extends": "../../../package.json"
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pie-input-element';
|
package/vite.config.js
CHANGED
|
@@ -13,7 +13,13 @@ export default defineConfig({
|
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
test: {
|
|
16
|
+
dir: '.',
|
|
16
17
|
environment: 'jsdom',
|
|
17
|
-
|
|
18
|
+
globals: true,
|
|
19
|
+
exclude: [
|
|
20
|
+
'**/test/{accessibility,component,system,visual}/*.spec.{js,ts}',
|
|
21
|
+
'**/test/mixins/**/*.browser.spec.{js,ts}',
|
|
22
|
+
'**/node_modules/**/*'
|
|
23
|
+
],
|
|
18
24
|
},
|
|
19
25
|
});
|