milk-lib 0.0.29 → 0.0.31

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.
@@ -3,7 +3,7 @@
3
3
  import type { IButtonMilkProps } from './ButtonMilk.types';
4
4
  import "./ButtonMilk.scss";
5
5
 
6
- const {
6
+ let {
7
7
  size = 'sm',
8
8
  variant = 'primary-emphasis',
9
9
  children,
@@ -14,13 +14,14 @@
14
14
  let buttonRef: ButtonInstance;
15
15
  export const focus = () => buttonRef.focus();
16
16
 
17
- let sizeClassName =
17
+ const sizeClassName = $derived(
18
18
  size === "sm" ? "Button-sm"
19
19
  : size === "md" ? "Button-md"
20
20
  : size === "lg" ? "Button-lg"
21
- : "";
21
+ : ""
22
+ );
22
23
 
23
- let variantClassname =
24
+ const variantClassname = $derived(
24
25
  variant === "primary-emphasis" ? "Button-primary-emphasis"
25
26
  : variant === "primary-outlined" ? "Button-primary-outlined"
26
27
  : variant === "primary-contained" ? "Button-primary-contained"
@@ -30,8 +31,9 @@
30
31
  : variant === "danger-contained" ? "Button-danger-contained"
31
32
  : variant === "danger-outlined" ? "Button-danger-outlined"
32
33
  : variant === "danger-emphasis" ? "Button-danger-emphasis" : ""
34
+ );
33
35
 
34
- let classNames = `${sizeClassName} ${variantClassname}`;
36
+ const classNames = $derived(`${sizeClassName} ${variantClassname}`);
35
37
 
36
38
  </script>
37
39
 
@@ -1,6 +1,6 @@
1
1
  import type { Snippet } from "svelte";
2
2
  import type { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler } from "svelte/elements";
3
- export type TextInputType = "text" | "password";
3
+ export type TextInputType = "text" | "password" | "number" | "email" | "url" | "search";
4
4
  export type TextInputInstance = {
5
5
  focus: () => void;
6
6
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "milk-lib",
3
3
  "license": "MIT",
4
- "version": "0.0.29",
4
+ "version": "0.0.31",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && npm run prepack",