noph-ui 0.26.4 → 0.26.6

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.
@@ -40,7 +40,7 @@
40
40
  errorRaw && 'error',
41
41
  disabled && 'disabled',
42
42
  required && !noAsterisk && 'asterisk',
43
- !value && 'is-empty',
43
+ (value === null || value === undefined || value === '') && 'is-empty',
44
44
  animateLabel && 'animate-label',
45
45
  attributes.class,
46
46
  ]}
@@ -69,7 +69,12 @@
69
69
  </svg>
70
70
  <select
71
71
  oninput={(event) => {
72
- if ((!value && event.currentTarget.value) || (value && !event.currentTarget.value)) {
72
+ if (
73
+ (!animateLabel &&
74
+ (value === null || value === undefined || value === '') &&
75
+ event.currentTarget.value) ||
76
+ (value !== null && value !== undefined && value !== '' && !event.currentTarget.value)
77
+ ) {
73
78
  animateLabel = true
74
79
  }
75
80
  onchange?.(event)
@@ -103,7 +108,6 @@
103
108
  <style>
104
109
  .np-select-container {
105
110
  --easing-fast: ease-out 150ms;
106
- all: unset;
107
111
  position: relative;
108
112
  font-size: 1rem;
109
113
  display: inline-block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.26.4",
3
+ "version": "0.26.6",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {