noph-ui 0.11.8 → 0.11.10

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.
@@ -6,7 +6,7 @@
6
6
  import type { FilterChipProps } from './types.ts'
7
7
 
8
8
  let {
9
- selected = $bindable(false),
9
+ selected = $bindable(),
10
10
  removable = false,
11
11
  elevated = false,
12
12
  disabled = false,
@@ -18,6 +18,7 @@
18
18
  name,
19
19
  value,
20
20
  group = $bindable(),
21
+ defaultSelected,
21
22
  ...attributes
22
23
  }: FilterChipProps = $props()
23
24
 
@@ -47,9 +48,24 @@
47
48
  </div>
48
49
  <div class="np-chip-label">{label}</div>
49
50
  {#if group !== undefined}
50
- <input type="checkbox" bind:checked={selected} {value} {name} {disabled} bind:group />
51
+ <input
52
+ type="checkbox"
53
+ bind:checked={selected}
54
+ {value}
55
+ {name}
56
+ {disabled}
57
+ defaultChecked={defaultSelected}
58
+ bind:group
59
+ />
51
60
  {:else}
52
- <input type="checkbox" bind:checked={selected} {value} {name} {disabled} />
61
+ <input
62
+ type="checkbox"
63
+ bind:checked={selected}
64
+ {value}
65
+ {name}
66
+ {disabled}
67
+ defaultChecked={defaultSelected}
68
+ />
53
69
  {/if}
54
70
  </label>
55
71
  {#if !disabled}
@@ -12,5 +12,6 @@ export interface FilterChipProps extends HTMLAttributes<HTMLDivElement> {
12
12
  name?: string;
13
13
  value?: string;
14
14
  group?: string | number | null;
15
+ defaultSelected?: boolean | null;
15
16
  remove?: (chip: HTMLDivElement) => void;
16
17
  }
@@ -60,6 +60,7 @@
60
60
  .np-dialog-container {
61
61
  background: transparent;
62
62
  border: none;
63
+ margin: auto;
63
64
  padding: 9px 14px 20px 14px;
64
65
  z-index: 1000;
65
66
  padding: 2rem 1rem;
@@ -81,7 +82,6 @@
81
82
  scrollbar-width: thin;
82
83
  transition: opacity 0.25s ease;
83
84
  opacity: 0;
84
- margin: auto;
85
85
  position: relative;
86
86
  }
87
87
  .np-dialog-container:popover-open .np-dialog {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.11.8",
3
+ "version": "0.11.10",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {