@lookwe/lit-mixins 1.0.0 → 1.0.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/index.d.ts +4 -4
- package/internal/delegate-focus.d.ts +1 -1
- package/internal/element-internals.d.ts +1 -1
- package/internal/element-internals.js +1 -1
- package/internal/form-associated.d.ts +1 -1
- package/internal/form-associated.js +2 -3
- package/internal/popover-target.d.ts +1 -1
- package/internal/popover-target.js +3 -4
- package/package.json +17 -17
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './internal/delegate-focus';
|
|
2
|
-
export * from './internal/element-internals';
|
|
3
|
-
export * from './internal/form-associated';
|
|
4
|
-
export * from './internal/popover-target';
|
|
1
|
+
export * from './internal/delegate-focus.js';
|
|
2
|
+
export * from './internal/element-internals.js';
|
|
3
|
+
export * from './internal/form-associated.js';
|
|
4
|
+
export * from './internal/popover-target.js';
|
|
@@ -28,7 +28,7 @@ function mixinElementInternals(base) {
|
|
|
28
28
|
class WithElementInternalsElement extends base {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
|
-
_WithElementInternalsElement_internals.set(this,
|
|
31
|
+
_WithElementInternalsElement_internals.set(this, void 0);
|
|
32
32
|
}
|
|
33
33
|
get [(_WithElementInternalsElement_internals = new WeakMap(), internals)]() {
|
|
34
34
|
// Create internals in getter so that it can be used in methods called on
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __classPrivateFieldGet, __classPrivateFieldSet, __runInitializers, __esDecorate } from 'tslib';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { stringConverter } from '@lookwe/lit-converters';
|
|
4
3
|
import { internals } from './element-internals.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -114,7 +113,7 @@ function mixinFormAssociated(base) {
|
|
|
114
113
|
if (!this.isConnected)
|
|
115
114
|
return;
|
|
116
115
|
this[internals].setFormValue(this[getFormValue](), this[getFormState]());
|
|
117
|
-
}, _name_decorators = [property({ reflect: true,
|
|
116
|
+
}, _name_decorators = [property({ reflect: true, useDefault: true })], _disabled_decorators = [property({ type: Boolean })], getFormState)]() {
|
|
118
117
|
return this[getFormValue]();
|
|
119
118
|
}
|
|
120
119
|
formDisabledCallback(disabled) {
|
|
@@ -129,7 +128,7 @@ function mixinFormAssociated(base) {
|
|
|
129
128
|
}
|
|
130
129
|
},
|
|
131
130
|
(() => {
|
|
132
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) :
|
|
131
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
133
132
|
__esDecorate(_a, null, _name_decorators, { kind: "accessor", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
|
|
134
133
|
__esDecorate(_a, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
135
134
|
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactiveElement } from 'lit';
|
|
2
|
-
import { MixinBase, MixinReturn } from '@lookwe/utils';
|
|
2
|
+
import { MixinBase, MixinReturn } from '@lookwe/utils/types';
|
|
3
3
|
/**
|
|
4
4
|
* An instance with all the useful properties to use the [Popover
|
|
5
5
|
* api](https://developer.mozilla.org/docs/Web/API/Popover_API).
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __runInitializers, __esDecorate } from 'tslib';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { stringConverter } from '@lookwe/lit-converters';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Mixes in popovertarget behavior for a class. This allows an element to control an external popover element.
|
|
@@ -66,8 +65,8 @@ function mixinPopoverTarget(base) {
|
|
|
66
65
|
return root.querySelector(`#${CSS.escape(this.popoverTarget)}`);
|
|
67
66
|
},
|
|
68
67
|
(() => {
|
|
69
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) :
|
|
70
|
-
_popoverTarget_decorators = [property({ reflect: true, attribute: 'popovertarget',
|
|
68
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
69
|
+
_popoverTarget_decorators = [property({ reflect: true, attribute: 'popovertarget', useDefault: true })];
|
|
71
70
|
_set_popoverTargetElement_decorators = [property({ attribute: false })];
|
|
72
71
|
_popoverTargetAction_decorators = [property({ attribute: 'popovertargetaction' })];
|
|
73
72
|
__esDecorate(_a, null, _popoverTarget_decorators, { kind: "accessor", name: "popoverTarget", static: false, private: false, access: { has: obj => "popoverTarget" in obj, get: obj => obj.popoverTarget, set: (obj, value) => { obj.popoverTarget = value; } }, metadata: _metadata }, _popoverTarget_initializers, _popoverTarget_extraInitializers);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lit popover target"
|
|
15
15
|
],
|
|
16
16
|
"author": "Lookwe",
|
|
17
|
-
"version": "1.0.
|
|
17
|
+
"version": "1.0.1",
|
|
18
18
|
"type": "module",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "rollup --config rollup-dist.config.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"lint": "npm run lint:eslint && npm run lint:ts",
|
|
25
25
|
"lint:eslint": "eslint 'src/**/*.ts'",
|
|
26
26
|
"lint:ts": "tsc --noEmit",
|
|
27
|
-
"format": "prettier --check --ignore-path .gitignore
|
|
27
|
+
"format": "prettier --check --ignore-path .gitignore .",
|
|
28
28
|
"format:fix": "npm run format -- --write && npm run format -- --write --plugin=@homer0/prettier-plugin-jsdoc",
|
|
29
29
|
"test": "npm run build && wtr && MODE=prod wtr",
|
|
30
30
|
"test:dev": "npm run build && wtr",
|
|
@@ -55,31 +55,31 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@lookwe/
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"tslib": "^2.8.0"
|
|
58
|
+
"@lookwe/utils": "^1.1.2",
|
|
59
|
+
"lit": "^3.3.0",
|
|
60
|
+
"tslib": "^2.8.1"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
|
-
"@homer0/prettier-plugin-jsdoc": "^
|
|
63
|
+
"@homer0/prettier-plugin-jsdoc": "^10.0.0",
|
|
65
64
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
66
65
|
"@open-wc/testing": "^4.0.0",
|
|
67
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
66
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
68
67
|
"@rollup/plugin-replace": "^6.0.2",
|
|
69
68
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
69
|
+
"@tsconfig/strictest": "^2.0.5",
|
|
70
70
|
"@types/mocha": "^10.0.10",
|
|
71
71
|
"@web/dev-server-rollup": "^0.6.4",
|
|
72
|
-
"@web/test-runner": "^0.
|
|
72
|
+
"@web/test-runner": "^0.20.1",
|
|
73
73
|
"@web/test-runner-commands": "^0.9.0",
|
|
74
74
|
"@web/test-runner-playwright": "^0.11.0",
|
|
75
|
-
"eslint": "^9.
|
|
76
|
-
"globals": "^
|
|
77
|
-
"prettier": "^3.
|
|
78
|
-
"rollup": "^4.
|
|
75
|
+
"eslint": "^9.25.1",
|
|
76
|
+
"globals": "^16.0.0",
|
|
77
|
+
"prettier": "^3.5.3",
|
|
78
|
+
"rollup": "^4.40.0",
|
|
79
79
|
"rollup-plugin-multi-input": "^1.5.0",
|
|
80
|
-
"semantic-release": "^24.2.
|
|
81
|
-
"sinon": "^
|
|
82
|
-
"typescript": "^5.
|
|
83
|
-
"typescript-eslint": "^8.
|
|
80
|
+
"semantic-release": "^24.2.3",
|
|
81
|
+
"sinon": "^20.0.0",
|
|
82
|
+
"typescript": "^5.8.3",
|
|
83
|
+
"typescript-eslint": "^8.31.0"
|
|
84
84
|
}
|
|
85
85
|
}
|