@aquera/nile-elements 0.0.73 → 0.0.75
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 +12 -0
- package/dist/index.iife.js +159 -208
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +8 -0
- package/dist/nile-card/nile-card.css.cjs.js +1 -1
- package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.css.esm.js +4 -4
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +30 -47
- package/dist/nile-checkbox/nile-checkbox.esm.js +56 -54
- package/dist/nile-input/nile-input.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +2 -2
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.esm.js +50 -91
- package/dist/nile-tag/nile-tag.esm.js +13 -14
- package/dist/src/nile-calendar/nile-calendar.css.js +8 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-card/nile-card.css.js +2 -2
- package/dist/src/nile-card/nile-card.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +30 -47
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -4
- package/dist/src/nile-checkbox/nile-checkbox.js +63 -67
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +2 -2
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.css.js +48 -89
- package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +2 -1
- package/dist/src/nile-tag/nile-tag.js +30 -13
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +8 -0
- package/src/nile-card/nile-card.css.ts +2 -2
- package/src/nile-checkbox/nile-checkbox.css.ts +34 -51
- package/src/nile-checkbox/nile-checkbox.ts +111 -108
- package/src/nile-input/nile-input.css.ts +2 -2
- package/src/nile-tag/nile-tag.css.ts +48 -89
- package/src/nile-tag/nile-tag.ts +34 -15
|
@@ -13,21 +13,22 @@ import { css } from 'lit-element';
|
|
|
13
13
|
export const styles = css`
|
|
14
14
|
:host {
|
|
15
15
|
display: inline-block;
|
|
16
|
-
--nile-remove-icon-color: var(--nile-colors-blue-500);
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
.tag {
|
|
20
19
|
display: flex;
|
|
21
20
|
align-items: center;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
gap: 3px;
|
|
21
|
+
border: solid 2px;
|
|
22
|
+
line-height: 1;
|
|
25
23
|
white-space: nowrap;
|
|
26
24
|
user-select: none;
|
|
27
25
|
border-radius: 4px;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
gap: 6px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.tag__remove::part(base) {
|
|
30
|
+
color: inherit;
|
|
31
|
+
padding: 0;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/*
|
|
@@ -35,120 +36,101 @@ export const styles = css`
|
|
|
35
36
|
*/
|
|
36
37
|
|
|
37
38
|
.tag--primary {
|
|
38
|
-
background: #
|
|
39
|
-
color: #
|
|
40
|
-
|
|
39
|
+
background: #005EA6;
|
|
40
|
+
border-color: #005EA6;
|
|
41
|
+
border: 2px solid #005EA6;
|
|
42
|
+
color: #FFF;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.tag--primary:hover {
|
|
44
|
-
|
|
46
|
+
border: 2px solid rgba(0, 94, 166, 0.50);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
.tag--primary:active > nile-icon {
|
|
49
|
+
.tag--primary:active > nile-icon-button {
|
|
48
50
|
color: hsl(200.4 98% 39.4%);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
.tag--success {
|
|
52
|
-
background: #
|
|
54
|
+
background: #A5F3E1;
|
|
55
|
+
border: 2px solid #A5F3E1;
|
|
53
56
|
color: #000;
|
|
54
|
-
--nile-remove-icon-color: var(--nile-colors-green-500);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.tag--success:hover {
|
|
58
|
-
|
|
60
|
+
border: 2px solid #43E5C0;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
.tag--success:active > nile-icon {
|
|
63
|
+
.tag--success:active > nile-icon-button {
|
|
62
64
|
color: hsl(142.1 76.2% 36.3%);
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
.tag--normal {
|
|
66
|
-
background: #
|
|
68
|
+
background: #E5E9EB;
|
|
69
|
+
border: 2px solid #E5E9EB;
|
|
67
70
|
color: #000;
|
|
68
|
-
--nile-remove-icon-color: var(--nile-colors-dark-500);
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
.tag--normal:hover {
|
|
72
|
-
|
|
74
|
+
border: 2px solid #C7CED4;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
|
|
78
|
+
.tag--normal:active > nile-icon-button {
|
|
76
79
|
color: hsl(240 5.2% 33.9%);
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
.tag--warning {
|
|
80
|
-
background: #
|
|
83
|
+
background: #F3E0A5;
|
|
84
|
+
border: 2px solid #F3E0A5;
|
|
81
85
|
color: #000;
|
|
82
|
-
--nile-remove-icon-color: var(--nile-colors-yellow-500);
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
.tag--warning:hover {
|
|
86
|
-
|
|
89
|
+
border: 2px solid #E5BF43;
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
.tag--warning:active > nile-icon {
|
|
92
|
+
.tag--warning:active > nile-icon-button {
|
|
90
93
|
color: hsl(32.1 94.6% 43.7%);
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
|
|
93
97
|
.tag--error {
|
|
94
|
-
background: #
|
|
98
|
+
background: #F3A5AA;
|
|
99
|
+
border: 2px solid #F3A5AA;
|
|
95
100
|
color: #000;
|
|
96
|
-
--nile-remove-icon-color: var(--nile-colors-red-500);
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
.tag--error:hover {
|
|
100
|
-
|
|
104
|
+
border: 2px solid #E5434D;
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
.tag--error:active > nile-icon {
|
|
107
|
+
.tag--error:active > nile-icon-button {
|
|
104
108
|
color: hsl(0 72.2% 50.6%);
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
.tag--info {
|
|
108
|
-
background: #
|
|
112
|
+
background: #A5D3F3;
|
|
113
|
+
border: 2px solid #A5D3F3;
|
|
109
114
|
color: #000000;
|
|
110
|
-
--nile-remove-icon-color: var(--nile-colors-blue-500);
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
.tag--info:hover {
|
|
114
|
-
|
|
118
|
+
border: 2px solid #42A3E5;
|
|
115
119
|
}
|
|
116
120
|
|
|
117
|
-
.tag--info:active > nile-icon {
|
|
121
|
+
.tag--info:active > nile-icon-button {
|
|
118
122
|
color: hsl(0 72.2% 50.6%);
|
|
119
123
|
}
|
|
120
124
|
|
|
121
|
-
.tag--gray {
|
|
122
|
-
background: var(--nile-tag-gray-background-color);
|
|
123
|
-
border: 1px solid var(--nile-colors-gray-light-mode-300);
|
|
124
|
-
color: var(--nile-tag-gray-color);
|
|
125
|
-
--nile-remove-icon-color: var(--nile-tag-gray-x-color);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.tag--gray:hover {
|
|
129
|
-
background-color: var(--nile-tag-gray-hover-background-color);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* .tag--gray:active > nile-icon {
|
|
133
|
-
color: #101828;
|
|
134
|
-
} */
|
|
135
|
-
|
|
136
|
-
.tag--small {
|
|
137
|
-
height: 24px;
|
|
138
|
-
padding: 3px 8px;
|
|
139
|
-
font-size: 12px;
|
|
140
|
-
font-style: normal;
|
|
141
|
-
font-weight: 500;
|
|
142
|
-
line-height: 18px;
|
|
143
|
-
}
|
|
144
125
|
|
|
145
126
|
.tag--medium {
|
|
146
|
-
height: 24px;
|
|
147
|
-
padding: 2px 9px;
|
|
148
127
|
font-size: 14px;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
128
|
+
height: 26px;
|
|
129
|
+
padding: 0 0.75rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.tag__remove {
|
|
133
|
+
margin-inline-start: 0.5rem;
|
|
152
134
|
}
|
|
153
135
|
|
|
154
136
|
/*
|
|
@@ -159,37 +141,14 @@ export const styles = css`
|
|
|
159
141
|
border-radius: 9999px;
|
|
160
142
|
}
|
|
161
143
|
|
|
162
|
-
.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
.tag--medium .tag__remove-wrapper {
|
|
167
|
-
display: inline-flex;
|
|
168
|
-
justify-content: centre;
|
|
169
|
-
box-sizing: border-box;
|
|
170
|
-
height: 16px;
|
|
171
|
-
width: 16px;
|
|
172
|
-
padding: 2px;
|
|
173
|
-
}
|
|
144
|
+
.tag__prefix {
|
|
145
|
+
padding: 3px 6px;
|
|
146
|
+
}
|
|
174
147
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
box-sizing: border-box;
|
|
179
|
-
height: 14px;
|
|
180
|
-
width: 14px;
|
|
181
|
-
padding: 2px;
|
|
182
|
-
}
|
|
148
|
+
.tag__content {
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
}
|
|
183
151
|
|
|
184
|
-
.tag--removable {
|
|
185
|
-
padding: 2px 2px 2px 9px;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.tag__remove:hover {
|
|
189
|
-
cursor: pointer;
|
|
190
|
-
--nile-remove-icon-color: #101828;
|
|
191
|
-
color: red;
|
|
192
|
-
}
|
|
193
152
|
`;
|
|
194
153
|
|
|
195
154
|
export default [styles];
|
package/src/nile-tag/nile-tag.ts
CHANGED
|
@@ -52,8 +52,7 @@ export class NileTag extends NileElement {
|
|
|
52
52
|
| 'normal'
|
|
53
53
|
| 'warning'
|
|
54
54
|
| 'error'
|
|
55
|
-
| 'info'
|
|
56
|
-
| 'gray' = 'normal';
|
|
55
|
+
| 'info' = 'normal';
|
|
57
56
|
|
|
58
57
|
/** The tag's size. */
|
|
59
58
|
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';
|
|
@@ -67,8 +66,29 @@ export class NileTag extends NileElement {
|
|
|
67
66
|
private handleRemoveClick() {
|
|
68
67
|
this.emit('nile-remove');
|
|
69
68
|
}
|
|
69
|
+
|
|
70
|
+
getCloseButtonColor() {
|
|
71
|
+
switch (this.variant) {
|
|
72
|
+
case 'primary':
|
|
73
|
+
return '--nile-colors-blue-500';
|
|
74
|
+
case 'success':
|
|
75
|
+
return '--nile-colors-green-500';
|
|
76
|
+
case 'normal':
|
|
77
|
+
return '--nile-colors-dark-500';
|
|
78
|
+
case 'warning':
|
|
79
|
+
return '--nile-colors-yellow-500';
|
|
80
|
+
case 'error':
|
|
81
|
+
return '--nile-colors-red-500';
|
|
82
|
+
case 'info':
|
|
83
|
+
return '--nile-colors-blue-500';
|
|
84
|
+
default:
|
|
85
|
+
return '--nile-colors-dark-500';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
70
88
|
|
|
89
|
+
|
|
71
90
|
render() {
|
|
91
|
+
const colorVariable = this.getCloseButtonColor();
|
|
72
92
|
return html`
|
|
73
93
|
<span
|
|
74
94
|
part="base"
|
|
@@ -82,7 +102,6 @@ export class NileTag extends NileElement {
|
|
|
82
102
|
'tag--warning': this.variant === 'warning',
|
|
83
103
|
'tag--error': this.variant === 'error',
|
|
84
104
|
'tag--info': this.variant === 'info',
|
|
85
|
-
'tag--gray': this.variant === 'gray',
|
|
86
105
|
|
|
87
106
|
// Sizes
|
|
88
107
|
'tag--small': this.size === 'small',
|
|
@@ -92,6 +111,7 @@ export class NileTag extends NileElement {
|
|
|
92
111
|
// Modifiers
|
|
93
112
|
'tag--pill': this.pill,
|
|
94
113
|
'tag--removable': this.removable,
|
|
114
|
+
|
|
95
115
|
})}
|
|
96
116
|
>
|
|
97
117
|
<slot name="prefix" part="prefix" class="tag__prefix"></slot>
|
|
@@ -100,18 +120,17 @@ export class NileTag extends NileElement {
|
|
|
100
120
|
|
|
101
121
|
${this.removable
|
|
102
122
|
? html`
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</span>
|
|
123
|
+
<nile-icon-button
|
|
124
|
+
part="remove-button"
|
|
125
|
+
exportparts="base:remove-button__base"
|
|
126
|
+
name="close"
|
|
127
|
+
library="system"
|
|
128
|
+
label="remove"
|
|
129
|
+
class="tag__remove"
|
|
130
|
+
@click=${this.handleRemoveClick}
|
|
131
|
+
tabindex="-1"
|
|
132
|
+
color="var(${colorVariable})"
|
|
133
|
+
></nile-icon-button>
|
|
115
134
|
`
|
|
116
135
|
: ''}
|
|
117
136
|
</span>
|