edvoyui-component-library-test-flight 0.0.182 → 0.0.184

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.
@@ -1,5 +1,5 @@
1
1
  export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=4ef02613&lang.css";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=eda5f59b&lang.css";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUITabs.vue.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.182",
4
+ "version": "0.0.184",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -15,7 +15,8 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": "./dist/edvoy-ui.es.js",
18
- "require": "./dist/edvoy-ui.umd.js"
18
+ "require": "./dist/edvoy-ui.umd.js",
19
+ "types": "./dist/types/index.d.ts"
19
20
  },
20
21
  "./style": "./dist/edvoy-ui.css",
21
22
  "./dist/edvoy-ui.css": "./dist/edvoy-ui.css"
@@ -12,7 +12,7 @@
12
12
 
13
13
  <!-- Development code here -->
14
14
 
15
- <!--<template>
15
+ <!-- <template>
16
16
  <div class="h-[clac(100svh-64px)] w-full px-10 py-8 max-w-screen-xl mx-auto">
17
17
  <h1 class="mb-2 font-semibold text-gray-900 tetx-lg">Edvoy UI Componnet</h1>
18
18
  <div
@@ -808,7 +808,6 @@
808
808
  :custom-offset="[-20, 10]"
809
809
  inputFilled
810
810
  />
811
- <EUISelectSearch />
812
811
  </div>
813
812
  </div>
814
813
 
@@ -1512,7 +1511,6 @@ import EUIModal from "./modal/EUIModal.vue";
1512
1511
  import EUISelect from "./select/EUISelect.vue";
1513
1512
  import EUITabs from "./tabs/EUITabs.vue";
1514
1513
  import EUITextarea from "./textArea/EUITextArea.vue";
1515
- import EUISelectSearch from "./selectSearch/EUISelectSearch.vue";
1516
1514
  import EUITimeLine from "./timeLine/EUITimeLine.vue";
1517
1515
  import {
1518
1516
  ArrowDownCircleIcon,
@@ -8,7 +8,6 @@ export { default as EUITextArea } from "./textArea/EUITextArea.vue";
8
8
  export { default as EUINumberInput } from "./input/EUINumberInput.vue";
9
9
 
10
10
  export { default as EUISelect } from "./select/EUISelect.vue";
11
- export { default as EUISelectSearch } from "./selectSearch/EUISelectSearch.vue";
12
11
  export { default as EUICheckbox } from "./checkbox/EUICheckbox.vue";
13
12
  export { default as EUIRadio } from "./radio/EUIRadio.vue";
14
13
  export { default as EUIToggle } from "./toggle/EUIToggle.vue";
@@ -0,0 +1,217 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import EUISearchTagSelect from "./EUISearchTagSelect.vue";
3
+
4
+ const meta = {
5
+ title: "Forms/SearchTagSelect",
6
+ component: EUISearchTagSelect,
7
+ tags: ["autodocs"],
8
+ argTypes: {
9
+ modelValue: {
10
+ control: "object",
11
+ description: "The currently selected values (array of items).",
12
+ },
13
+ items: {
14
+ control: "object",
15
+ description:
16
+ "Array of available options. Each should have value, label, and name properties.",
17
+ },
18
+ placeholder: {
19
+ control: "text",
20
+ description: "Placeholder text for the search input.",
21
+ },
22
+ label: {
23
+ control: "text",
24
+ description: "Label for the search tag select field.",
25
+ },
26
+ name: {
27
+ control: "text",
28
+ description: "Name attribute of the input field.",
29
+ },
30
+ selectType: {
31
+ control: "select",
32
+ options: ["single", "multiple"],
33
+ description: "Whether to allow single or multiple selections.",
34
+ defaultValue: "multiple",
35
+ },
36
+ errors: {
37
+ control: "object",
38
+ description: "Validation error messages object.",
39
+ },
40
+ required: {
41
+ control: "boolean",
42
+ description: "Whether the field is required.",
43
+ defaultValue: false,
44
+ },
45
+ disabled: {
46
+ control: "boolean",
47
+ description: "Whether the input is disabled.",
48
+ defaultValue: false,
49
+ },
50
+ searchable: {
51
+ control: "boolean",
52
+ description: "Enable search functionality.",
53
+ defaultValue: true,
54
+ },
55
+ clearable: {
56
+ control: "boolean",
57
+ description: "Show clear button to remove all selections.",
58
+ defaultValue: true,
59
+ },
60
+ },
61
+ } satisfies Meta<typeof EUISearchTagSelect>;
62
+
63
+ export default meta;
64
+ type Story = StoryObj<typeof meta>;
65
+
66
+ // Default story - Multiple Select
67
+ export const Default: Story = {
68
+ args: {
69
+ name: "tags",
70
+ label: "Select Tags",
71
+ placeholder: "Search and select tags...",
72
+ selectType: "multiple",
73
+ items: [
74
+ { value: "react", label: "React", name: "React" },
75
+ { value: "vue", label: "Vue", name: "Vue" },
76
+ { value: "angular", label: "Angular", name: "Angular" },
77
+ { value: "svelte", label: "Svelte", name: "Svelte" },
78
+ { value: "next", label: "Next.js", name: "Next.js" },
79
+ ],
80
+ modelValue: [{ value: "react", label: "React", name: "React" }],
81
+ errors: {},
82
+ required: false,
83
+ disabled: false,
84
+ searchable: true,
85
+ clearable: true,
86
+ },
87
+ render: (args) => ({
88
+ components: { EUISearchTagSelect },
89
+ setup() {
90
+ return { args };
91
+ },
92
+ template:
93
+ '<div class="max-w-md"><EUISearchTagSelect v-bind="args" /></div>',
94
+ }),
95
+ };
96
+
97
+ // Single Select Mode
98
+ export const SingleSelect: Story = {
99
+ args: {
100
+ name: "framework",
101
+ label: "Select Framework",
102
+ placeholder: "Choose one framework...",
103
+ selectType: "single",
104
+ items: [
105
+ { value: "react", label: "React", name: "React" },
106
+ { value: "vue", label: "Vue", name: "Vue" },
107
+ { value: "angular", label: "Angular", name: "Angular" },
108
+ { value: "svelte", label: "Svelte", name: "Svelte" },
109
+ ],
110
+ modelValue: [],
111
+ errors: {},
112
+ required: true,
113
+ disabled: false,
114
+ searchable: true,
115
+ },
116
+ parameters: {
117
+ docs: {
118
+ description: {
119
+ story: "Single select mode allows selecting only one item.",
120
+ },
121
+ },
122
+ },
123
+ render: (args) => ({
124
+ components: { EUISearchTagSelect },
125
+ setup() {
126
+ return { args };
127
+ },
128
+ template:
129
+ '<div class="max-w-md"><EUISearchTagSelect v-bind="args" /></div>',
130
+ }),
131
+ };
132
+
133
+ // With Errors
134
+ export const WithErrors: Story = {
135
+ args: {
136
+ name: "tags",
137
+ label: "Select Tags",
138
+ placeholder: "Search and select tags...",
139
+ selectType: "multiple",
140
+ items: [
141
+ { value: "tag1", label: "Tag 1", name: "Tag 1" },
142
+ { value: "tag2", label: "Tag 2", name: "Tag 2" },
143
+ { value: "tag3", label: "Tag 3", name: "Tag 3" },
144
+ ],
145
+ modelValue: [],
146
+ errors: { tags: "At least one tag is required" },
147
+ required: true,
148
+ },
149
+ parameters: {
150
+ docs: {
151
+ description: {
152
+ story: "Shows validation error state.",
153
+ },
154
+ },
155
+ },
156
+ render: (args) => ({
157
+ components: { EUISearchTagSelect },
158
+ setup() {
159
+ return { args };
160
+ },
161
+ template:
162
+ '<div class="max-w-md"><EUISearchTagSelect v-bind="args" /></div>',
163
+ }),
164
+ };
165
+
166
+ // Disabled State
167
+ export const Disabled: Story = {
168
+ args: {
169
+ name: "tags",
170
+ label: "Select Tags",
171
+ placeholder: "Search and select tags...",
172
+ selectType: "multiple",
173
+ items: [
174
+ { value: "tag1", label: "Tag 1", name: "Tag 1" },
175
+ { value: "tag2", label: "Tag 2", name: "Tag 2" },
176
+ ],
177
+ modelValue: [{ value: "tag1", label: "Tag 1", name: "Tag 1" }],
178
+ errors: {},
179
+ disabled: true,
180
+ },
181
+ render: (args) => ({
182
+ components: { EUISearchTagSelect },
183
+ setup() {
184
+ return { args };
185
+ },
186
+ template:
187
+ '<div class="max-w-md"><EUISearchTagSelect v-bind="args" /></div>',
188
+ }),
189
+ };
190
+
191
+ // Searchable
192
+ export const Searchable: Story = {
193
+ args: {
194
+ name: "cities",
195
+ label: "Select Cities",
196
+ placeholder: "Type to search cities...",
197
+ selectType: "multiple",
198
+ items: [
199
+ { value: "nyc", label: "New York City", name: "New York City" },
200
+ { value: "la", label: "Los Angeles", name: "Los Angeles" },
201
+ { value: "chicago", label: "Chicago", name: "Chicago" },
202
+ { value: "houston", label: "Houston", name: "Houston" },
203
+ { value: "phoenix", label: "Phoenix", name: "Phoenix" },
204
+ ],
205
+ modelValue: [],
206
+ searchable: true,
207
+ clearable: true,
208
+ },
209
+ render: (args) => ({
210
+ components: { EUISearchTagSelect },
211
+ setup() {
212
+ return { args };
213
+ },
214
+ template:
215
+ '<div class="max-w-md"><EUISearchTagSelect v-bind="args" /></div>',
216
+ }),
217
+ };
@@ -104,7 +104,7 @@
104
104
  'px-3 py-1 leading-5 transition-all duration-150 ease-in-out hover:text-gray-800',
105
105
  tabSize === 'sm'
106
106
  ? 'text-sm font-semibold border-b-2'
107
- : 'text-base font-bold border-b-[3px]',
107
+ : 'text-base font-semibold border-b-[3px]',
108
108
  activeTabIndex === tabindex
109
109
  ? 'border-gray-900 text-gray-900'
110
110
  : 'border-transparent text-gray-500',
@@ -69,13 +69,15 @@
69
69
  {{ tag }}
70
70
  </div>
71
71
  </div>
72
-
73
72
  </template>
73
+
74
74
  <script lang="ts" setup>
75
75
  import { computed, onUpdated, PropType, ref, toRefs, watch } from "vue";
76
76
  import { VueTelInput, VueTelInputCountryOption } from "vue-tel-input";
77
77
  import "vue-tel-input/vue-tel-input.css";
78
+
78
79
  const emit = defineEmits(["update:modelValue", "blur", "update:isValid"]);
80
+
79
81
  const props = defineProps({
80
82
  modelValue: {
81
83
  type: [String, Number],
@@ -134,10 +136,11 @@ const props = defineProps({
134
136
  default: "",
135
137
  },
136
138
  inputFilled: {
137
- type:Boolean,
139
+ type: Boolean,
138
140
  default: false
139
141
  }
140
142
  });
143
+
141
144
  const { isValid } = toRefs(props);
142
145
 
143
146
  const generateUID = () => {
@@ -163,19 +166,8 @@ watch(listener, (value) => {
163
166
  mobile.value = value;
164
167
  });
165
168
 
166
- const updateValue = computed(() => {
167
- return {
168
- focus: props.autoFocus,
169
- place: props.placeholder,
170
- disabled: props.disabled,
171
- required: props.required,
172
- name: props.name,
173
- length: props.length,
174
- readonly: props.readonly
175
- };
176
- });
177
-
178
- const bindProps = {
169
+ // Make bindProps a reactive computed property
170
+ const bindProps = computed(() => ({
179
171
  mode: "international",
180
172
  autoFormat: false,
181
173
  autoDefaultCountry: true,
@@ -183,28 +175,28 @@ const bindProps = {
183
175
  invalidMsg: "Required mobile number",
184
176
  validCharactersOnly: true,
185
177
  preferredCountries: [],
186
- disabled: updateValue.value.disabled,
178
+ disabled: props.disabled,
187
179
  inputOptions: {
188
180
  autocomplete: "off",
189
- autofocus: updateValue.value.focus,
190
- name: updateValue.value.name,
181
+ autofocus: props.autoFocus,
182
+ name: props.name,
191
183
  id: id,
192
- placeholder: updateValue.value.place,
193
- maxlength: updateValue.value.length,
184
+ placeholder: props.placeholder,
185
+ maxlength: props.length,
194
186
  showDialCode: true,
195
187
  tabindex: 0,
196
- readonly: updateValue.value.readonly,
197
- required: updateValue.value.required,
188
+ readonly: props.readonly,
189
+ required: props.required,
198
190
  styleClasses: "eui-tel_input",
199
191
  },
200
192
  dropdownOptions: {
201
- disabled: updateValue.value.readonly || updateValue.value.disabled,
193
+ disabled: props.readonly || props.disabled,
202
194
  showFlags: true,
203
195
  showDialCodeInList: true,
204
196
  showSearchBox: true,
205
197
  searchBoxPlaceholder: "Search country...",
206
198
  },
207
- };
199
+ }));
208
200
 
209
201
  const onInputChanged = (_formattedNumber: string, phoneObject: any) => {
210
202
  hasError.value = phoneObject.valid ? true : false;
@@ -245,7 +237,7 @@ const getIconClass = () => {
245
237
  case "startIcon":
246
238
  return props.inputFilled ? "pl-12 pr-4" : "normal pl-10 pr-4";
247
239
  case "endIcon":
248
- return props.inputFilled ? "pr-12 pl-4" : "normal pr-10 pl-4";
240
+ return props.inputFilled ? "pr-12 pl-4" : "normal pr-10 pl-4";
249
241
  default:
250
242
  return props.inputFilled ? "px-4" : "normal px-4";
251
243
  }
@@ -296,4 +288,4 @@ const focusInput = () => {
296
288
  @apply rounded-md py-2;
297
289
  }
298
290
  }
299
- </style>
291
+ </style>
@@ -1,4 +0,0 @@
1
- import _sfc_main from "/Volumes/work/repos/edvoy-ui-v2/src/components/selectSearch/EUISelectSearch.vue?vue&type=script&setup=true&lang.ts";
2
- export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/selectSearch/EUISelectSearch.vue?vue&type=script&setup=true&lang.ts";
3
- export default _sfc_main;
4
- //# sourceMappingURL=EUISelectSearch.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EUISelectSearch.vue.d.ts","sourceRoot":"","sources":["../src/components/selectSearch/EUISelectSearch.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oHAAoH,CAAC;AAC3I,cAAc,oHAAoH,CAAC;AACnI,eAAe,SAAS,CAAC"}
@@ -1,23 +0,0 @@
1
- <template>
2
- <div>
3
- <label for="label" class="mb-4 text-xs font-medium text-gray-400">{{selected?.length < 3}} - {{ selected?.length < 3 }}</label>
4
- <v-select
5
- v-model="selected"
6
- multiple
7
- placeholder="Choose up to 3 books!"
8
- label="title"
9
- :options="dataBooks"
10
- :selectable="() => selected?.length < 3"
11
- />
12
- </div>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- import { computed, ref } from "vue";
17
- import vSelect from "vue-select";
18
- import "vue-select/dist/vue-select.css";
19
- const selected = ref([]);
20
- import books from "../../data/books";
21
-
22
- const dataBooks = computed(() => books);
23
- </script>
@@ -1 +0,0 @@
1
- {"version":3,"file":"EUISelectSearch.vue.js","sourceRoot":"","sources":["EUISelectSearch.vue"],"names":[],"mappings":"AAAA,OAyBO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,gCAAgC,CAAC;AAExC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAA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