hamzus-ui 0.0.169 → 0.0.171

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.169",
3
+ "version": "0.0.171",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -67,7 +67,7 @@
67
67
  selectedMonth = currentMonth
68
68
  selectedYear = currentYear
69
69
 
70
- handleUpdateValue(day)
70
+ handleUpdateValue(day, false)
71
71
  })
72
72
 
73
73
  function getYearList(startYear = 1997) {
@@ -161,7 +161,7 @@
161
161
  weeks = generateCalendarMatrix(currentYear, currentMonth - 1);
162
162
  }
163
163
 
164
- function handleUpdateValue(day) {
164
+ function handleUpdateValue(day, toggleDisplayAfter = true) {
165
165
  if (day !== null) {
166
166
  selectedDay = day;
167
167
  selectedYear = currentYear;
@@ -185,7 +185,7 @@
185
185
  onChange(value);
186
186
  }
187
187
 
188
- toggleDisplay();
188
+ if (toggleDisplayAfter) toggleDisplay();
189
189
  }
190
190
  function handleUpdateHour(inputValue) {
191
191
 
@@ -186,6 +186,9 @@
186
186
  {style}
187
187
  {...$$restProps}
188
188
  >
189
+ {#if required && !selection}
190
+ <input type="text" name={name} {required}>
191
+ {/if}
189
192
  <div
190
193
  class="input {errorMessage ? ' error' : ''}"
191
194
  style="{variant == 'collapse'
@@ -244,7 +247,6 @@
244
247
  {placeholder}
245
248
  bind:value={search}
246
249
  bind:this={input}
247
- {required}
248
250
  disabled={isLoading ? true : disabled}
249
251
  />
250
252
  </div>