@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 CHANGED
@@ -13,7 +13,7 @@ npm i @umbraco-ui/uui-card
13
13
  ## Usage
14
14
 
15
15
  ```javascript
16
- import { UUICardElement } from '@umbraco-ui/uui-card/lib/uui-card.element';
16
+ import { UUICardElement } from '@umbraco-ui/uui-card';
17
17
 
18
18
  class MyCardElement extends UUICardElement {}
19
19
  ```
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './UUICardEvent';
2
+ export * from './uui-card.element';
@@ -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
- class UUICardElement extends SelectOnlyMixin(SelectableMixin(LitElement)) {
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
- -webkit-animation: not-selected--hover 1.2s infinite;
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
- -webkit-animation: selected--hover 1.4s infinite;
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
- -webkit-animation: none;
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.2",
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": "./dist/index.js",
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.15"
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": "2a640ce4460de94e9c92a97310e27b84bbd6edda"
44
+ "gitHead": "6fbddfc1295e2ea00a532d4f9eb798165b2d39ac"
44
45
  }