orio-ui 1.19.0 → 1.20.0
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/README.md +3 -3
- package/dist/module.json +1 -1
- package/dist/runtime/components/Button.vue +2 -1
- package/dist/runtime/components/CheckBox.vue +6 -3
- package/dist/runtime/components/CheckboxGroup.vue +2 -1
- package/dist/runtime/components/ControlElement.d.vue.ts +5 -0
- package/dist/runtime/components/ControlElement.vue +14 -2
- package/dist/runtime/components/ControlElement.vue.d.ts +5 -0
- package/dist/runtime/components/Input.vue +2 -1
- package/dist/runtime/components/ListItem.d.vue.ts +29 -0
- package/dist/runtime/components/ListItem.vue +72 -0
- package/dist/runtime/components/ListItem.vue.d.ts +29 -0
- package/dist/runtime/components/NavButton.vue +2 -1
- package/dist/runtime/components/NumberInput/Horizontal.vue +2 -1
- package/dist/runtime/components/NumberInput/Vertical.vue +2 -1
- package/dist/runtime/components/NumberInput/index.vue +2 -1
- package/dist/runtime/components/RadioButton.vue +2 -1
- package/dist/runtime/components/Selector.vue +10 -17
- package/dist/runtime/components/SwitchButton.vue +2 -1
- package/dist/runtime/components/Tag.d.vue.ts +3 -2
- package/dist/runtime/components/Tag.vue +1 -0
- package/dist/runtime/components/Tag.vue.d.ts +3 -2
- package/dist/runtime/components/TaggableSelector.d.vue.ts +16 -0
- package/dist/runtime/components/TaggableSelector.vue +35 -0
- package/dist/runtime/components/TaggableSelector.vue.d.ts +16 -0
- package/dist/runtime/components/Textarea.vue +2 -1
- package/dist/runtime/index.d.ts +3 -1
- package/dist/runtime/index.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A delightful, lightweight component library for Nuxt 3+ applications. Built with
|
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
✨ **
|
|
11
|
+
✨ **34 Components** - Beautiful, accessible components ready to use
|
|
12
12
|
🎨 **Themeable** - 5 built-in accent themes with light/dark mode support
|
|
13
13
|
🚀 **Auto-imported** - Works seamlessly with Nuxt's auto-import system
|
|
14
14
|
📦 **Tree-shakeable** - Only bundle what you use
|
|
@@ -66,7 +66,7 @@ function handleClick() {
|
|
|
66
66
|
|
|
67
67
|
## What's Included
|
|
68
68
|
|
|
69
|
-
### Components (
|
|
69
|
+
### Components (34)
|
|
70
70
|
|
|
71
71
|
#### Form Controls
|
|
72
72
|
|
|
@@ -187,7 +187,7 @@ npm run docs:dev
|
|
|
187
187
|
orio-ui/
|
|
188
188
|
├── src/
|
|
189
189
|
│ ├── runtime/
|
|
190
|
-
│ │ ├── components/ #
|
|
190
|
+
│ │ ├── components/ # 34 Vue components
|
|
191
191
|
│ │ ├── composables/ # 11 composables
|
|
192
192
|
│ │ ├── assets/css/ # Theme CSS files
|
|
193
193
|
│ │ └── utils/ # Icon registry
|
package/dist/module.json
CHANGED
|
@@ -11,7 +11,8 @@ const props = defineProps({
|
|
|
11
11
|
id: { type: String, required: false },
|
|
12
12
|
label: { type: String, required: false },
|
|
13
13
|
layout: { type: String, required: false },
|
|
14
|
-
size: { type: String, required: false }
|
|
14
|
+
size: { type: String, required: false },
|
|
15
|
+
fill: { type: Boolean, required: false }
|
|
15
16
|
});
|
|
16
17
|
const { loading, disabled } = toRefs(props);
|
|
17
18
|
const slots = useSlots();
|
|
@@ -9,12 +9,13 @@ const props = defineProps({
|
|
|
9
9
|
id: { type: String, required: false },
|
|
10
10
|
label: { type: String, required: false },
|
|
11
11
|
layout: { type: String, required: false },
|
|
12
|
-
size: { type: String, required: false }
|
|
12
|
+
size: { type: String, required: false },
|
|
13
|
+
fill: { type: Boolean, required: false }
|
|
13
14
|
});
|
|
14
15
|
</script>
|
|
15
16
|
|
|
16
17
|
<template>
|
|
17
|
-
<orio-control-element v-bind="props" class="checkbox">
|
|
18
|
+
<orio-control-element v-bind="props" class="checkbox" fill>
|
|
18
19
|
<label class="checkbox-label">
|
|
19
20
|
<input
|
|
20
21
|
v-model="modelValue"
|
|
@@ -47,6 +48,9 @@ const props = defineProps({
|
|
|
47
48
|
.checkbox {
|
|
48
49
|
--box-size: var(--control-icon-size, 1rem);
|
|
49
50
|
}
|
|
51
|
+
.checkbox .checkbox-label {
|
|
52
|
+
vertical-align: baseline;
|
|
53
|
+
}
|
|
50
54
|
.checkbox-label {
|
|
51
55
|
position: relative;
|
|
52
56
|
user-select: none;
|
|
@@ -60,7 +64,6 @@ const props = defineProps({
|
|
|
60
64
|
position: absolute;
|
|
61
65
|
inset: 0;
|
|
62
66
|
width: var(--box-size);
|
|
63
|
-
height: 1rem;
|
|
64
67
|
margin: 0;
|
|
65
68
|
opacity: 0;
|
|
66
69
|
}
|
|
@@ -5,7 +5,8 @@ const props = defineProps({
|
|
|
5
5
|
error: { type: [String, null], required: false, default: null },
|
|
6
6
|
label: { type: String, required: false },
|
|
7
7
|
layout: { type: String, required: false, default: "vertical" },
|
|
8
|
-
size: { type: String, required: false, default: "md" }
|
|
8
|
+
size: { type: String, required: false, default: "md" },
|
|
9
|
+
fill: { type: Boolean, required: false }
|
|
9
10
|
});
|
|
10
11
|
const modelValue = defineModel({ type: Array, ...{ default: () => [] } });
|
|
11
12
|
function isChecked(value) {
|
|
@@ -31,6 +31,10 @@ export interface ControlProps {
|
|
|
31
31
|
* Size of the control and its inner elements
|
|
32
32
|
*/
|
|
33
33
|
size?: ControlSize;
|
|
34
|
+
/**
|
|
35
|
+
* Whether element should fill the container
|
|
36
|
+
*/
|
|
37
|
+
fill?: boolean;
|
|
34
38
|
}
|
|
35
39
|
declare var __VLS_7: {
|
|
36
40
|
id: string;
|
|
@@ -45,6 +49,7 @@ declare const __VLS_base: import("vue").DefineComponent<ControlProps, {}, {}, {}
|
|
|
45
49
|
id: string;
|
|
46
50
|
layout: ControlLayout;
|
|
47
51
|
size: ControlSize;
|
|
52
|
+
fill: boolean;
|
|
48
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -9,7 +9,8 @@ const props = defineProps({
|
|
|
9
9
|
id: { type: String, required: false, default: () => useId() },
|
|
10
10
|
label: { type: String, required: false },
|
|
11
11
|
layout: { type: String, required: false, default: "vertical" },
|
|
12
|
-
size: { type: String, required: false, default: "md" }
|
|
12
|
+
size: { type: String, required: false, default: "md" },
|
|
13
|
+
fill: { type: Boolean, required: false, default: false }
|
|
13
14
|
});
|
|
14
15
|
provideControlSize(toRef(props, "size"));
|
|
15
16
|
const sizeStyle = computed(() => sizeTokens[props.size]);
|
|
@@ -18,7 +19,12 @@ const sizeStyle = computed(() => sizeTokens[props.size]);
|
|
|
18
19
|
<template>
|
|
19
20
|
<div
|
|
20
21
|
class="control"
|
|
21
|
-
:class="[
|
|
22
|
+
:class="[
|
|
23
|
+
appearance,
|
|
24
|
+
layout,
|
|
25
|
+
`size-${size}`,
|
|
26
|
+
{ 'has-error': error, group, fill }
|
|
27
|
+
]"
|
|
22
28
|
:style="sizeStyle"
|
|
23
29
|
v-bind="{
|
|
24
30
|
...$attrs,
|
|
@@ -60,6 +66,12 @@ const sizeStyle = computed(() => sizeTokens[props.size]);
|
|
|
60
66
|
color: var(--color-danger);
|
|
61
67
|
font-size: var(--control-label-font-size);
|
|
62
68
|
}
|
|
69
|
+
.control.fill .slot-wrapper {
|
|
70
|
+
display: flex;
|
|
71
|
+
}
|
|
72
|
+
.control.fill .slot-wrapper > * {
|
|
73
|
+
flex: 1;
|
|
74
|
+
}
|
|
63
75
|
.control .slot-wrapper :deep(*) {
|
|
64
76
|
font-size: var(--control-font-size);
|
|
65
77
|
}
|
|
@@ -31,6 +31,10 @@ export interface ControlProps {
|
|
|
31
31
|
* Size of the control and its inner elements
|
|
32
32
|
*/
|
|
33
33
|
size?: ControlSize;
|
|
34
|
+
/**
|
|
35
|
+
* Whether element should fill the container
|
|
36
|
+
*/
|
|
37
|
+
fill?: boolean;
|
|
34
38
|
}
|
|
35
39
|
declare var __VLS_7: {
|
|
36
40
|
id: string;
|
|
@@ -45,6 +49,7 @@ declare const __VLS_base: import("vue").DefineComponent<ControlProps, {}, {}, {}
|
|
|
45
49
|
id: string;
|
|
46
50
|
layout: ControlLayout;
|
|
47
51
|
size: ControlSize;
|
|
52
|
+
fill: boolean;
|
|
48
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,7 +6,8 @@ const props = defineProps({
|
|
|
6
6
|
group: { type: Boolean, required: false },
|
|
7
7
|
id: { type: String, required: false },
|
|
8
8
|
label: { type: String, required: false },
|
|
9
|
-
size: { type: String, required: false }
|
|
9
|
+
size: { type: String, required: false },
|
|
10
|
+
fill: { type: Boolean, required: false }
|
|
10
11
|
});
|
|
11
12
|
const modelValue = defineModel({ type: String, ...{ default: "" } });
|
|
12
13
|
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ListItemProps {
|
|
2
|
+
selectable?: boolean;
|
|
3
|
+
}
|
|
4
|
+
type __VLS_Props = ListItemProps;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
"selected"?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
start?: (props: typeof __VLS_1) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: typeof __VLS_8) => any;
|
|
14
|
+
} & {
|
|
15
|
+
end?: (props: typeof __VLS_10) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:selected": (value: boolean | undefined) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:selected"?: ((value: boolean | undefined) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useSlots } from "vue";
|
|
3
|
+
const { selectable = false } = defineProps({
|
|
4
|
+
selectable: { type: Boolean, required: false }
|
|
5
|
+
});
|
|
6
|
+
const slots = useSlots();
|
|
7
|
+
const selected = defineModel("selected", { type: Boolean });
|
|
8
|
+
function toggle() {
|
|
9
|
+
if (!selectable) return;
|
|
10
|
+
selected.value = !selected.value;
|
|
11
|
+
}
|
|
12
|
+
function onKeydown(event) {
|
|
13
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
14
|
+
event.preventDefault();
|
|
15
|
+
toggle();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<li
|
|
22
|
+
class="list-item"
|
|
23
|
+
:class="{ selectable, selected }"
|
|
24
|
+
:tabindex="selectable ? 0 : void 0"
|
|
25
|
+
:role="selectable ? 'checkbox' : void 0"
|
|
26
|
+
:aria-checked="selectable ? selected : void 0"
|
|
27
|
+
@click="toggle"
|
|
28
|
+
@keydown="onKeydown"
|
|
29
|
+
>
|
|
30
|
+
<div v-if="!!slots.start || selectable" class="boundary">
|
|
31
|
+
<slot name="start">
|
|
32
|
+
<orio-check-box :model-value="selected" />
|
|
33
|
+
</slot>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="content">
|
|
36
|
+
<slot />
|
|
37
|
+
</div>
|
|
38
|
+
<div v-if="!!slots.end" class="boundary">
|
|
39
|
+
<slot name="end" />
|
|
40
|
+
</div>
|
|
41
|
+
</li>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style scoped>
|
|
45
|
+
.list-item {
|
|
46
|
+
width: 100%;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 0.5rem;
|
|
50
|
+
padding: 0.5rem;
|
|
51
|
+
user-select: none;
|
|
52
|
+
}
|
|
53
|
+
.list-item.selectable {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
.list-item {
|
|
57
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
58
|
+
}
|
|
59
|
+
.list-item.selected {
|
|
60
|
+
background-color: var(--color-accent);
|
|
61
|
+
color: var(--color-accent-soft-darker);
|
|
62
|
+
}
|
|
63
|
+
.list-item:hover:not(.selected) {
|
|
64
|
+
background-color: var(--color-surface);
|
|
65
|
+
}
|
|
66
|
+
.list-item .content {
|
|
67
|
+
flex-grow: 1;
|
|
68
|
+
}
|
|
69
|
+
.list-item .boundary {
|
|
70
|
+
display: flex;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ListItemProps {
|
|
2
|
+
selectable?: boolean;
|
|
3
|
+
}
|
|
4
|
+
type __VLS_Props = ListItemProps;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
"selected"?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
start?: (props: typeof __VLS_1) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: typeof __VLS_8) => any;
|
|
14
|
+
} & {
|
|
15
|
+
end?: (props: typeof __VLS_10) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:selected": (value: boolean | undefined) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:selected"?: ((value: boolean | undefined) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -10,7 +10,8 @@ const props = defineProps({
|
|
|
10
10
|
id: { type: String, required: false },
|
|
11
11
|
label: { type: String, required: false },
|
|
12
12
|
layout: { type: String, required: false },
|
|
13
|
-
size: { type: String, required: false }
|
|
13
|
+
size: { type: String, required: false },
|
|
14
|
+
fill: { type: Boolean, required: false }
|
|
14
15
|
});
|
|
15
16
|
const { disabled, active } = toRefs(props);
|
|
16
17
|
const slots = useSlots();
|
|
@@ -12,7 +12,8 @@ defineProps({
|
|
|
12
12
|
group: { type: Boolean, required: false },
|
|
13
13
|
id: { type: String, required: false },
|
|
14
14
|
label: { type: String, required: false },
|
|
15
|
-
size: { type: String, required: false }
|
|
15
|
+
size: { type: String, required: false },
|
|
16
|
+
fill: { type: Boolean, required: false }
|
|
16
17
|
});
|
|
17
18
|
const modelValue = defineModel({ type: Number, ...{ default: 0 } });
|
|
18
19
|
const { pressAndHold, stop } = usePressAndHold();
|
|
@@ -12,7 +12,8 @@ defineProps({
|
|
|
12
12
|
group: { type: Boolean, required: false },
|
|
13
13
|
id: { type: String, required: false },
|
|
14
14
|
label: { type: String, required: false },
|
|
15
|
-
size: { type: String, required: false }
|
|
15
|
+
size: { type: String, required: false },
|
|
16
|
+
fill: { type: Boolean, required: false }
|
|
16
17
|
});
|
|
17
18
|
const modelValue = defineModel({ type: Number, ...{ default: 0 } });
|
|
18
19
|
const { pressAndHold, stop } = usePressAndHold();
|
|
@@ -12,7 +12,8 @@ const props = defineProps({
|
|
|
12
12
|
group: { type: Boolean, required: false },
|
|
13
13
|
id: { type: String, required: false },
|
|
14
14
|
label: { type: String, required: false },
|
|
15
|
-
size: { type: String, required: false }
|
|
15
|
+
size: { type: String, required: false },
|
|
16
|
+
fill: { type: Boolean, required: false }
|
|
16
17
|
});
|
|
17
18
|
const { min, max, step, decimalPlaces } = toRefs(props);
|
|
18
19
|
const modelValue = defineModel({ type: Number, ...{ default: 0 } });
|
|
@@ -11,7 +11,8 @@ const props = defineProps({
|
|
|
11
11
|
id: { type: String, required: false },
|
|
12
12
|
label: { type: String, required: false },
|
|
13
13
|
layout: { type: String, required: false },
|
|
14
|
-
size: { type: String, required: false }
|
|
14
|
+
size: { type: String, required: false },
|
|
15
|
+
fill: { type: Boolean, required: false }
|
|
15
16
|
});
|
|
16
17
|
</script>
|
|
17
18
|
|
|
@@ -14,7 +14,8 @@ const props = defineProps({
|
|
|
14
14
|
id: { type: String, required: false },
|
|
15
15
|
label: { type: String, required: false },
|
|
16
16
|
layout: { type: String, required: false },
|
|
17
|
-
size: { type: String, required: false }
|
|
17
|
+
size: { type: String, required: false },
|
|
18
|
+
fill: { type: Boolean, required: false }
|
|
18
19
|
});
|
|
19
20
|
const { field, optionName, placeholder } = toRefs(props);
|
|
20
21
|
const modelValue = defineModel({ type: null, ...{
|
|
@@ -151,15 +152,14 @@ const {
|
|
|
151
152
|
role="listbox"
|
|
152
153
|
:aria-multiselectable="multiple || void 0"
|
|
153
154
|
>
|
|
154
|
-
<
|
|
155
|
+
<orio-list-item
|
|
155
156
|
v-for="(option, index) in options"
|
|
156
157
|
:key="getOptionKey(option)"
|
|
158
|
+
:selectable="multiple"
|
|
159
|
+
:selected="isOptionSelected(option)"
|
|
157
160
|
role="option"
|
|
158
161
|
:aria-selected="isOptionSelected(option)"
|
|
159
|
-
:class="{
|
|
160
|
-
selected: isOptionSelected(option),
|
|
161
|
-
highlighted: index === highlightedIndex
|
|
162
|
-
}"
|
|
162
|
+
:class="{ highlighted: index === highlightedIndex }"
|
|
163
163
|
@click="toggleOption(option, toggle)"
|
|
164
164
|
@mouseenter="highlightedIndex = index"
|
|
165
165
|
>
|
|
@@ -172,7 +172,7 @@ const {
|
|
|
172
172
|
>
|
|
173
173
|
{{ getOptionLabel(option) }}
|
|
174
174
|
</slot>
|
|
175
|
-
</
|
|
175
|
+
</orio-list-item>
|
|
176
176
|
</ul>
|
|
177
177
|
<slot v-else name="no-options">
|
|
178
178
|
<orio-empty-state title="No options found" size="small" />
|
|
@@ -232,19 +232,12 @@ const {
|
|
|
232
232
|
padding: 0;
|
|
233
233
|
margin: 0;
|
|
234
234
|
}
|
|
235
|
-
.selector-content ul
|
|
235
|
+
.selector-content ul :deep(.list-item) {
|
|
236
236
|
padding: var(--control-py) var(--control-px);
|
|
237
237
|
cursor: pointer;
|
|
238
|
-
transition: background-color 0.15s ease, color 0.15s ease;
|
|
239
|
-
color: var(--color-text);
|
|
240
|
-
}
|
|
241
|
-
.selector-content ul li:hover, .selector-content ul li.highlighted {
|
|
242
|
-
background-color: var(--color-surface); /* neutral lift */
|
|
243
238
|
}
|
|
244
|
-
.selector-content ul
|
|
245
|
-
background-color: var(--color-
|
|
246
|
-
color: var(--color-accent-soft-darker);
|
|
247
|
-
font-weight: 400;
|
|
239
|
+
.selector-content ul :deep(.list-item).highlighted:not(.selected) {
|
|
240
|
+
background-color: var(--color-surface);
|
|
248
241
|
}
|
|
249
242
|
|
|
250
243
|
.trigger-content {
|
|
@@ -7,7 +7,8 @@ const props = defineProps({
|
|
|
7
7
|
id: { type: String, required: false },
|
|
8
8
|
label: { type: String, required: false },
|
|
9
9
|
layout: { type: String, required: false },
|
|
10
|
-
size: { type: String, required: false }
|
|
10
|
+
size: { type: String, required: false },
|
|
11
|
+
fill: { type: Boolean, required: false }
|
|
11
12
|
});
|
|
12
13
|
const modelValue = defineModel({ type: Boolean, ...{ required: false } });
|
|
13
14
|
function toggle() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export type TagStyle = "neutral" | "accent";
|
|
2
|
-
interface
|
|
2
|
+
export interface TagProps {
|
|
3
3
|
text: string;
|
|
4
|
+
id?: string;
|
|
4
5
|
variant?: TagStyle;
|
|
5
6
|
}
|
|
6
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{}>, {
|
|
7
8
|
variant: TagStyle;
|
|
8
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
10
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export type TagStyle = "neutral" | "accent";
|
|
2
|
-
interface
|
|
2
|
+
export interface TagProps {
|
|
3
3
|
text: string;
|
|
4
|
+
id?: string;
|
|
4
5
|
variant?: TagStyle;
|
|
5
6
|
}
|
|
6
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{}>, {
|
|
7
8
|
variant: TagStyle;
|
|
8
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
10
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SelectProps } from "./Selector.vue.js";
|
|
2
|
+
import type { TagProps } from "./Tag.vue.js";
|
|
3
|
+
type __VLS_Props = SelectProps;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: TagProps[];
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: TagProps[] | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: TagProps[] | undefined) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
optionName: string;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
options: { type: Array, required: true },
|
|
4
|
+
multiple: { type: Boolean, required: false },
|
|
5
|
+
field: { type: String, required: false },
|
|
6
|
+
optionName: { type: String, required: false, default: "text" },
|
|
7
|
+
placeholder: { type: String, required: false },
|
|
8
|
+
appearance: { type: String, required: false },
|
|
9
|
+
error: { type: [String, null], required: false },
|
|
10
|
+
group: { type: Boolean, required: false },
|
|
11
|
+
id: { type: String, required: false },
|
|
12
|
+
label: { type: String, required: false },
|
|
13
|
+
layout: { type: String, required: false },
|
|
14
|
+
size: { type: String, required: false },
|
|
15
|
+
fill: { type: Boolean, required: false }
|
|
16
|
+
});
|
|
17
|
+
const modelValue = defineModel({ type: Array });
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<orio-selector v-bind="props" v-model="modelValue" multiple>
|
|
22
|
+
<template #trigger-label>
|
|
23
|
+
<orio-tag
|
|
24
|
+
v-for="tag in modelValue"
|
|
25
|
+
:key="tag.id"
|
|
26
|
+
:text="tag.text"
|
|
27
|
+
:variant="tag.variant"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</orio-selector>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
:deep(.trigger-content){display:flex;flex-wrap:wrap;gap:.5rem;text-align:left}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SelectProps } from "./Selector.vue.js";
|
|
2
|
+
import type { TagProps } from "./Tag.vue.js";
|
|
3
|
+
type __VLS_Props = SelectProps;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: TagProps[];
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: TagProps[] | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: TagProps[] | undefined) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
optionName: string;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -7,7 +7,8 @@ const props = defineProps({
|
|
|
7
7
|
group: { type: Boolean, required: false },
|
|
8
8
|
id: { type: String, required: false },
|
|
9
9
|
label: { type: String, required: false },
|
|
10
|
-
size: { type: String, required: false }
|
|
10
|
+
size: { type: String, required: false },
|
|
11
|
+
fill: { type: Boolean, required: false }
|
|
11
12
|
});
|
|
12
13
|
</script>
|
|
13
14
|
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { default as SwitchButton } from "./components/SwitchButton.vue.js";
|
|
|
14
14
|
export { default as DatePicker } from "./components/DatePicker.vue.js";
|
|
15
15
|
export { default as DateRangePicker } from "./components/DateRangePicker.vue.js";
|
|
16
16
|
export { default as Selector } from "./components/Selector.vue.js";
|
|
17
|
+
export { default as TaggableSelector } from "./components/TaggableSelector.vue.js";
|
|
17
18
|
export { default as Tag } from "./components/Tag.vue.js";
|
|
18
19
|
export { default as Badge } from "./components/Badge.vue.js";
|
|
19
20
|
export { default as Banner } from "./components/Banner.vue.js";
|
|
@@ -22,7 +23,7 @@ export { default as LoadingSpinner } from "./components/LoadingSpinner.vue.js";
|
|
|
22
23
|
export { default as Modal } from "./components/Modal.vue.js";
|
|
23
24
|
export { default as Popover } from "./components/Popover.vue.js";
|
|
24
25
|
export { default as Tooltip } from "./components/Tooltip.vue.js";
|
|
25
|
-
export { default as Upload } from "./components/
|
|
26
|
+
export { default as Upload } from "./components/upload/index.vue.js";
|
|
26
27
|
export { default as EmptyState } from "./components/EmptyState.vue.js";
|
|
27
28
|
export { default as DashedContainer } from "./components/DashedContainer.vue.js";
|
|
28
29
|
export { default as ControlElement } from "./components/ControlElement.vue.js";
|
|
@@ -30,6 +31,7 @@ export { default as GalleryCarousel } from "./components/gallery/Carousel.vue.js
|
|
|
30
31
|
export { default as ViewText } from "./components/view/Text.vue.js";
|
|
31
32
|
export { default as ViewDates } from "./components/view/Dates.vue.js";
|
|
32
33
|
export { default as ViewSeparator } from "./components/view/Separator.vue.js";
|
|
34
|
+
export { default as ListItem } from "./components/ListItem.vue.js";
|
|
33
35
|
export { useApi, type ApiOptions, type RequestBody, type RequestMethod, } from "./composables/useApi.js";
|
|
34
36
|
export { useFuzzySearch } from "./composables/useFuzzySearch.js";
|
|
35
37
|
export { useModal, type ModalProps, type OriginRect, } from "./composables/useModal.js";
|
package/dist/runtime/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { default as SwitchButton } from "./components/SwitchButton.vue";
|
|
|
18
18
|
export { default as DatePicker } from "./components/DatePicker.vue";
|
|
19
19
|
export { default as DateRangePicker } from "./components/DateRangePicker.vue";
|
|
20
20
|
export { default as Selector } from "./components/Selector.vue";
|
|
21
|
+
export { default as TaggableSelector } from "./components/TaggableSelector.vue";
|
|
21
22
|
export { default as Tag } from "./components/Tag.vue";
|
|
22
23
|
export { default as Badge } from "./components/Badge.vue";
|
|
23
24
|
export { default as Banner } from "./components/Banner.vue";
|
|
@@ -26,7 +27,7 @@ export { default as LoadingSpinner } from "./components/LoadingSpinner.vue";
|
|
|
26
27
|
export { default as Modal } from "./components/Modal.vue";
|
|
27
28
|
export { default as Popover } from "./components/Popover.vue";
|
|
28
29
|
export { default as Tooltip } from "./components/Tooltip.vue";
|
|
29
|
-
export { default as Upload } from "./components/
|
|
30
|
+
export { default as Upload } from "./components/upload/index.vue";
|
|
30
31
|
export { default as EmptyState } from "./components/EmptyState.vue";
|
|
31
32
|
export { default as DashedContainer } from "./components/DashedContainer.vue";
|
|
32
33
|
export { default as ControlElement } from "./components/ControlElement.vue";
|
|
@@ -34,6 +35,7 @@ export { default as GalleryCarousel } from "./components/gallery/Carousel.vue";
|
|
|
34
35
|
export { default as ViewText } from "./components/view/Text.vue";
|
|
35
36
|
export { default as ViewDates } from "./components/view/Dates.vue";
|
|
36
37
|
export { default as ViewSeparator } from "./components/view/Separator.vue";
|
|
38
|
+
export { default as ListItem } from "./components/ListItem.vue";
|
|
37
39
|
export {
|
|
38
40
|
useApi
|
|
39
41
|
} from "./composables/useApi.js";
|