@okaapp/oka-ui-sv 0.4.3 → 0.4.4

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.
@@ -18,7 +18,6 @@
18
18
  ref = $bindable(null),
19
19
  value = $bindable(),
20
20
  invalid = $bindable(false),
21
- class: className,
22
21
  ...restProps
23
22
  }: Props & {
24
23
  invalid?: boolean;
@@ -34,8 +34,8 @@
34
34
 
35
35
  .input:disabled {
36
36
  cursor: not-allowed;
37
- background-color: var(--surface-secondary);
38
- border-color: var(--stroke-muted);
37
+ background-color: var(--stroke-muted);
38
+ border-color: var(--stroke-light);
39
39
  }
40
40
 
41
41
  .input:invalid {
@@ -11,6 +11,7 @@
11
11
  value = $bindable(),
12
12
  items = [] as SelectItem[],
13
13
  placeholder = "Chọn ở đây",
14
+ onvaluechange = undefined as ((value: string) => void) | undefined,
14
15
  ...props
15
16
  } = $props();
16
17
 
@@ -21,7 +22,12 @@
21
22
 
22
23
  <Select.Root
23
24
  type="single"
24
- onValueChange={(v) => (value = v)}
25
+ onValueChange={(v) => {
26
+ if (v) {
27
+ value = v;
28
+ onvaluechange?.(v);
29
+ }
30
+ }}
25
31
  {items}
26
32
  {...props}
27
33
  >
@@ -4,6 +4,7 @@ declare const SingleSelect: import("svelte").Component<{
4
4
  value?: any;
5
5
  items?: SelectItem[];
6
6
  placeholder?: string;
7
+ onvaluechange?: ((value: string) => void) | undefined;
7
8
  } & Record<string, any>, {}, "value">;
8
9
  type SingleSelect = ReturnType<typeof SingleSelect>;
9
10
  export default SingleSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okaapp/oka-ui-sv",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "OKA UI Svelte components library for the Appta software platform",
5
5
  "license": "MIT",
6
6
  "scripts": {