UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

54 lines (53 loc) 1.54 kB
import { defineComponent as t, ref as r } from "vue"; import { NeonSize as a } from "../../../common/enums/NeonSize.es.js"; import { NeonFunctionalColor as l } from "../../../common/enums/NeonFunctionalColor.es.js"; import n from "../../layout/card/NeonCard.vue.es.js"; import i from "../../layout/card/header/NeonCardHeader.vue.es.js"; import m from "../switch/NeonSwitch.vue.es.js"; import { NeonResponsive as d } from "../../../common/enums/NeonResponsive.es.js"; const V = t({ name: "NeonSelectableCard", components: { NeonCard: n, NeonCardHeader: i, NeonSwitch: m }, props: { /** * The selected state of the card */ modelValue: { type: Boolean, required: !0 }, /** * The size of the card. */ size: { type: String, default: a.Small }, /** * The selection color. This will be used for the checkbox as well as borders & the background color */ color: { type: String, default: l.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: r(!1), clicked: () => { e.disabled || o("update:modelValue", !e.modelValue); }, NeonResponsive: d }; } }); export { V as default }; //# sourceMappingURL=NeonSelectableCard.es.js.map