@nuralyui/card 0.0.9 → 0.0.10
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/bundle.js +69 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -1 +1,69 @@
|
|
|
1
|
-
import{css as r,LitElement as a,html as o}from"lit";import{property as d,customElement as
|
|
1
|
+
import{css as r,LitElement as a,html as o}from"lit";import{property as d,customElement as c}from"lit/decorators.js";import{classMap as n}from"lit/directives/class-map.js";import{NuralyUIBaseMixin as l}from"@nuralyui/common/mixins";const e=r`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
color: var(--nuraly-color-text);
|
|
5
|
+
background-color: var(--nuraly-color-background);
|
|
6
|
+
font-family: var(--nuraly-card-font-family);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.card {
|
|
10
|
+
background-color: var(--nuraly-card-background-color);
|
|
11
|
+
border-radius: var(--nuraly-card-border-radius);
|
|
12
|
+
border: var(--nuraly-card-border);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
transition: var(--nuraly-card-transition);
|
|
15
|
+
box-shadow: var(--nuraly-card-shadow);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.card:hover {
|
|
19
|
+
cursor: var(--nuraly-card-cursor);
|
|
20
|
+
box-shadow: var(--nuraly-card-hover-shadow);
|
|
21
|
+
background-color: var(--nuraly-card-hover-background-color);
|
|
22
|
+
border-color: var(--nuraly-card-hover-border-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.card__header {
|
|
26
|
+
font-weight: var(--nuraly-card-header-font-weight);
|
|
27
|
+
border-bottom: var(--nuraly-card-header-border-bottom);
|
|
28
|
+
padding: var(--nuraly-card-padding);
|
|
29
|
+
background-color: var(--nuraly-card-header-background-color);
|
|
30
|
+
font-size: var(--nuraly-card-font-size);
|
|
31
|
+
color: var(--nuraly-card-header-color);
|
|
32
|
+
line-height: var(--nuraly-card-line-height);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.card__content {
|
|
36
|
+
padding: var(--nuraly-card-padding);
|
|
37
|
+
color: var(--nuraly-card-content-color);
|
|
38
|
+
font-size: var(--nuraly-card-font-size);
|
|
39
|
+
line-height: var(--nuraly-card-line-height);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Size variants */
|
|
43
|
+
.card--small .card__header,
|
|
44
|
+
.card--small .card__content {
|
|
45
|
+
padding: var(--nuraly-card-small-padding);
|
|
46
|
+
font-size: var(--nuraly-card-small-font-size);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.card--large .card__header,
|
|
50
|
+
.card--large .card__content {
|
|
51
|
+
padding: var(--nuraly-card-large-padding);
|
|
52
|
+
font-size: var(--nuraly-card-large-font-size);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Focus styles for accessibility */
|
|
56
|
+
.card:focus-within {
|
|
57
|
+
outline: var(--nuraly-card-focus-outline);
|
|
58
|
+
outline-offset: var(--nuraly-card-focus-offset);
|
|
59
|
+
}
|
|
60
|
+
`;var t=function(r,a,o,d){for(var c,n=arguments.length,l=n<3?a:null===d?d=Object.getOwnPropertyDescriptor(a,o):d,e=r.length-1;e>=0;e--)(c=r[e])&&(l=(n<3?c(l):n>3?c(a,o,l):c(a,o))||l);return n>3&&l&&Object.defineProperty(a,o,l),l};let i=class extends(l(a)){constructor(){super(...arguments),this.header="",this.size="default"}render(){return o`
|
|
61
|
+
<div
|
|
62
|
+
class="card ${n({"card--small":"small"===this.size,"card--large":"large"===this.size})}"
|
|
63
|
+
>
|
|
64
|
+
${this.header?o`<div class="card__header">${this.header}</div>`:""}
|
|
65
|
+
<div class="card__content">
|
|
66
|
+
<slot name="content"></slot>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
`}};i.styles=e,t([d({type:String})],i.prototype,"header",void 0),t([d({type:String})],i.prototype,"size",void 0),i=t([c("nr-card")],i);export{i as NrCardElement};
|