@umbraco-ui/uui-card 0.0.2 → 0.0.3
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 +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/{uui-card.element.js → index.js} +11 -28
- package/lib/uui-card.element.d.ts +5 -0
- package/package.json +6 -5
package/README.md
CHANGED
package/lib/index.d.ts
ADDED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
1
2
|
import { LitElement, css } from 'lit';
|
|
3
|
+
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
2
4
|
import { property } from 'lit/decorators.js';
|
|
3
5
|
import { SelectOnlyMixin, SelectableMixin } from '@umbraco-ui/uui-base/lib/mixins';
|
|
4
|
-
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
5
6
|
|
|
6
7
|
class UUICardEvent extends UUIEvent {
|
|
7
8
|
}
|
|
@@ -18,7 +19,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
18
19
|
__defProp(target, key, result);
|
|
19
20
|
return result;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
let UUICardElement = class extends SelectOnlyMixin(SelectableMixin(LitElement)) {
|
|
22
23
|
constructor() {
|
|
23
24
|
super(...arguments);
|
|
24
25
|
this.disabled = false;
|
|
@@ -39,7 +40,7 @@ class UUICardElement extends SelectOnlyMixin(SelectableMixin(LitElement)) {
|
|
|
39
40
|
e.stopPropagation();
|
|
40
41
|
this.dispatchEvent(new UUICardEvent(UUICardEvent.OPEN));
|
|
41
42
|
}
|
|
42
|
-
}
|
|
43
|
+
};
|
|
43
44
|
UUICardElement.styles = [
|
|
44
45
|
css`
|
|
45
46
|
:host {
|
|
@@ -109,17 +110,7 @@ UUICardElement.styles = [
|
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
:host([selectable]:not([selected]):hover) #select-border::after {
|
|
112
|
-
|
|
113
|
-
animation: not-selected--hover 1.2s infinite;
|
|
114
|
-
}
|
|
115
|
-
@-webkit-keyframes not-selected--hover {
|
|
116
|
-
0%,
|
|
117
|
-
100% {
|
|
118
|
-
opacity: 0.66;
|
|
119
|
-
}
|
|
120
|
-
50% {
|
|
121
|
-
opacity: 1;
|
|
122
|
-
}
|
|
113
|
+
animation: not-selected--hover 1.2s infinite;
|
|
123
114
|
}
|
|
124
115
|
@keyframes not-selected--hover {
|
|
125
116
|
0%,
|
|
@@ -132,17 +123,7 @@ UUICardElement.styles = [
|
|
|
132
123
|
}
|
|
133
124
|
|
|
134
125
|
:host([selectable][selected]:hover) #select-border::after {
|
|
135
|
-
|
|
136
|
-
animation: selected--hover 1.4s infinite;
|
|
137
|
-
}
|
|
138
|
-
@-webkit-keyframes selected--hover {
|
|
139
|
-
0%,
|
|
140
|
-
100% {
|
|
141
|
-
opacity: 1;
|
|
142
|
-
}
|
|
143
|
-
50% {
|
|
144
|
-
opacity: 0.66;
|
|
145
|
-
}
|
|
126
|
+
animation: selected--hover 1.4s infinite;
|
|
146
127
|
}
|
|
147
128
|
@keyframes selected--hover {
|
|
148
129
|
0%,
|
|
@@ -154,8 +135,7 @@ UUICardElement.styles = [
|
|
|
154
135
|
}
|
|
155
136
|
}
|
|
156
137
|
:host([selectable]) #open-part:hover + #select-border::after {
|
|
157
|
-
|
|
158
|
-
animation: none;
|
|
138
|
+
animation: none;
|
|
159
139
|
}
|
|
160
140
|
:host([error])::after {
|
|
161
141
|
inset: calc(var(--uui-card-border-width) * -2);
|
|
@@ -175,5 +155,8 @@ __decorateClass([
|
|
|
175
155
|
__decorateClass([
|
|
176
156
|
property({ type: Boolean, reflect: true })
|
|
177
157
|
], UUICardElement.prototype, "error", 2);
|
|
158
|
+
UUICardElement = __decorateClass([
|
|
159
|
+
defineElement("uui-card")
|
|
160
|
+
], UUICardElement);
|
|
178
161
|
|
|
179
|
-
export { UUICardElement };
|
|
162
|
+
export { UUICardElement, UUICardEvent };
|
|
@@ -27,4 +27,9 @@ export declare class UUICardElement extends UUICardElement_base {
|
|
|
27
27
|
protected handleOpenClick(e: Event): void;
|
|
28
28
|
protected handleOpenKeydown(e: KeyboardEvent): void;
|
|
29
29
|
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'uui-card': UUICardElement;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
30
35
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-card",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/umbraco/Umbraco.UI/issues"
|
|
21
21
|
},
|
|
22
|
-
"main": "./
|
|
22
|
+
"main": "./lib/index.js",
|
|
23
23
|
"module": "./lib/index.js",
|
|
24
|
+
"types": "./lib/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
24
26
|
"customElements": "custom-elements.json",
|
|
25
27
|
"files": [
|
|
26
|
-
"dist",
|
|
27
28
|
"lib/**/*.d.ts",
|
|
28
29
|
"lib/**/*.js",
|
|
29
30
|
"custom-elements.json"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@umbraco-ui/uui-base": "0.0.
|
|
33
|
+
"@umbraco-ui/uui-base": "0.0.16"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"access": "public"
|
|
41
42
|
},
|
|
42
43
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-card",
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6fbddfc1295e2ea00a532d4f9eb798165b2d39ac"
|
|
44
45
|
}
|