y200subcontrols 0.1.353 → 0.1.355

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,9 +24,10 @@ $: {
24
24
  {linkStyle === 'indigo' ? 'hover:text-indigo-500 active:text-indigo-600' : ''}
25
25
  {linkStyle === 'purple' ? 'hover:text-purple-500 active:text-purple-600' : ''}
26
26
 
27
-
28
27
  aria-disabled:text-slate-300 dark:aria-disabled:text-slate-500
29
- space-x-1 transition-colors ease-in-out duration-150"
28
+ space-x-1 transition-colors ease-in-out duration-150
29
+ text-left
30
+ "
30
31
  >
31
32
  <slot />
32
33
  </a>
@@ -19,6 +19,7 @@ export let customCss = "";
19
19
  {linkStyle === 'purple' ? 'hover:text-purple-500 active:text-purple-600' : ''}
20
20
  hover:underline underline-offset-4
21
21
  disabled:text-slate-300 dark:disabled:text-slate-500
22
+ text-left
22
23
  space-x-1 transition-colors ease-in-out duration-150"
23
24
  >
24
25
  <slot />
@@ -16,13 +16,15 @@ export let visible = true;
16
16
  export let numeric = false;
17
17
  export let allowZero = false;
18
18
  export let disabled = false;
19
+ export let hasIcon = false;
19
20
  const dispatch = createEventDispatcher();
20
21
  export let isValid = true;
21
22
  let inputCss = `
22
23
  border peer block w-full rounded shadow-sm bg-white text-neutral-900
23
24
  ${size === "sm" ? "py-1 px-2 text-sm" : ""}
24
25
  ${size === "md" ? "py-1.5 px-2 text-base" : ""}
25
- ${size === "lg" ? "py-2 px-2 text-lg" : ""}
26
+ ${size === "lg" ? "py-2 px-2 text-lg" : ""}
27
+ ${hasIcon ? "pr-10" : ""}
26
28
  focus:outline-none focus:ring
27
29
  read-only:bg-neutral-100
28
30
  dark:read-only:bg-neutral-800
@@ -89,7 +91,7 @@ onMount(() => {
89
91
  {/if}
90
92
  </label>
91
93
  {/if}
92
- <div bind:this={inputContainer}>
94
+ <div bind:this={inputContainer} class="relative">
93
95
  <slot>
94
96
  <input
95
97
  data-input="true"
@@ -123,6 +125,7 @@ onMount(() => {
123
125
  step={numeric ? 'any' : undefined}
124
126
  />
125
127
  </slot>
128
+ <slot name="icon"/>
126
129
  </div>
127
130
 
128
131
  {#if validationText && !isValid}
@@ -19,6 +19,7 @@ declare const __propDef: {
19
19
  numeric?: boolean;
20
20
  allowZero?: boolean;
21
21
  disabled?: boolean;
22
+ hasIcon?: boolean;
22
23
  isValid?: boolean;
23
24
  };
24
25
  events: {
@@ -31,6 +32,7 @@ declare const __propDef: {
31
32
  };
32
33
  slots: {
33
34
  default: {};
35
+ icon: {};
34
36
  };
35
37
  exports?: {} | undefined;
36
38
  bindings?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "y200subcontrols",
3
- "version": "0.1.353",
3
+ "version": "0.1.355",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",