@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
55 lines (54 loc) • 1.31 kB
JavaScript
import { defineComponent as l } from "vue";
import { NeonSize as n } from "../../../common/enums/NeonSize.es.js";
import { NeonFunctionalColor as a } from "../../../common/enums/NeonFunctionalColor.es.js";
import m from "../../presentation/icon/NeonIcon.vue.es.js";
const f = l({
name: "NeonList",
components: {
NeonIcon: m
},
props: {
/**
* The list items.
*/
modelValue: { type: Array, required: !0 },
/**
* The file component size
*/
size: { type: String, default: n.Medium },
/**
* The file component color
*/
color: { type: String, default: a.LowContrast },
/**
* The disabled state of the component
*/
disabled: { type: Boolean, default: !1 }
},
emits: [
/**
* Emitted when an item is removed from the list
* @type {NeonListItem[]} updated list of items
*/
"update:modelValue",
/**
* Emitted when an item is removed from the list
* @type {string} key of the item removed
*/
"close"
],
setup(e, { emit: o }) {
return {
remove: (t) => {
e.disabled || (o(
"update:modelValue",
e.modelValue.filter((r) => r.key !== t)
), o("close", t));
}
};
}
});
export {
f as default
};
//# sourceMappingURL=NeonList.es.js.map