edvoyui-component-library-test-flight 0.0.182 → 0.0.183
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/dist/edvoy-ui.cjs.js +24 -24
- package/dist/edvoy-ui.es.js +3467 -3656
- package/dist/edvoy-ui.umd.js +35 -35
- package/package.json +3 -2
- package/src/components/index.ts +0 -1
- package/src/components/searchTagSelect/EUISearchTagSelect.stories.ts +217 -0
- package/dist/EUISelectSearch.vue.d.ts +0 -4
- package/dist/EUISelectSearch.vue.d.ts.map +0 -1
- package/src/components/selectSearch/EUISelectSearch.vue +0 -23
- package/src/components/selectSearch/EUISelectSearch.vue.js.map +0 -1
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.
|
|
4
|
+
"version": "0.0.183",
|
|
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"
|
package/src/components/index.ts
CHANGED
|
@@ -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
|
+
};
|
|
@@ -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,EAAE,aAAa,EAAE,YAAY,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/H,MAAM,QAAQ,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACzB,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAErC,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AACxC,MAAM,iBAAiB,GAAG,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,EAC/D,CAAC,CAAC;AACuD,CAAC;AAC3D,IAAI,8BAAmJ,CAAC;AAExJ,SAAS,cAAc;IACvB,MAAM,SAAS,GAAG,EAAqE,CAAC;IACxF,MAAM,qBAAqB,GAAG;QAC9B,GAAG,EAKA;QACH,GAAG,EAA6E;QAChF,GAAG,SAAS;KACX,CAAC;IACF,IAAI,gBAAwE,CAAC;IAC7E,MAAM,qBAAqB,GAAG;QAC9B,GAAG,EAA6E;QAChF,GAAG,SAAS;KACX,CAAC;IACF,IAAI,gBAAwE,CAAC;IAC7E,IAAI,wBAA6B,CAAC;IAElC,IAAI,sCAC8F,CAAC;IACnG,uBAAuB,CAAC,uB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