@hashrytech/quick-components-kit 0.19.7 → 0.19.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.19.9
4
+
5
+ ### Patch Changes
6
+
7
+ - patch: Updating the types for TextInput
8
+
9
+ ## 0.19.8
10
+
11
+ ### Patch Changes
12
+
13
+ - add: Adding pattern to TextInput
14
+
3
15
  ## 0.19.7
4
16
 
5
17
  ### Patch Changes
@@ -10,7 +10,7 @@
10
10
  * - "lg": h-[2.8rem] text-lg placeholder:text-lg
11
11
  */
12
12
  export type TextInputSize = "sm" | "md" | "lg";
13
- export type TextInputType = "text" | "password" | "number" | "email" | "tel" | "url" | "search";
13
+ export type TextInputType = "text" | "password" | "number" | "email" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "month" | "week" | "color";
14
14
  export type InputMode = "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
15
15
 
16
16
  /**
@@ -41,7 +41,8 @@
41
41
  size?: TextInputSize;
42
42
  disabled?: boolean;
43
43
  required?: boolean;
44
- error?: string;
44
+ pattern?: string;
45
+ error?: string;
45
46
  labelClass?: ClassNameValue;
46
47
  firstDivClass?: ClassNameValue;
47
48
  secondDivClass?: ClassNameValue;
@@ -78,7 +79,8 @@
78
79
  size="md",
79
80
  disabled=false,
80
81
  required=false,
81
- error,
82
+ pattern,
83
+ error,
82
84
  firstDivClass,
83
85
  secondDivClass,
84
86
  thirdDivClass,
@@ -147,7 +149,7 @@
147
149
 
148
150
  {#if leftIcon}<div class="h-full flex flex-col items-center justify-center {size == 'lg' ? 'pl-3' : 'pl-2.5'}">{@render leftIcon()}</div>{/if}
149
151
 
150
- <input {disabled} {required} {type} {id} name={name ? name: id} {placeholder} {onmouseup} bind:value {autocomplete} {inputmode} {min} {max} oninput={handleInput}
152
+ <input {disabled} {required} {type} {id} name={name ? name: id} {placeholder} {pattern} {onmouseup} bind:value {autocomplete} {inputmode} {min} {max} oninput={handleInput}
151
153
  class={twMerge("border-0 focus:border-0 focus:ring-0 active:border-0 outline-none p-0 bg-transparent placeholder:text-neutral-600/50 h-full w-full rounded-primary", sizeStyle[size], restProps.class)} />
152
154
 
153
155
  {#if rightIcon}<div class="h-full flex flex-col items-center justify-center {size == 'lg' ? 'pr-3' : 'pr-2.5'}">{@render rightIcon()}</div>{/if}
@@ -8,7 +8,7 @@ import type { ClassNameValue } from 'tailwind-merge';
8
8
  * - "lg": h-[2.8rem] text-lg placeholder:text-lg
9
9
  */
10
10
  export type TextInputSize = "sm" | "md" | "lg";
11
- export type TextInputType = "text" | "password" | "number" | "email" | "tel" | "url" | "search";
11
+ export type TextInputType = "text" | "password" | "number" | "email" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "month" | "week" | "color";
12
12
  export type InputMode = "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
13
13
  /**
14
14
  * Props for the TextBox component.
@@ -38,6 +38,7 @@ export type TextInputProps = {
38
38
  size?: TextInputSize;
39
39
  disabled?: boolean;
40
40
  required?: boolean;
41
+ pattern?: string;
41
42
  error?: string;
42
43
  labelClass?: ClassNameValue;
43
44
  firstDivClass?: ClassNameValue;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.19.7",
8
+ "version": "0.19.9",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [