@dile/ui 2.16.2 → 2.17.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.
@@ -8,14 +8,10 @@ export class DileCard extends LitElement {
8
8
  }
9
9
  :host {
10
10
  display: block;
11
- align-items: stretch;
12
- }
13
- section {
14
11
  border: var(--dile-card-border, 1px solid #ccc);
15
12
  border-radius: var(--dile-card-border-radius, 0.5rem);
16
13
  background-color: var(--dile-card-background-color, #fff);
17
14
  color: var(--dile-card-text-color, #303030);
18
- width: 100%;
19
15
  text-align: var(--dile-card-text-align, left);
20
16
  font-weight: var(--dile-card-font-weight, normal);
21
17
  box-shadow: var(--dile-card-box-shadow, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1));
@@ -45,22 +41,22 @@ export class DileCard extends LitElement {
45
41
  border-bottom-left-radius: var(--dile-card-border-radius, 0.5rem);
46
42
  border-bottom-right-radius: var(--dile-card-border-radius, 0.5rem);
47
43
  }
48
- :host([shadow-none]) section {
44
+ :host([shadow-none]) {
49
45
  box-shadow: var(--dile-card-box-shadow, 0 0 #0000);
50
46
  }
51
- :host([shadow-sm]) section {
47
+ :host([shadow-sm]) {
52
48
  box-shadow: var(--dile-card-box-shadow, 0 1px 2px 0 rgb(0 0 0 / 0.05));
53
49
  }
54
- :host([shadow-md]) section {
50
+ :host([shadow-md]) {
55
51
  box-shadow: var(--dile-card-box-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
56
52
  }
57
- :host([shadow-lg]) section {
53
+ :host([shadow-lg]) {
58
54
  box-shadow: var(--dile-card-box-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1));
59
55
  }
60
- :host([shadow-xl]) section {
56
+ :host([shadow-xl]) {
61
57
  box-shadow: var(--dile-card-box-shadow, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1));
62
58
  }
63
- :host([shadow-2xl]) section {
59
+ :host([shadow-2xl]) {
64
60
  box-shadow: var(--dile-card-box-shadow, 0 25px 50px -12px rgb(0 0 0 / 0.25));
65
61
  }
66
62
 
@@ -75,13 +71,11 @@ export class DileCard extends LitElement {
75
71
 
76
72
  render() {
77
73
  return html`
78
- <section>
79
- ${this.titleTemplate}
80
- <main>
81
- <slot></slot>
82
- </main>
83
- ${this.footerTemplate}
84
- </section>
74
+ ${this.titleTemplate}
75
+ <main>
76
+ <slot></slot>
77
+ </main>
78
+ ${this.footerTemplate}
85
79
  `;
86
80
  }
87
81
 
@@ -2,6 +2,7 @@ import { html, css, LitElement } from "lit";
2
2
  import { DileEmmitChange } from '../../../mixins/form/index.js';
3
3
  import { checkboxBlankIcon, checkboxCheckedIcon } from '@dile/icons';
4
4
  import '../../icon/icon.js';
5
+ import '../../input/input-message.js';
5
6
 
6
7
  export class DileCheckbox extends DileEmmitChange(LitElement) {
7
8
  static get properties() {
@@ -10,6 +11,9 @@ export class DileCheckbox extends DileEmmitChange(LitElement) {
10
11
  disabled: { type: Boolean, reflect: true, },
11
12
  _hasInner: { type: Boolean },
12
13
  name: { type: String },
14
+ message: { type: String },
15
+ errored: { type: Boolean },
16
+ hideErrorOnInput: { type: Boolean },
13
17
  };
14
18
  }
15
19
 
@@ -22,6 +26,7 @@ export class DileCheckbox extends DileEmmitChange(LitElement) {
22
26
  this.checked = false;
23
27
  this.name = '';
24
28
  this.internals = this.attachInternals();
29
+ this.message = ''
25
30
  }
26
31
 
27
32
  static get styles() {
@@ -86,6 +91,10 @@ export class DileCheckbox extends DileEmmitChange(LitElement) {
86
91
  </a>
87
92
  ${this.innerTemplate}
88
93
  </div>
94
+ ${this.message
95
+ ? html`<dile-input-message message="${this.message}" ?errored=${this.errored}></dile-input-message>`
96
+ : ''
97
+ }
89
98
  `;
90
99
  }
91
100
 
@@ -104,6 +113,10 @@ export class DileCheckbox extends DileEmmitChange(LitElement) {
104
113
  if (this.disabled) {
105
114
  return;
106
115
  }
116
+ if(this.hideErrorOnInput && this.errored) {
117
+ this.message = '';
118
+ this.errored = false;
119
+ }
107
120
  this.checked = !this.checked;
108
121
  this.dispatchEvent(
109
122
  new CustomEvent("dile-checkbox-changed", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/ui",
3
- "version": "2.16.2",
3
+ "version": "2.17.1",
4
4
  "description": "UI Core components from dile-components.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,5 +26,5 @@
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
- "gitHead": "8ef9bee84a3a5b6acaf22dc3b9d39550f5ceeb80"
29
+ "gitHead": "465b457fe94482e1db3ea69d2cfa7bf0713f3a11"
30
30
  }