@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
49 lines (48 loc) • 1.4 kB
JavaScript
import { defineComponent as t, ref as a } from "vue";
import { NeonFunctionalColor as r } from "../../../../model/common/color/NeonFunctionalColor.es.js";
import l from "../../card/NeonCard.vue.es.js";
import n from "../../card/header/NeonCardHeader.vue.es.js";
import d from "../../../user-input/switch/NeonSwitch.vue.es.js";
import { NeonResponsive as i } from "../../../../model/common/responsive/NeonResponsive.es.js";
const V = t({
name: "NeonSelectableCard",
components: {
NeonCard: l,
NeonCardHeader: n,
NeonSwitch: d
},
props: {
/**
* The selected state of the card
*/
modelValue: { type: Boolean, required: !0 },
/**
* The selection color. This will be used for the checkbox as well as borders & the background color
*/
color: { type: String, default: r.Brand },
/**
* The disabled state of the card.
*/
disabled: { type: Boolean, default: !1 }
},
emits: [
/**
* Emitted when the user clicks on the card, toggling the selection state.
* @type {boolean} the current selection state of the card.
*/
"update:modelValue"
],
setup(e, { emit: o }) {
return {
active: a(!1),
clicked: () => {
e.disabled || o("update:modelValue", !e.modelValue);
},
NeonResponsive: i
};
}
});
export {
V as default
};
//# sourceMappingURL=NeonSelectableCard.es.js.map