UNPKG

@aotearoan/neon

Version:

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

59 lines (58 loc) 1.48 kB
import { defineComponent as n, useAttrs as a, computed as p } from "vue"; import { NeonSize as i } from "../../../model/common/size/NeonSize.es.js"; import { NeonFunctionalColor as u } from "../../../model/common/color/NeonFunctionalColor.es.js"; import d from "../input/NeonInput.vue.es.js"; const y = n({ name: "NeonColor", components: { NeonInput: d }, props: { /** * Id of the input, will be attached to the native color input control. */ id: { type: String }, /** * The Hexadecimal color code. */ modelValue: { type: String, required: !0 }, /** * Disable color picker */ disabled: { type: Boolean, default: !1 }, /** * Only display the color picker */ pickerOnly: { type: Boolean, default: !1 }, /** * The size of the color picker, one of NeonSize.Small | NeonSize.Medium | NeonSize.Large. */ size: { type: String, default: i.Medium }, /** * Color of the input */ color: { type: String, default: u.Primary }, /** * This is the placeholder for the text input when no value is provided. */ placeholder: { type: String, required: !1 } }, setup(e, { emit: t }) { const o = a(), r = p({ get() { return e.modelValue; }, set(l) { t("update:modelValue", l); } }); return { attrs: o, localValue: r }; } }); export { y as default }; //# sourceMappingURL=NeonColor.es.js.map