noph-ui 0.16.11 → 0.16.13

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.
@@ -24,6 +24,7 @@
24
24
  children,
25
25
  onfocus,
26
26
  onblur,
27
+ inputClass,
27
28
  ...attributes
28
29
  }: TextFieldProps = $props()
29
30
 
@@ -183,7 +184,7 @@
183
184
  }}
184
185
  bind:value
185
186
  bind:this={inputElement}
186
- class="input"
187
+ class={['input', inputClass]}
187
188
  rows={attributes.rows || 2}
188
189
  ></textarea>
189
190
  {:else}
@@ -207,7 +208,7 @@
207
208
  focused = false
208
209
  ;(onblur as FocusEventHandler<HTMLInputElement>)?.(event)
209
210
  }}
210
- class="input"
211
+ class={['input', inputClass]}
211
212
  aria-invalid={errorRaw}
212
213
  />
213
214
  {#if suffixText}
@@ -487,7 +488,7 @@
487
488
  margin-bottom: var(--bottom-space, 0.5rem);
488
489
  }
489
490
  .content .input-wrapper .input {
490
- min-width: 100px;
491
+ min-width: 4rem;
491
492
  }
492
493
  :global(.content .input-wrapper .np-chip-set) {
493
494
  margin-top: calc(var(--top-space, 1.5rem) - 4px);
@@ -1,5 +1,5 @@
1
1
  import type { Snippet } from 'svelte';
2
- import type { HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
2
+ import type { ClassValue, HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
3
3
  interface FieldProps {
4
4
  label?: string;
5
5
  supportingText?: string;
@@ -14,6 +14,7 @@ interface FieldProps {
14
14
  element?: HTMLSpanElement;
15
15
  inputElement?: HTMLInputElement | HTMLTextAreaElement;
16
16
  populated?: boolean;
17
+ inputClass?: ClassValue;
17
18
  reportValidity?: () => boolean;
18
19
  checkValidity?: () => boolean;
19
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.16.11",
3
+ "version": "0.16.13",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {
@@ -70,8 +70,8 @@
70
70
  "svelte": "^5.25.3",
71
71
  "svelte-check": "^4.1.5",
72
72
  "typescript": "^5.8.2",
73
- "typescript-eslint": "^8.27.0",
74
- "vite": "^6.2.2",
73
+ "typescript-eslint": "^8.28.0",
74
+ "vite": "^6.2.3",
75
75
  "vitest": "^3.0.9"
76
76
  },
77
77
  "svelte": "./dist/index.js",