windly-ui 1.0.2 → 1.0.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.
Files changed (103) hide show
  1. package/{ui-library/dist → dist}/module.json +2 -2
  2. package/dist/module.mjs +33 -0
  3. package/dist/runtime/components/Accordion.d.vue.ts +39 -0
  4. package/dist/runtime/components/Accordion.vue +96 -0
  5. package/dist/runtime/components/Accordion.vue.d.ts +39 -0
  6. package/dist/runtime/components/Alert.d.vue.ts +83 -0
  7. package/dist/runtime/components/Alert.vue +78 -0
  8. package/dist/runtime/components/Alert.vue.d.ts +83 -0
  9. package/dist/runtime/components/Avatar.d.vue.ts +141 -0
  10. package/dist/runtime/components/Avatar.vue +72 -0
  11. package/dist/runtime/components/Avatar.vue.d.ts +141 -0
  12. package/dist/runtime/components/Badge.d.vue.ts +133 -0
  13. package/dist/runtime/components/Badge.vue +99 -0
  14. package/dist/runtime/components/Badge.vue.d.ts +133 -0
  15. package/dist/runtime/components/Breadcrumbs.d.vue.ts +83 -0
  16. package/dist/runtime/components/Breadcrumbs.vue +116 -0
  17. package/dist/runtime/components/Breadcrumbs.vue.d.ts +83 -0
  18. package/dist/runtime/components/Button.d.vue.ts +208 -0
  19. package/dist/runtime/components/Button.vue +126 -0
  20. package/dist/runtime/components/Button.vue.d.ts +208 -0
  21. package/dist/runtime/components/Card.d.vue.ts +83 -0
  22. package/dist/runtime/components/Card.vue +71 -0
  23. package/dist/runtime/components/Card.vue.d.ts +83 -0
  24. package/dist/runtime/components/Checkbox.d.vue.ts +190 -0
  25. package/dist/runtime/components/Checkbox.vue +125 -0
  26. package/dist/runtime/components/Checkbox.vue.d.ts +190 -0
  27. package/dist/runtime/components/CodeBlock.d.vue.ts +16 -0
  28. package/dist/runtime/components/CodeBlock.vue +75 -0
  29. package/dist/runtime/components/CodeBlock.vue.d.ts +16 -0
  30. package/dist/runtime/components/ColorPicker.d.vue.ts +91 -0
  31. package/dist/runtime/components/ColorPicker.vue +244 -0
  32. package/dist/runtime/components/ColorPicker.vue.d.ts +91 -0
  33. package/dist/runtime/components/Date.d.vue.ts +137 -0
  34. package/dist/runtime/components/Date.vue +201 -0
  35. package/dist/runtime/components/Date.vue.d.ts +137 -0
  36. package/dist/runtime/components/Dialog.d.vue.ts +63 -0
  37. package/dist/runtime/components/Dialog.vue +85 -0
  38. package/dist/runtime/components/Dialog.vue.d.ts +63 -0
  39. package/dist/runtime/components/Divider.d.vue.ts +51 -0
  40. package/dist/runtime/components/Divider.vue +52 -0
  41. package/dist/runtime/components/Divider.vue.d.ts +51 -0
  42. package/dist/runtime/components/Drawer.d.vue.ts +30 -0
  43. package/dist/runtime/components/Drawer.vue +43 -0
  44. package/dist/runtime/components/Drawer.vue.d.ts +30 -0
  45. package/dist/runtime/components/Dropdown.d.vue.ts +34 -0
  46. package/dist/runtime/components/Dropdown.vue +127 -0
  47. package/dist/runtime/components/Dropdown.vue.d.ts +34 -0
  48. package/dist/runtime/components/FileUploader.d.vue.ts +65 -0
  49. package/dist/runtime/components/FileUploader.vue +358 -0
  50. package/dist/runtime/components/FileUploader.vue.d.ts +65 -0
  51. package/dist/runtime/components/Icon.d.vue.ts +41 -0
  52. package/dist/runtime/components/Icon.vue +66 -0
  53. package/dist/runtime/components/Icon.vue.d.ts +41 -0
  54. package/dist/runtime/components/Image.d.vue.ts +77 -0
  55. package/dist/runtime/components/Image.vue +61 -0
  56. package/dist/runtime/components/Image.vue.d.ts +77 -0
  57. package/dist/runtime/components/Input.d.vue.ts +68 -0
  58. package/dist/runtime/components/Input.vue +241 -0
  59. package/dist/runtime/components/Input.vue.d.ts +68 -0
  60. package/dist/runtime/components/Radio.d.vue.ts +41 -0
  61. package/dist/runtime/components/Radio.vue +222 -0
  62. package/dist/runtime/components/Radio.vue.d.ts +41 -0
  63. package/dist/runtime/components/ScrollArea.d.vue.ts +79 -0
  64. package/dist/runtime/components/ScrollArea.vue +36 -0
  65. package/dist/runtime/components/ScrollArea.vue.d.ts +79 -0
  66. package/dist/runtime/components/Select.d.vue.ts +51 -0
  67. package/dist/runtime/components/Select.vue +271 -0
  68. package/dist/runtime/components/Select.vue.d.ts +51 -0
  69. package/dist/runtime/components/Stepper.d.vue.ts +46 -0
  70. package/dist/runtime/components/Stepper.vue +218 -0
  71. package/dist/runtime/components/Stepper.vue.d.ts +46 -0
  72. package/dist/runtime/components/TabPanel.d.vue.ts +17 -0
  73. package/dist/runtime/components/TabPanel.vue +21 -0
  74. package/dist/runtime/components/TabPanel.vue.d.ts +17 -0
  75. package/dist/runtime/components/Table.d.vue.ts +40 -0
  76. package/dist/runtime/components/Table.vue +92 -0
  77. package/dist/runtime/components/Table.vue.d.ts +40 -0
  78. package/dist/runtime/components/Tabs.d.vue.ts +20 -0
  79. package/dist/runtime/components/Tabs.vue +62 -0
  80. package/dist/runtime/components/Tabs.vue.d.ts +20 -0
  81. package/dist/runtime/components/Textarea.d.vue.ts +208 -0
  82. package/dist/runtime/components/Textarea.vue +185 -0
  83. package/dist/runtime/components/Textarea.vue.d.ts +208 -0
  84. package/dist/runtime/components/Toggle.d.vue.ts +36 -0
  85. package/dist/runtime/components/Toggle.vue +173 -0
  86. package/dist/runtime/components/Toggle.vue.d.ts +36 -0
  87. package/dist/runtime/components/Tooltip.d.vue.ts +63 -0
  88. package/dist/runtime/components/Tooltip.vue +144 -0
  89. package/dist/runtime/components/Tooltip.vue.d.ts +63 -0
  90. package/dist/runtime/components/uiProps.d.ts +38 -0
  91. package/dist/runtime/components/uiProps.js +11 -0
  92. package/dist/runtime/components/useUiClasses.d.ts +43 -0
  93. package/dist/runtime/components/useUiClasses.js +124 -0
  94. package/dist/runtime/composables/plugin.d.ts +2 -0
  95. package/dist/runtime/composables/plugin.js +3 -0
  96. package/dist/runtime/tailwind-color.d.ts +2 -0
  97. package/dist/runtime/tailwind-color.js +5859 -0
  98. package/package.json +12 -46
  99. package/LICENSE +0 -21
  100. package/README.md +0 -232
  101. package/ui-library/dist/module.mjs +0 -22
  102. /package/{ui-library/dist → dist}/module.d.mts +0 -0
  103. /package/{ui-library/dist → dist}/types.d.mts +0 -0
@@ -0,0 +1,77 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ src: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ alt: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ placeholder: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ width: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ height: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ fit: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ borderColor: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ borderType: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
+ src: {
36
+ type: StringConstructor;
37
+ required: true;
38
+ };
39
+ alt: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ placeholder: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ width: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ height: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ fit: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ borderColor: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ borderType: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ }>> & Readonly<{}>, {
68
+ borderColor: string;
69
+ alt: string;
70
+ placeholder: string;
71
+ width: string;
72
+ height: string;
73
+ fit: string;
74
+ borderType: string;
75
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
76
+ declare const _default: typeof __VLS_export;
77
+ export default _default;
@@ -0,0 +1,68 @@
1
+ type SupportedInputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'datetime-local' | 'month' | 'week' | 'time';
2
+ type ValidationRule = "alphabets" | "numbers" | "spaces" | "name" | "punctuation" | "integer" | "positive" | "negative" | "decimal" | "scientific" | "uppercase" | "lowercase";
3
+ type ValidateOn = "input" | "blur";
4
+ type __VLS_Props = {
5
+ modelValue: string | number;
6
+ label?: string;
7
+ hint?: string;
8
+ placeholder?: string;
9
+ case?: "upper" | "lower" | "capitalize" | "normal" | null;
10
+ size?: string;
11
+ color?: string;
12
+ rounded?: string;
13
+ dense?: boolean;
14
+ width?: string;
15
+ outlined?: boolean;
16
+ borderless?: boolean;
17
+ flat?: boolean;
18
+ type?: SupportedInputType;
19
+ allow?: ValidationRule[];
20
+ deny?: ValidationRule[];
21
+ supportedValues?: Array<string | number>;
22
+ unsupportedValues?: Array<string | number>;
23
+ required?: boolean;
24
+ regex?: string | RegExp;
25
+ minLength?: number;
26
+ maxLength?: number;
27
+ disabled?: boolean;
28
+ readonly?: boolean;
29
+ autocomplete?: string;
30
+ validateOn?: ValidateOn;
31
+ };
32
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
33
+ "update:modelValue": (value: string) => any;
34
+ invalid: (error: string) => any;
35
+ valid: () => any;
36
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
+ onInvalid?: ((error: string) => any) | undefined;
39
+ onValid?: (() => any) | undefined;
40
+ }>, {
41
+ modelValue: string | number;
42
+ disabled: boolean;
43
+ dense: boolean;
44
+ type: SupportedInputType;
45
+ required: boolean;
46
+ color: string;
47
+ rounded: string;
48
+ size: string;
49
+ flat: boolean;
50
+ placeholder: string;
51
+ width: string;
52
+ readonly: boolean;
53
+ hint: string;
54
+ outlined: boolean;
55
+ borderless: boolean;
56
+ case: "upper" | "lower" | "capitalize" | "normal" | null;
57
+ allow: ValidationRule[];
58
+ deny: ValidationRule[];
59
+ supportedValues: Array<string | number>;
60
+ unsupportedValues: Array<string | number>;
61
+ regex: string | RegExp;
62
+ minLength: number;
63
+ maxLength: number;
64
+ autocomplete: string;
65
+ validateOn: ValidateOn;
66
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
+ declare const _default: typeof __VLS_export;
68
+ export default _default;
@@ -0,0 +1,241 @@
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ const props = defineProps({
4
+ modelValue: { type: [String, Number], required: true, default: "" },
5
+ label: { type: String, required: false },
6
+ hint: { type: String, required: false, default: "" },
7
+ placeholder: { type: String, required: false, default: "" },
8
+ case: { type: [String, null], required: false, default: null },
9
+ size: { type: String, required: false, default: "md" },
10
+ color: { type: String, required: false, default: "" },
11
+ rounded: { type: String, required: false, default: "md" },
12
+ dense: { type: Boolean, required: false, default: false },
13
+ width: { type: String, required: false, default: "" },
14
+ outlined: { type: Boolean, required: false, default: false },
15
+ borderless: { type: Boolean, required: false, default: false },
16
+ flat: { type: Boolean, required: false, default: false },
17
+ type: { type: String, required: false, default: "text" },
18
+ allow: { type: Array, required: false, default: () => [] },
19
+ deny: { type: Array, required: false, default: () => [] },
20
+ supportedValues: { type: Array, required: false, default: () => [] },
21
+ unsupportedValues: { type: Array, required: false, default: () => [] },
22
+ required: { type: Boolean, required: false, default: false },
23
+ regex: { type: null, required: false, default: "" },
24
+ minLength: { type: Number, required: false, default: void 0 },
25
+ maxLength: { type: Number, required: false, default: void 0 },
26
+ disabled: { type: Boolean, required: false, default: false },
27
+ readonly: { type: Boolean, required: false, default: false },
28
+ autocomplete: { type: String, required: false, default: "off" },
29
+ validateOn: { type: String, required: false, default: "input" }
30
+ });
31
+ const emit = defineEmits(["update:modelValue", "valid", "invalid"]);
32
+ const validationError = ref("");
33
+ const NATIVE_PATTERNS = {
34
+ email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
35
+ url: /^(https?:\/\/)?([\w-]+\.)+[\w-]{2,}(\/\S*)?$/i,
36
+ tel: /^\+?[1-9]\d{6,14}$/
37
+ };
38
+ const RULE_PATTERNS = {
39
+ alphabets: /^[A-Za-z]+$/,
40
+ numbers: /^[0-9]+$/,
41
+ spaces: /\s/,
42
+ name: /^[A-Za-z.'-\s]+$/,
43
+ punctuation: /[.,!?;:'"()-]/,
44
+ integer: /^-?\d+$/,
45
+ positive: /^\d+$/,
46
+ negative: /^-\d+$/,
47
+ decimal: /^-?\d*\.?\d+$/,
48
+ scientific: /^-?\d+(\.\d+)?e[-+]?\d+$/i,
49
+ uppercase: /^[A-Z]+$/,
50
+ lowercase: /^[a-z]+$/
51
+ };
52
+ function validate(value) {
53
+ validationError.value = "";
54
+ if (props.required && !value.trim()) {
55
+ validationError.value = "This field is required.";
56
+ return false;
57
+ }
58
+ if (props.minLength !== void 0 && value.length < props.minLength) {
59
+ validationError.value = `Minimum ${props.minLength} characters required.`;
60
+ return false;
61
+ }
62
+ if (props.maxLength !== void 0 && value.length > props.maxLength) {
63
+ validationError.value = `Maximum ${props.maxLength} characters allowed.`;
64
+ return false;
65
+ }
66
+ if (props.supportedValues.length && !props.supportedValues.includes(value)) {
67
+ validationError.value = "Value is not allowed.";
68
+ return false;
69
+ }
70
+ if (props.unsupportedValues.includes(value)) {
71
+ validationError.value = "Value is not permitted.";
72
+ return false;
73
+ }
74
+ const nativePattern = NATIVE_PATTERNS[props.type];
75
+ if (nativePattern && value && !nativePattern.test(value)) {
76
+ validationError.value = `Invalid ${props.type} format.`;
77
+ return false;
78
+ }
79
+ for (const rule of props.allow) {
80
+ const regex = RULE_PATTERNS[rule];
81
+ if (regex && value && !regex.test(value)) {
82
+ validationError.value = `Failed validation: ${rule}`;
83
+ return false;
84
+ }
85
+ }
86
+ for (const rule of props.deny) {
87
+ const regex = RULE_PATTERNS[rule];
88
+ if (regex && regex.test(value)) {
89
+ validationError.value = `Contains unsupported value: ${rule}`;
90
+ return false;
91
+ }
92
+ }
93
+ if (props.regex) {
94
+ const regex = props.regex instanceof RegExp ? props.regex : new RegExp(props.regex);
95
+ if (!regex.test(value)) {
96
+ validationError.value = "Custom validation failed.";
97
+ return false;
98
+ }
99
+ }
100
+ return true;
101
+ }
102
+ function runValidation(value) {
103
+ const isValid = validate(value);
104
+ if (isValid) {
105
+ emit("valid");
106
+ } else {
107
+ emit("invalid", validationError.value);
108
+ }
109
+ return isValid;
110
+ }
111
+ function handleInput(event) {
112
+ const target = event.target;
113
+ let value = target.value;
114
+ if (props.maxLength !== void 0 && value.length > props.maxLength) {
115
+ value = value.slice(0, props.maxLength);
116
+ }
117
+ emit("update:modelValue", value);
118
+ if (props.validateOn === "input") {
119
+ runValidation(value);
120
+ }
121
+ }
122
+ function handleBlur(event) {
123
+ if (props.validateOn !== "blur") return;
124
+ const target = event.target;
125
+ runValidation(target.value);
126
+ }
127
+ const isHex = (val) => val.startsWith("#");
128
+ const roundedMap = {
129
+ none: "rounded-none",
130
+ sm: "rounded-sm",
131
+ md: "rounded-md",
132
+ lg: "rounded-lg",
133
+ xl: "rounded-xl",
134
+ full: "rounded-full"
135
+ };
136
+ const computedClass = computed(() => {
137
+ let classes = "input block transition-all duration-300";
138
+ if (props.borderless) {
139
+ classes += " border-none bg-transparent";
140
+ } else if (props.outlined) {
141
+ classes += " border";
142
+ } else {
143
+ classes += " border-0 border-b";
144
+ }
145
+ classes += ` ${roundedMap[props.rounded] ?? roundedMap.md}`;
146
+ if (!props.flat) {
147
+ classes += " shadow-sm";
148
+ }
149
+ if (props.disabled) {
150
+ classes += " opacity-50 cursor-not-allowed";
151
+ }
152
+ if (props.size === "sm") {
153
+ classes += " text-sm";
154
+ } else if (props.size === "lg") {
155
+ classes += " text-lg";
156
+ } else {
157
+ classes += " text-base";
158
+ }
159
+ if (props.case === "upper") {
160
+ classes += " uppercase";
161
+ } else if (props.case === "lower") {
162
+ classes += " lowercase";
163
+ } else if (props.case === "capitalize") {
164
+ classes += " capitalize";
165
+ }
166
+ if (validationError.value) {
167
+ classes += " border-red-500";
168
+ } else {
169
+ classes += ` ${props.color && !isHex(props.color) ? `border-${props.color} focus:ring-${props.color} ` : ""}`;
170
+ }
171
+ if (props.width && !CSS.supports("width", props.width)) {
172
+ classes += `w-${props.width} `;
173
+ }
174
+ if (!props.width) classes += "w-full ";
175
+ if (props.modelValue !== null && props.modelValue !== "" && props.modelValue !== void 0)
176
+ classes += " has-value";
177
+ return classes;
178
+ });
179
+ const computedStyle = computed(() => {
180
+ let styles = {};
181
+ if (props.width && CSS.supports("width", props.width)) {
182
+ styles["width"] = props.width;
183
+ }
184
+ if (props.color && isHex(props.color)) {
185
+ styles["--tw-ring-color"] = props.color;
186
+ styles["border-color"] = props.color;
187
+ }
188
+ return styles;
189
+ });
190
+ const visibility = ref(false);
191
+ const inputType = computed(() => props.type === "password" ? visibility.value ? "text" : "password" : props.type);
192
+ const inputAttrs = computed(() => {
193
+ let inputAttrs2 = {};
194
+ if (props.type) inputAttrs2 = { ...inputAttrs2, type: props.type === "password" ? inputType.value : props.type };
195
+ if (props.placeholder) inputAttrs2 = { ...inputAttrs2, placeholder: props.placeholder };
196
+ if (props.disabled) inputAttrs2 = { ...inputAttrs2, disabled: props.disabled };
197
+ if (props.readonly) inputAttrs2 = { ...inputAttrs2, readonly: props.readonly };
198
+ if (props.autocomplete) inputAttrs2 = { ...inputAttrs2, autocomplete: props.autocomplete };
199
+ if (props.required) inputAttrs2 = { ...inputAttrs2, required: props.required };
200
+ if (props.maxLength) inputAttrs2 = { ...inputAttrs2, maxlength: props.maxLength };
201
+ return inputAttrs2;
202
+ });
203
+ </script>
204
+
205
+ <template>
206
+ <div class="input-container" :class="{ dense: !outlined || dense, [`input-${size}`]: size }">
207
+ <input
208
+ :value="modelValue"
209
+ :class="computedClass"
210
+ :style="computedStyle"
211
+ @input="handleInput"
212
+ @blur="handleBlur"
213
+ v-bind="inputAttrs",
214
+ />
215
+
216
+ <label class="label" :class="color && !isHex(color) ? `text-${color}` : ''" :style="color ? { color: isHex(color) ? color : '' } : { color: '#9ca3af' }">
217
+ {{ label }}
218
+ </label>
219
+
220
+ <div class="absolute right-0 top-1/2 transform -translate-y-1/2">
221
+ <UIButton v-if="type === 'password'" :icon="visibility ? 'visibility_off' : 'visibility'" flat dense color="gray-400" @click="visibility = !visibility" />
222
+ </div>
223
+ <p
224
+ v-if="hint && !validationError"
225
+ class="hint-text"
226
+ >
227
+ {{ hint }}
228
+ </p>
229
+
230
+ <p
231
+ v-if="validationError"
232
+ class="error-text"
233
+ >
234
+ {{ validationError }}
235
+ </p>
236
+ </div>
237
+ </template>
238
+
239
+ <style scoped>
240
+ .input-container{margin:20px 0 10px;position:relative}.input-container.dense{margin:10px 0}.input-container .input{padding:10px}.input-container.dense .input{padding:6px 10px}.input:focus{outline:none}.label{left:10px;padding:0 5px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);transition:top .2s ease,font-size .2s ease,color .2s ease,transform .2s ease}.input-container:has(input[type=date]) .label,.input-container:has(input[type=datetime-local]) .label,.input-container:has(input[type=month]) .label,.input-container:has(input[type=time]) .label,.input-container:has(input[type=week]) .label{left:5px;top:-20%;transform:none;z-index:1}.input-container.input-lg.dense .input:-moz-placeholder+.label,.input:-moz-placeholder+.label{left:5px;top:-20px;transform:none;z-index:1}.input-container.input-lg.dense .input.has-value+.label,.input-container.input-lg.dense .input:focus+.label,.input-container.input-lg.dense .input:placeholder-shown+.label,.input.has-value+.label,.input:focus+.label,.input:placeholder-shown+.label{left:5px;top:-20px;transform:none;z-index:1}.input-container.dense .input:-moz-placeholder+.label{top:-10px}.input-container.dense .input.has-value+.label,.input-container.dense .input:focus+.label,.input-container.dense .input:placeholder-shown+.label{top:-10px}.input-container.input-lg .input:-moz-placeholder+.label{top:-24px}.input-container.input-lg .input.has-value+.label,.input-container.input-lg .input:focus+.label,.input-container.input-lg .input:placeholder-shown+.label{top:-24px}.input-container.input-sm .label{font-size:14px}.input-container.input-md .label{font-size:16px}.input-container.input-lg .label{font-size:18px}.input-container.input-sm .input:-moz-placeholder+.label{font-size:12px}.input-container.input-sm .input.has-value+.label,.input-container.input-sm .input:focus+.label,.input-container.input-sm .input:placeholder-shown+.label{font-size:12px}.input-container.input-md .input:-moz-placeholder+.label{font-size:14px}.input-container.input-md .input.has-value+.label,.input-container.input-md .input:focus+.label,.input-container.input-md .input:placeholder-shown+.label{font-size:14px}.input-container.input-lg .input:-moz-placeholder+.label{font-size:16px}.input-container.input-lg .input.has-value+.label,.input-container.input-lg .input:focus+.label,.input-container.input-lg .input:placeholder-shown+.label{font-size:16px}.hint-text{color:#6b7280;font-size:12px;margin-left:5px}.char-count{color:#6b7280}.char-count,.error-text{font-size:.875rem;margin-top:4px}.error-text{color:#ef4444}
241
+ </style>
@@ -0,0 +1,68 @@
1
+ type SupportedInputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'datetime-local' | 'month' | 'week' | 'time';
2
+ type ValidationRule = "alphabets" | "numbers" | "spaces" | "name" | "punctuation" | "integer" | "positive" | "negative" | "decimal" | "scientific" | "uppercase" | "lowercase";
3
+ type ValidateOn = "input" | "blur";
4
+ type __VLS_Props = {
5
+ modelValue: string | number;
6
+ label?: string;
7
+ hint?: string;
8
+ placeholder?: string;
9
+ case?: "upper" | "lower" | "capitalize" | "normal" | null;
10
+ size?: string;
11
+ color?: string;
12
+ rounded?: string;
13
+ dense?: boolean;
14
+ width?: string;
15
+ outlined?: boolean;
16
+ borderless?: boolean;
17
+ flat?: boolean;
18
+ type?: SupportedInputType;
19
+ allow?: ValidationRule[];
20
+ deny?: ValidationRule[];
21
+ supportedValues?: Array<string | number>;
22
+ unsupportedValues?: Array<string | number>;
23
+ required?: boolean;
24
+ regex?: string | RegExp;
25
+ minLength?: number;
26
+ maxLength?: number;
27
+ disabled?: boolean;
28
+ readonly?: boolean;
29
+ autocomplete?: string;
30
+ validateOn?: ValidateOn;
31
+ };
32
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
33
+ "update:modelValue": (value: string) => any;
34
+ invalid: (error: string) => any;
35
+ valid: () => any;
36
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
+ onInvalid?: ((error: string) => any) | undefined;
39
+ onValid?: (() => any) | undefined;
40
+ }>, {
41
+ modelValue: string | number;
42
+ disabled: boolean;
43
+ dense: boolean;
44
+ type: SupportedInputType;
45
+ required: boolean;
46
+ color: string;
47
+ rounded: string;
48
+ size: string;
49
+ flat: boolean;
50
+ placeholder: string;
51
+ width: string;
52
+ readonly: boolean;
53
+ hint: string;
54
+ outlined: boolean;
55
+ borderless: boolean;
56
+ case: "upper" | "lower" | "capitalize" | "normal" | null;
57
+ allow: ValidationRule[];
58
+ deny: ValidationRule[];
59
+ supportedValues: Array<string | number>;
60
+ unsupportedValues: Array<string | number>;
61
+ regex: string | RegExp;
62
+ minLength: number;
63
+ maxLength: number;
64
+ autocomplete: string;
65
+ validateOn: ValidateOn;
66
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
+ declare const _default: typeof __VLS_export;
68
+ export default _default;
@@ -0,0 +1,41 @@
1
+ type LabelPosition = 'top' | 'bottom' | 'left' | 'right';
2
+ type RadioSize = 'sm' | 'md' | 'lg';
3
+ type Rounded = 'none' | 'sm' | 'md' | 'lg' | 'full';
4
+ type __VLS_Props = {
5
+ modelValue?: string | number | boolean;
6
+ value: string | number | boolean;
7
+ label: string;
8
+ id?: string;
9
+ name?: string;
10
+ hint?: string;
11
+ icon?: string;
12
+ disable?: boolean;
13
+ color?: string;
14
+ size?: RadioSize;
15
+ rounded?: Rounded;
16
+ flat?: boolean;
17
+ bordered?: boolean;
18
+ borderColor?: string;
19
+ labelPosition?: LabelPosition;
20
+ };
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
+ "update:modelValue": (value: string | number | boolean) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
25
+ }>, {
26
+ modelValue: string | number | boolean;
27
+ name: string;
28
+ disable: boolean;
29
+ color: string;
30
+ rounded: Rounded;
31
+ size: RadioSize;
32
+ borderColor: string;
33
+ icon: string;
34
+ flat: boolean;
35
+ id: string;
36
+ bordered: boolean;
37
+ hint: string;
38
+ labelPosition: LabelPosition;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;