@neovici/cosmoz-input 5.2.2 → 5.2.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.
Files changed (2) hide show
  1. package/dist/styles.js +29 -11
  2. package/package.json +1 -1
package/dist/styles.js CHANGED
@@ -109,10 +109,14 @@ export const styles = css `
109
109
  text-transform: var(--cosmoz-input-label-text-transform);
110
110
  font-weight: var(--cosmoz-input-label-font-weight);
111
111
  }
112
- .wrap:has(#input:not(:placeholder-shown)) slot[name='suffix']::slotted(*),
113
- .wrap:has(#input:not(:placeholder-shown)) slot[name='prefix']::slotted(*) {
114
- transform: translateY(var(--label-translate-y));
112
+
113
+ .wrap:has(#input:not(:placeholder-shown)) {
114
+ slot[name='suffix']::slotted(*),
115
+ slot[name='prefix']::slotted(*) {
116
+ transform: translateY(var(--label-translate-y));
117
+ }
115
118
  }
119
+
116
120
  :host([always-float-label]) label,
117
121
  #input:not(:placeholder-shown) + label {
118
122
  transform: translateY(
@@ -127,9 +131,11 @@ export const styles = css `
127
131
  transform: translateY(var(--label-translate-y));
128
132
  }
129
133
 
130
- :host([always-float-label]) slot[name='suffix']::slotted(*),
131
- :host([always-float-label]) slot[name='prefix']::slotted(*) {
132
- transform: translateY(var(--label-translate-y));
134
+ :host([always-float-label]) {
135
+ slot[name='suffix']::slotted(*),
136
+ slot[name='prefix']::slotted(*) {
137
+ transform: translateY(var(--label-translate-y));
138
+ }
133
139
  }
134
140
 
135
141
  :host(:not(always-float-label):focus-within) #input::placeholder,
@@ -138,12 +144,29 @@ export const styles = css `
138
144
  opacity: 1;
139
145
  }
140
146
 
147
+ :host([no-label-float]) {
148
+ .float,
149
+ label {
150
+ display: none;
151
+ }
152
+
153
+ #input:not(:placeholder-shown) {
154
+ transform: translateY(0%);
155
+ }
156
+
157
+ .wrap:has(#input:not(:placeholder-shown)) slot[name='suffix']::slotted(*),
158
+ .wrap:has(#input:not(:placeholder-shown)) slot[name='prefix']::slotted(*) {
159
+ transform: translateY(0%);
160
+ }
161
+ }
162
+
141
163
  .line {
142
164
  padding-top: 1px;
143
165
  border-bottom: 1px solid var(--line-color);
144
166
  position: relative;
145
167
  display: var(--cosmoz-input-line-display, block);
146
168
  }
169
+
147
170
  .line::before {
148
171
  content: '';
149
172
  position: absolute;
@@ -174,11 +197,6 @@ export const styles = css `
174
197
  opacity: var(--disabled-line-opacity);
175
198
  }
176
199
 
177
- :host([no-label-float]) .float,
178
- :host([no-label-float]) label {
179
- display: none;
180
- }
181
-
182
200
  .error {
183
201
  font-size: 12px;
184
202
  line-height: 20px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-input",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "A input web component",
5
5
  "keywords": [
6
6
  "lit-html",