milk-lib 0.0.16 → 0.0.17

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/README.md CHANGED
@@ -8,4 +8,14 @@ Sveltekit library, powered by [`sv`](https://npmjs.com/package/sv).
8
8
  ## Roadmap
9
9
  + TextInput Milk
10
10
  + TextInput Box
11
- - Command
11
+ + Command
12
+
13
+ - Alert Dialog
14
+ - Accordion
15
+ - Sheet
16
+ - Menu
17
+ - Card
18
+ - Checkbox
19
+ - Select
20
+ - Dialogs
21
+ - Icons
@@ -23,6 +23,7 @@
23
23
  ariaHasPopup,
24
24
  ariaExpanded,
25
25
  ariaControls,
26
+ dataVariant,
26
27
  ...rest
27
28
  }: ITextInputProps = $props();
28
29
 
@@ -61,6 +62,7 @@
61
62
  aria-haspopup={ariaHasPopup}
62
63
  aria-expanded={ariaExpanded}
63
64
  aria-controls={ariaControls}
65
+ {...(dataVariant ? { 'data-variant': dataVariant } : {})}
64
66
  {...rest}
65
67
  />
66
68
 
@@ -25,6 +25,7 @@ export interface ITextInputProps {
25
25
  ariaHasPopup?: "dialog" | "menu" | "listbox" | "tree" | "grid" | null | undefined;
26
26
  ariaExpanded?: boolean;
27
27
  ariaControls?: string;
28
+ dataVariant?: string;
28
29
  }
29
30
  export type ITextInputMessageVariant = 'default' | 'error';
30
31
  export interface ITextInputMessageProps {
@@ -1,4 +1,4 @@
1
- .TextInput.TextInput-sm {
1
+ .TextInput.TextInput-sm[data-variant="milk"] {
2
2
  --padding-y: 5px;
3
3
  --padding-x: 5px;
4
4
  --font-size: var(--font-size-sm);
@@ -6,7 +6,7 @@
6
6
  --border-radius: var(--border-radius-button-sm);
7
7
  }
8
8
 
9
- .TextInput.TextInput-md {
9
+ .TextInput.TextInput-md[data-variant="milk"] {
10
10
  --padding-y: 5px;
11
11
  --padding-x: 6px;
12
12
  --font-size: var(--font-size-md);
@@ -14,7 +14,7 @@
14
14
  --border-radius: var(--border-radius-button);
15
15
  }
16
16
 
17
- .TextInput.TextInput-lg {
17
+ .TextInput.TextInput-lg[data-variant="milk"] {
18
18
  --padding-y: 7px;
19
19
  --padding-x: 12px;
20
20
  --font-size: var(--font-size-lg);
@@ -22,7 +22,7 @@
22
22
  --border-radius: var(--border-radius-button);
23
23
  }
24
24
 
25
- .TextInput.TextInput-text {
25
+ .TextInput.TextInput-text[data-variant="milk"] {
26
26
  --padding-x: 0px;
27
27
  --border-radius: 0;
28
28
  --border-width: 0px;
@@ -30,7 +30,7 @@
30
30
  --border-color: transparent;
31
31
  --border-color-focus: transparent;
32
32
  }
33
- .TextInput.TextInput-underlined {
33
+ .TextInput.TextInput-underlined[data-variant="milk"] {
34
34
  --padding-x: 0px;
35
35
 
36
36
  --border-radius: 0;
@@ -76,6 +76,6 @@
76
76
  --border-left-width-invalid: 0px;
77
77
  --border-right-width-invalid: 0px;
78
78
  }
79
- .TextInput.TextInput-contained {
79
+ .TextInput.TextInput-contained[data-variant="milk"] {
80
80
  // Default
81
81
  }
@@ -35,5 +35,6 @@
35
35
  bind:value
36
36
  bind:this={textInputRef}
37
37
  {classNames}
38
+ dataVariant='milk'
38
39
  {...rest}
39
40
  />
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "milk-lib",
3
3
  "license": "MIT",
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && npm run prepack",