@justeattakeaway/pie-webc-core
Advanced tools
Comparing version 0.0.0-snapshot-release-20240105142421 to 0.0.0-snapshot-release-20240209112948
# Changelog | ||
## 0.0.0-snapshot-release-20240105142421 | ||
## 0.0.0-snapshot-release-20240209112948 | ||
### Minor Changes | ||
- [Added] - PIEInputElement interface ([#1257](https://github.com/justeattakeaway/pie/pull/1257)) by [@fernandofranca](https://github.com/fernandofranca) | ||
## 0.17.1 | ||
### Patch Changes | ||
- [Changed] - Updated Lit to 3.1.1 ([#1178](https://github.com/justeattakeaway/pie/pull/1178)) by [@renovate](https://github.com/apps/renovate) | ||
## 0.17.0 | ||
### Minor Changes | ||
- [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) | ||
## 0.16.0 | ||
### Minor Changes | ||
- [Removed] - unused LitElementMixin type as we do not need it anywhere ([#1145](https://github.com/justeattakeaway/pie/pull/1145)) by [@jamieomaguire](https://github.com/jamieomaguire) | ||
- [Changed] - Added `@justeattakeaway/pie-wrapper-react` as a devDependency as `build` now relies on the publish `add-react-wrapper` executable ([#1144](https://github.com/justeattakeaway/pie/pull/1144)) by [@siggerzz](https://github.com/siggerzz) | ||
- [Changed] - Use proper interface keyword for RTLmixin interface. Was using a class before which is incorrect. ([#1145](https://github.com/justeattakeaway/pie/pull/1145)) by [@jamieomaguire](https://github.com/jamieomaguire) | ||
@@ -10,0 +30,0 @@ |
@@ -1,30 +0,3 @@ | ||
import { isServer as u } from "lit"; | ||
const l = (e) => { | ||
class t extends e { | ||
/** | ||
* A getter to determine whether the text direction is right-to-left (RTL). | ||
* If the `dir` property is present on the component, it will be used to determine the text direction. | ||
* If running on the client-side (not SSR) and the `dir` property is not present, the text direction will be inferred | ||
* from the document's root element. This inference is not available during SSR. | ||
* In all other cases, it will return `false`, indicating a left-to-right (LTR) text direction. | ||
* | ||
* @returns {boolean} - Returns `true` if the text direction is RTL, otherwise `false`. | ||
*/ | ||
get isRTL() { | ||
return this.dir ? this.dir === "rtl" : !u && !this.dir ? document.documentElement.getAttribute("dir") === "rtl" : !1; | ||
} | ||
} | ||
return t; | ||
}, a = (e) => { | ||
class t extends e { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
constructor(...i) { | ||
super(...i), this._internals = this.attachInternals(); | ||
} | ||
get form() { | ||
return this._internals.form; | ||
} | ||
} | ||
return t.formAssociated = !0, t; | ||
}, f = (e, t, n) => function(o, r) { | ||
import { isServer as l } from "lit"; | ||
const a = (e, t, n) => function(o, r) { | ||
const s = `#${r}`; | ||
@@ -44,3 +17,3 @@ Object.defineProperty(o, r, { | ||
}); | ||
}, m = (e) => function(n, i) { | ||
}, d = (e) => function(n, i) { | ||
const o = `#${i}`; | ||
@@ -57,11 +30,49 @@ Object.defineProperty(n, i, { | ||
}; | ||
function h(e, t) { | ||
function f(e, t) { | ||
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); | ||
} | ||
function m(e) { | ||
return new CustomEvent(e.type, { | ||
detail: { | ||
sourceEvent: e | ||
}, | ||
bubbles: e.bubbles, | ||
cancelable: e.cancelable | ||
}); | ||
} | ||
const b = (e) => { | ||
class t extends e { | ||
/** | ||
* A getter to determine whether the text direction is right-to-left (RTL). | ||
* If the `dir` property is present on the component, it will be used to determine the text direction. | ||
* If running on the client-side (not SSR) and the `dir` property is not present, the text direction will be inferred | ||
* from the document's root element. This inference is not available during SSR. | ||
* In all other cases, it will return `false`, indicating a left-to-right (LTR) text direction. | ||
* | ||
* @returns {boolean} - Returns `true` if the text direction is RTL, otherwise `false`. | ||
*/ | ||
get isRTL() { | ||
return this.dir ? this.dir === "rtl" : !l && !this.dir ? document.documentElement.getAttribute("dir") === "rtl" : !1; | ||
} | ||
} | ||
return t; | ||
}, p = (e) => { | ||
class t extends e { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
constructor(...i) { | ||
super(...i), this._internals = this.attachInternals(); | ||
} | ||
get form() { | ||
return this._internals.form; | ||
} | ||
} | ||
return t.formAssociated = !0, t; | ||
}; | ||
export { | ||
a as FormControlMixin, | ||
l as RtlMixin, | ||
h as defineCustomElement, | ||
m as requiredProperty, | ||
f as validPropertyValues | ||
p as FormControlMixin, | ||
b as RtlMixin, | ||
f as defineCustomElement, | ||
d as requiredProperty, | ||
a as validPropertyValues, | ||
m as wrapNativeEvent | ||
}; |
{ | ||
"name": "@justeattakeaway/pie-webc-core", | ||
"version": "0.0.0-snapshot-release-20240105142421", | ||
"version": "0.0.0-snapshot-release-20240209112948", | ||
"description": "PIE design system base classes, mixins and utilities for web components", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
"lint:scripts:fix": "run -T eslint . --fix", | ||
"test": "run -T vitest run", | ||
"test": "run -T vitest run --config ../../../vite.config.js", | ||
"test:ci": "yarn test", | ||
@@ -21,6 +21,6 @@ "test:browsers": "npx playwright test -c ./playwright-lit.config.ts", | ||
"dependencies": { | ||
"lit": "3.1.0" | ||
"lit": "3.1.1" | ||
}, | ||
"devDependencies": { | ||
"@justeattakeaway/pie-components-config": "0.7.0" | ||
"@justeattakeaway/pie-components-config": "0.11.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "volta": { |
export * from './defineCustomElement'; | ||
export * from './wrapNativeEvent'; |
@@ -1,3 +0,4 @@ | ||
export * from './mixins'; | ||
export * from './decorators'; | ||
export * from './functions'; | ||
export * from './interfaces'; | ||
export * from './mixins'; |
{ | ||
"extends": "../../../configs/pie-components-config/tsconfig.json", | ||
"extends": "@justeattakeaway/pie-components-config/tsconfig.json", | ||
"compilerOptions": { | ||
@@ -4,0 +4,0 @@ "baseUrl": ".", |
@@ -16,5 +16,11 @@ import { defineConfig } from 'vite'; | ||
test: { | ||
dir: '.', | ||
environment: 'jsdom', | ||
exclude: ['**/*.browser.spec.ts'], | ||
globals: true, | ||
exclude: [ | ||
'**/test/{accessibility,component,system,visual}/*.spec.{js,ts}', | ||
'**/test/mixins/**/*.browser.spec.{js,ts}', | ||
'**/node_modules/**/*' | ||
], | ||
}, | ||
}); |
Sorry, the diff of this file is not supported yet
43370
34
784