@aotearoan/neon 11.0.5 → 11.0.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggle.cjs.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Neutral },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {boolean} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (key: string) => {\n if (!props.disabled) {\n emitInput(key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","attrs","useAttrs","emitInput","key","onInput","sanitizedAttributes","computed","onClick","sanitized","option"],"mappings":"kUAWAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,SAAAC,CACF,EACA,MAAO,CAIL,KAAM,CAAE,KAAM,OAAQ,SAAU,EAAK,EAIrC,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAK,EAI3C,MAAO,CAAE,KAAM,MAAuC,SAAU,EAAK,EAIrE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,kBAAgB,MAAO,EAI5F,KAAM,CAAE,KAAM,OAA0B,QAAS,IAAMC,WAAS,MAAO,EAIvE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,kBAAgB,QAAS,EAI9F,MAAO,CAAE,KAAM,OAAqC,QAAS,IAAMC,sBAAoB,OAAQ,EAI/F,SAAU,CAAE,KAAM,QAAS,QAAS,EAAM,CAC5C,EACA,MAAO,CAKL,mBACF,EACA,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,WACRC,EAAaC,GAAgB,CACjCJ,EAAK,oBAAqBI,CAAG,CAAA,EAGzBC,EAAWD,GAAgB,CAC1BL,EAAM,UACTI,EAAUC,CAAG,CACf,EAGIE,EAAsBC,EAAAA,SAAS,IAAM,CAEzC,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAA,EAAcR,EAC3B,OAAAQ,CAAA,CACR,EAQM,MAAA,CACL,aAPoBC,GAA4B,CAC5C,CAACX,EAAM,UAAY,CAACW,EAAO,UAC7BP,EAAUO,EAAO,GAAG,CACtB,EAKA,QAAAL,EACA,oBAAAC,CAAA,CAEJ,CACF,CAAC"}
1
+ {"version":3,"file":"NeonToggle.cjs.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Neutral },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {string} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (key: string) => {\n if (!props.disabled) {\n emitInput(key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","attrs","useAttrs","emitInput","key","onInput","sanitizedAttributes","computed","onClick","sanitized","option"],"mappings":"kUAWAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,SAAAC,CACF,EACA,MAAO,CAIL,KAAM,CAAE,KAAM,OAAQ,SAAU,EAAK,EAIrC,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAK,EAI3C,MAAO,CAAE,KAAM,MAAuC,SAAU,EAAK,EAIrE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,kBAAgB,MAAO,EAI5F,KAAM,CAAE,KAAM,OAA0B,QAAS,IAAMC,WAAS,MAAO,EAIvE,YAAa,CAAE,KAAM,OAAiC,QAAS,IAAMC,kBAAgB,QAAS,EAI9F,MAAO,CAAE,KAAM,OAAqC,QAAS,IAAMC,sBAAoB,OAAQ,EAI/F,SAAU,CAAE,KAAM,QAAS,QAAS,EAAM,CAC5C,EACA,MAAO,CAKL,mBACF,EACA,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,WACRC,EAAaC,GAAgB,CACjCJ,EAAK,oBAAqBI,CAAG,CAAA,EAGzBC,EAAWD,GAAgB,CAC1BL,EAAM,UACTI,EAAUC,CAAG,CACf,EAGIE,EAAsBC,EAAAA,SAAS,IAAM,CAEzC,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAA,EAAcR,EAC3B,OAAAQ,CAAA,CACR,EAQM,MAAA,CACL,aAPoBC,GAA4B,CAC5C,CAACX,EAAM,UAAY,CAACW,EAAO,UAC7BP,EAAUO,EAAO,GAAG,CACtB,EAKA,QAAAL,EACA,oBAAAC,CAAA,CAEJ,CACF,CAAC"}
@@ -46,7 +46,7 @@ const A = d({
46
46
  emits: [
47
47
  /**
48
48
  * Emitted when the selected value changes.
49
- * @type {boolean} The key of the selected model item.
49
+ * @type {string} The key of the selected model item.
50
50
  */
51
51
  "update:modelValue"
52
52
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggle.es.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Neutral },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {boolean} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (key: string) => {\n if (!props.disabled) {\n emitInput(key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","attrs","useAttrs","emitInput","key","onInput","sanitizedAttributes","computed","onClick","sanitized","option"],"mappings":";;;;;;AAWA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAIrC,YAAY,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAI3C,OAAO,EAAE,MAAM,OAAuC,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAIrE,aAAa,EAAE,MAAM,QAAiC,SAAS,MAAMC,EAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,IAI5F,MAAM,EAAE,MAAM,QAA0B,SAAS,MAAMC,EAAS,OAAO;AAAA;AAAA;AAAA;AAAA,IAIvE,aAAa,EAAE,MAAM,QAAiC,SAAS,MAAMC,EAAgB,SAAS;AAAA;AAAA;AAAA;AAAA,IAI9F,OAAO,EAAE,MAAM,QAAqC,SAAS,MAAMC,EAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI/F,UAAU,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EAC5C;AAAA,EACA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA,EACF;AAAA,EACA,MAAMC,GAAO,EAAE,MAAAC,KAAQ;AACrB,UAAMC,IAAQC,KACRC,IAAY,CAACC,MAAgB;AACjC,MAAAJ,EAAK,qBAAqBI,CAAG;AAAA,IAAA,GAGzBC,IAAU,CAACD,MAAgB;AAC3B,MAACL,EAAM,YACTI,EAAUC,CAAG;AAAA,IACf,GAGIE,IAAsBC,EAAS,MAAM;AAEzC,YAAM,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAcR;AAC3B,aAAAQ;AAAA,IAAA,CACR;AAQM,WAAA;AAAA,MACL,cAPmB,CAACC,MAA4B;AAChD,QAAI,CAACX,EAAM,YAAY,CAACW,EAAO,YAC7BP,EAAUO,EAAO,GAAG;AAAA,MACtB;AAAA,MAKA,SAAAL;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
1
+ {"version":3,"file":"NeonToggle.es.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport type { NeonToggleModel } from '@/common/models/NeonToggleModel';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport { NeonToggleStyle } from '@/common/enums/NeonToggleStyle';\nimport { NeonOrientation } from '@/common/enums/NeonOrientation';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\n\n/**\n * <p>A toggle component for selecting one value from a range of options. This is equivalent to a radio button group. It can be styled as a <em>Toggle</em> or as <em>Radio buttons</em>.\n */\nexport default defineComponent({\n name: 'NeonToggle',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The name of the radio button group.\n */\n name: { type: String, required: true },\n /**\n * The key of the selected option.\n */\n modelValue: { type: String, required: true },\n /**\n * The list of options to present to the user.\n */\n model: { type: Array as () => Array<NeonToggleModel>, required: true },\n /**\n * The style of toggle to display to the user.\n */\n toggleStyle: { type: String as () => NeonToggleStyle, default: () => NeonToggleStyle.Toggle },\n /**\n * The size of the toggle.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Medium },\n /**\n * The orientation of the toggle if the style is a radio button group.\n */\n orientation: { type: String as () => NeonOrientation, default: () => NeonOrientation.Vertical },\n /**\n * The color of the toggle.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Neutral },\n /**\n * Whether the toggle is disabled.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the selected value changes.\n * @type {string} The key of the selected model item.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const emitInput = (key: string) => {\n emit('update:modelValue', key);\n };\n\n const onInput = (key: string) => {\n if (!props.disabled) {\n emitInput(key);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const selectOption = (option: NeonToggleModel) => {\n if (!props.disabled && !option.disabled) {\n emitInput(option.key);\n }\n };\n\n return {\n selectOption,\n onInput,\n sanitizedAttributes,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonToggleStyle","NeonSize","NeonOrientation","NeonFunctionalColor","props","emit","attrs","useAttrs","emitInput","key","onInput","sanitizedAttributes","computed","onClick","sanitized","option"],"mappings":";;;;;;AAWA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAIrC,YAAY,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAI3C,OAAO,EAAE,MAAM,OAAuC,UAAU,GAAK;AAAA;AAAA;AAAA;AAAA,IAIrE,aAAa,EAAE,MAAM,QAAiC,SAAS,MAAMC,EAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,IAI5F,MAAM,EAAE,MAAM,QAA0B,SAAS,MAAMC,EAAS,OAAO;AAAA;AAAA;AAAA;AAAA,IAIvE,aAAa,EAAE,MAAM,QAAiC,SAAS,MAAMC,EAAgB,SAAS;AAAA;AAAA;AAAA;AAAA,IAI9F,OAAO,EAAE,MAAM,QAAqC,SAAS,MAAMC,EAAoB,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI/F,UAAU,EAAE,MAAM,SAAS,SAAS,GAAM;AAAA,EAC5C;AAAA,EACA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA,EACF;AAAA,EACA,MAAMC,GAAO,EAAE,MAAAC,KAAQ;AACrB,UAAMC,IAAQC,KACRC,IAAY,CAACC,MAAgB;AACjC,MAAAJ,EAAK,qBAAqBI,CAAG;AAAA,IAAA,GAGzBC,IAAU,CAACD,MAAgB;AAC3B,MAACL,EAAM,YACTI,EAAUC,CAAG;AAAA,IACf,GAGIE,IAAsBC,EAAS,MAAM;AAEzC,YAAM,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAcR;AAC3B,aAAAQ;AAAA,IAAA,CACR;AAQM,WAAA;AAAA,MACL,cAPmB,CAACC,MAA4B;AAChD,QAAI,CAACX,EAAM,YAAY,CAACW,EAAO,YAC7BP,EAAUO,EAAO,GAAG;AAAA,MACtB;AAAA,MAKA,SAAAL;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./NeonToggleChip.cjs.js"),o=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),p=["aria-disabled","aria-pressed"],d={class:"neon-toggle-chip__label"},r=["checked","disabled"];function g(e,n,h,u,b,c){const l=o.resolveComponent("neon-icon");return o.openBlock(),o.createElementBlock("label",{"aria-disabled":e.disabled,"aria-pressed":e.modelValue,class:o.normalizeClass([[`neon-toggle-chip--${e.size}`,`neon-toggle-chip--${e.color}`,{"neon-toggle-chip--disabled":e.disabled,"neon-toggle-chip--checked":e.modelValue,"neon-toggle-chip--show-check":e.showCheck}],"neon-toggle-chip no-style"]),role:"button",tabindex:"0",onKeydown:[n[2]||(n[2]=o.withKeys((...i)=>e.toggleChip&&e.toggleChip(...i),["enter"])),n[3]||(n[3]=o.withKeys((...i)=>e.toggleChip&&e.toggleChip(...i),["space"]))],onKeypress:n[4]||(n[4]=o.withKeys(o.withModifiers(()=>{},["prevent"]),["space"]))},[e.modelValue&&e.showCheck?(o.openBlock(),o.createBlock(l,{key:0,disabled:e.disabled,class:"neon-toggle-chip__checked",name:"check"},null,8,["disabled"])):o.createCommentVNode("",!0),o.createElementVNode("span",d,o.toDisplayString(e.label),1),o.createElementVNode("input",o.mergeProps({checked:e.modelValue,disabled:e.disabled,class:"neon-toggle-chip__input",tabindex:"-1",type:"checkbox"},e.sanitizedAttributes,{onClick:n[0]||(n[0]=o.withModifiers((...i)=>e.toggleChip&&e.toggleChip(...i),["prevent","stop"])),onInput:n[1]||(n[1]=o.withModifiers((...i)=>e.toggleChip&&e.toggleChip(...i),["prevent","stop"]))}),null,16,r)],42,p)}const a=t(s,[["render",g]]);module.exports=a;
1
+ "use strict";const s=require("./NeonToggleChip.cjs.js"),o=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),d=["aria-disabled","aria-pressed"],p={class:"neon-toggle-chip__label"},r=["checked","disabled"];function g(e,n,h,u,b,c){const i=o.resolveComponent("neon-icon");return o.openBlock(),o.createElementBlock("label",{"aria-disabled":e.disabled,"aria-pressed":e.modelValue,class:o.normalizeClass([[`neon-toggle-chip--${e.size}`,`neon-toggle-chip--${e.color}`,{"neon-toggle-chip--disabled":e.disabled,"neon-toggle-chip--checked":e.modelValue,"neon-toggle-chip--show-check":e.showCheck}],"neon-toggle-chip no-style"]),role:"button",tabindex:"0",onKeydown:[n[2]||(n[2]=o.withKeys((...l)=>e.toggleChip&&e.toggleChip(...l),["enter"])),n[3]||(n[3]=o.withKeys((...l)=>e.toggleChip&&e.toggleChip(...l),["space"]))],onKeypress:n[4]||(n[4]=o.withKeys(o.withModifiers(()=>{},["prevent"]),["space"]))},[o.renderSlot(e.$slots,"default",{},()=>[e.modelValue&&e.showCheck?(o.openBlock(),o.createBlock(i,{key:0,disabled:e.disabled,class:"neon-toggle-chip__checked",name:"check"},null,8,["disabled"])):o.createCommentVNode("",!0),o.createElementVNode("span",p,o.toDisplayString(e.label),1)]),o.createElementVNode("input",o.mergeProps({checked:e.modelValue,disabled:e.disabled,class:"neon-toggle-chip__input",tabindex:"-1",type:"checkbox"},e.sanitizedAttributes,{onClick:n[0]||(n[0]=o.withModifiers((...l)=>e.toggleChip&&e.toggleChip(...l),["prevent","stop"])),onInput:n[1]||(n[1]=o.withModifiers((...l)=>e.toggleChip&&e.toggleChip(...l),["prevent","stop"]))}),null,16,r)],42,d)}const a=t(s,[["render",g]]);module.exports=a;
2
2
  //# sourceMappingURL=NeonToggleChip.vue.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggleChip.vue.cjs.js","sources":["../../../../src/components/user-input/toggle-chip/NeonToggleChip.vue"],"sourcesContent":["<template>\n <label\n :aria-disabled=\"disabled\"\n :aria-pressed=\"modelValue\"\n :class=\"[\n `neon-toggle-chip--${size}`,\n `neon-toggle-chip--${color}`,\n {\n 'neon-toggle-chip--disabled': disabled,\n 'neon-toggle-chip--checked': modelValue,\n 'neon-toggle-chip--show-check': showCheck,\n },\n ]\"\n class=\"neon-toggle-chip no-style\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.enter=\"toggleChip\"\n @keydown.space=\"toggleChip\"\n @keypress.space.prevent=\"\"\n >\n <neon-icon v-if=\"modelValue && showCheck\" :disabled=\"disabled\" class=\"neon-toggle-chip__checked\" name=\"check\" />\n <span class=\"neon-toggle-chip__label\">{{ label }}</span>\n <input\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n class=\"neon-toggle-chip__input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n v-bind=\"sanitizedAttributes\"\n @click.prevent.stop=\"toggleChip\"\n @input.prevent.stop=\"toggleChip\"\n />\n </label>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggleChip.ts\" />\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_ctx","_cache","args","_withKeys","_withModifiers","_createBlock","_component_neon_icon","_createCommentVNode","_createElementVNode","_hoisted_2","_toDisplayString","_mergeProps"],"mappings":"yQAgCUA,EAAA,iBAAA,WAAA,EA7BL,OAAAC,EAAc,UAAA,EAAUC,EAAA,mBAAA,QAAA,CACxB,gBAAKC,EAAA,4DAAkE,CAAK,8FAA8J,kDAS1M,+BAAAA,EAAA,SACjC,CACA,EAAA,2BAAY,CAAA,EACX,KAAO,6GAEPC,EAAA,CAAQ,0CAAiBD,EAAA,WAAA,GAAAE,CAAA,EAAA,CAAA,OAAA,CAAA,IAET,WAAAD,GAAc,IAASA,EAAA,CAAA,EAAAE,EAAA,SAAAC,EAAA,cAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA,gCAAGN,YAAkB,EAAAO,EAAA,YAAAC,EAAA,CAAE,IAAK,EAA6B,SAAYN,EAAA,uDACrD,EAAA,KAAA,EAAA,CAAA,UAAA,CAAxD,GACAO,0BASE,EARCC,EAAmB,mBAAA,OAAAC,EAAAC,EAAAA,gBAAAV,EAAA,KAAA,EAAA,CAAA,EACnBQ,EAAkB,mBAAA,QAAAG,aAAA,CACnB,QAA+BX,EAAA,WAC/B,SAASA,EAAI,SACb,MAAe,mCACY,KAC1B,KAAA,UACA,EAAAA,EAAA"}
1
+ {"version":3,"file":"NeonToggleChip.vue.cjs.js","sources":["../../../../src/components/user-input/toggle-chip/NeonToggleChip.vue"],"sourcesContent":["<template>\n <label\n :aria-disabled=\"disabled\"\n :aria-pressed=\"modelValue\"\n :class=\"[\n `neon-toggle-chip--${size}`,\n `neon-toggle-chip--${color}`,\n {\n 'neon-toggle-chip--disabled': disabled,\n 'neon-toggle-chip--checked': modelValue,\n 'neon-toggle-chip--show-check': showCheck,\n },\n ]\"\n class=\"neon-toggle-chip no-style\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.enter=\"toggleChip\"\n @keydown.space=\"toggleChip\"\n @keypress.space.prevent=\"\"\n >\n <!-- @slot override the default contents -->\n <slot>\n <neon-icon v-if=\"modelValue && showCheck\" :disabled=\"disabled\" class=\"neon-toggle-chip__checked\" name=\"check\" />\n <span class=\"neon-toggle-chip__label\">{{ label }}</span>\n </slot>\n <input\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n class=\"neon-toggle-chip__input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n v-bind=\"sanitizedAttributes\"\n @click.prevent.stop=\"toggleChip\"\n @input.prevent.stop=\"toggleChip\"\n />\n </label>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggleChip.ts\" />\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_ctx","_cache","args","_withModifiers","_createBlock","_component_neon_icon","_createElementVNode","_hoisted_2","_toDisplayString","_mergeProps"],"mappings":"yQAmCUA,EAAA,iBAAA,WAAA,EAhCL,OAAAC,EAAc,UAAA,EAAUC,EAAA,mBAAA,QAAA,CACxB,gBAAKC,EAAA,4DAAkE,CAAK,8FAA8J,kDAS1M,+BAAAA,EAAA,SACjC,CACA,EAAA,2BAAY,CAAA,EACX,KAAO,6GAEPC,EAAA,CAAQ,0CAAiBD,EAAA,WAAA,GAAAE,CAAA,EAAA,CAAA,OAAA,CAAA,IAG1B,WAGOD,cAAA,SAAAE,EAAA,cAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA,EAFY,EAAA,uBAA+F,UAAA,CAAA,EAAA,IAAA,4BAArEL,YAAkB,EAAAM,EAAA,YAAAC,EAAA,CAAE,IAAK,EAA6B,SAAYL,EAAA,uDACrD,EAAA,KAAA,EAAA,CAAA,UAAA,CAAxD,+BAEFM,4BASEC,EAAAC,EAAAA,gBAAAR,EAAA,KAAA,EAAA,CAAA,CARC,CAAA,EACAM,EAAkB,mBAAA,QAAAG,aAAA,CACnB,QAA+BT,EAAA,WAC/B,SAASA,EAAI,SACb,MAAe,mCACY,KAC1B,KAAA,UACA,EAAAA,EAAA"}
@@ -1,10 +1,10 @@
1
- import d from "./NeonToggleChip.es.js";
2
- import { resolveComponent as a, openBlock as s, createElementBlock as r, normalizeClass as g, withKeys as l, withModifiers as i, createBlock as h, createCommentVNode as m, createElementVNode as t, toDisplayString as b, mergeProps as u } from "vue";
3
- import C from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
- const k = ["aria-disabled", "aria-pressed"], c = { class: "neon-toggle-chip__label" }, f = ["checked", "disabled"];
5
- function y(e, o, w, V, $, v) {
6
- const p = a("neon-icon");
7
- return s(), r("label", {
1
+ import p from "./NeonToggleChip.es.js";
2
+ import { resolveComponent as r, openBlock as i, createElementBlock as a, normalizeClass as g, withKeys as l, withModifiers as s, renderSlot as h, createBlock as m, createCommentVNode as b, createElementVNode as t, toDisplayString as u, mergeProps as C } from "vue";
3
+ import k from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
+ const c = ["aria-disabled", "aria-pressed"], f = { class: "neon-toggle-chip__label" }, y = ["checked", "disabled"];
5
+ function $(e, o, w, V, v, z) {
6
+ const d = r("neon-icon");
7
+ return i(), a("label", {
8
8
  "aria-disabled": e.disabled,
9
9
  "aria-pressed": e.modelValue,
10
10
  class: g([[
@@ -22,30 +22,32 @@ function y(e, o, w, V, $, v) {
22
22
  o[2] || (o[2] = l((...n) => e.toggleChip && e.toggleChip(...n), ["enter"])),
23
23
  o[3] || (o[3] = l((...n) => e.toggleChip && e.toggleChip(...n), ["space"]))
24
24
  ],
25
- onKeypress: o[4] || (o[4] = l(i(() => {
25
+ onKeypress: o[4] || (o[4] = l(s(() => {
26
26
  }, ["prevent"]), ["space"]))
27
27
  }, [
28
- e.modelValue && e.showCheck ? (s(), h(p, {
29
- key: 0,
30
- disabled: e.disabled,
31
- class: "neon-toggle-chip__checked",
32
- name: "check"
33
- }, null, 8, ["disabled"])) : m("", !0),
34
- t("span", c, b(e.label), 1),
35
- t("input", u({
28
+ h(e.$slots, "default", {}, () => [
29
+ e.modelValue && e.showCheck ? (i(), m(d, {
30
+ key: 0,
31
+ disabled: e.disabled,
32
+ class: "neon-toggle-chip__checked",
33
+ name: "check"
34
+ }, null, 8, ["disabled"])) : b("", !0),
35
+ t("span", f, u(e.label), 1)
36
+ ]),
37
+ t("input", C({
36
38
  checked: e.modelValue,
37
39
  disabled: e.disabled,
38
40
  class: "neon-toggle-chip__input",
39
41
  tabindex: "-1",
40
42
  type: "checkbox"
41
43
  }, e.sanitizedAttributes, {
42
- onClick: o[0] || (o[0] = i((...n) => e.toggleChip && e.toggleChip(...n), ["prevent", "stop"])),
43
- onInput: o[1] || (o[1] = i((...n) => e.toggleChip && e.toggleChip(...n), ["prevent", "stop"]))
44
- }), null, 16, f)
45
- ], 42, k);
44
+ onClick: o[0] || (o[0] = s((...n) => e.toggleChip && e.toggleChip(...n), ["prevent", "stop"])),
45
+ onInput: o[1] || (o[1] = s((...n) => e.toggleChip && e.toggleChip(...n), ["prevent", "stop"]))
46
+ }), null, 16, y)
47
+ ], 42, c);
46
48
  }
47
- const N = /* @__PURE__ */ C(d, [["render", y]]);
49
+ const E = /* @__PURE__ */ k(p, [["render", $]]);
48
50
  export {
49
- N as default
51
+ E as default
50
52
  };
51
53
  //# sourceMappingURL=NeonToggleChip.vue.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggleChip.vue.es.js","sources":["../../../../src/components/user-input/toggle-chip/NeonToggleChip.vue"],"sourcesContent":["<template>\n <label\n :aria-disabled=\"disabled\"\n :aria-pressed=\"modelValue\"\n :class=\"[\n `neon-toggle-chip--${size}`,\n `neon-toggle-chip--${color}`,\n {\n 'neon-toggle-chip--disabled': disabled,\n 'neon-toggle-chip--checked': modelValue,\n 'neon-toggle-chip--show-check': showCheck,\n },\n ]\"\n class=\"neon-toggle-chip no-style\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.enter=\"toggleChip\"\n @keydown.space=\"toggleChip\"\n @keypress.space.prevent=\"\"\n >\n <neon-icon v-if=\"modelValue && showCheck\" :disabled=\"disabled\" class=\"neon-toggle-chip__checked\" name=\"check\" />\n <span class=\"neon-toggle-chip__label\">{{ label }}</span>\n <input\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n class=\"neon-toggle-chip__input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n v-bind=\"sanitizedAttributes\"\n @click.prevent.stop=\"toggleChip\"\n @input.prevent.stop=\"toggleChip\"\n />\n </label>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggleChip.ts\" />\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_ctx","_cache","args","_withKeys","_withModifiers","_createBlock","_component_neon_icon","_createCommentVNode","_createElementVNode","_hoisted_2","_toDisplayString","_mergeProps"],"mappings":";;;;;YAgCUA,EAAA,WAAA;AA7BL,SAAAC,EAAc,GAAUC,EAAA,SAAA;AAAA,IACxB,iBAAKC,EAAA;AAAA;aAAkE,CAAK;AAAA;;;wCAA8J;AAAA;QAS1M,gCAAAA,EAAA;AAAA,MACjC;AAAA,IACA,GAAA,2BAAY,CAAA;AAAA,IACX,MAAO;AAAA;;;MAEPC,EAAA,CAAQ,yCAAiBD,EAAA,WAAA,GAAAE,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;IAET,YAAAD,GAAc,MAASA,EAAA,CAAA,IAAAE,EAAAC,EAAA,MAAA;AAAA,IAAA,GAAA,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;mCAAGN,EAAkB,GAAAO,EAAAC,GAAA;AAAA,MAAE,KAAK;AAAA,MAA6B,UAAYN,EAAA;AAAA;;IACrD,GAAA,MAAA,GAAA,CAAA,UAAA,CAAxD,KACAO,QASE;AAAA,IARCC,EAAmB,QAAAC,GAAAC,EAAAV,EAAA,KAAA,GAAA,CAAA;AAAA,IACnBQ,EAAkB,SAAAG,EAAA;AAAA,MACnB,SAA+BX,EAAA;AAAA,MAC/B,UAASA,EAAI;AAAA,MACb,OAAe;AAAA,gBACY;AAAA,MAC1B,MAAA;AAAA,IACA,GAAAA,EAAA;;;;;;;"}
1
+ {"version":3,"file":"NeonToggleChip.vue.es.js","sources":["../../../../src/components/user-input/toggle-chip/NeonToggleChip.vue"],"sourcesContent":["<template>\n <label\n :aria-disabled=\"disabled\"\n :aria-pressed=\"modelValue\"\n :class=\"[\n `neon-toggle-chip--${size}`,\n `neon-toggle-chip--${color}`,\n {\n 'neon-toggle-chip--disabled': disabled,\n 'neon-toggle-chip--checked': modelValue,\n 'neon-toggle-chip--show-check': showCheck,\n },\n ]\"\n class=\"neon-toggle-chip no-style\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.enter=\"toggleChip\"\n @keydown.space=\"toggleChip\"\n @keypress.space.prevent=\"\"\n >\n <!-- @slot override the default contents -->\n <slot>\n <neon-icon v-if=\"modelValue && showCheck\" :disabled=\"disabled\" class=\"neon-toggle-chip__checked\" name=\"check\" />\n <span class=\"neon-toggle-chip__label\">{{ label }}</span>\n </slot>\n <input\n :checked=\"modelValue\"\n :disabled=\"disabled\"\n class=\"neon-toggle-chip__input\"\n tabindex=\"-1\"\n type=\"checkbox\"\n v-bind=\"sanitizedAttributes\"\n @click.prevent.stop=\"toggleChip\"\n @input.prevent.stop=\"toggleChip\"\n />\n </label>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggleChip.ts\" />\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_ctx","_cache","args","_withModifiers","_createBlock","_component_neon_icon","_createElementVNode","_hoisted_2","_toDisplayString","_mergeProps"],"mappings":";;;;;YAmCUA,EAAA,WAAA;AAhCL,SAAAC,EAAc,GAAUC,EAAA,SAAA;AAAA,IACxB,iBAAKC,EAAA;AAAA;aAAkE,CAAK;AAAA;;;wCAA8J;AAAA;QAS1M,gCAAAA,EAAA;AAAA,MACjC;AAAA,IACA,GAAA,2BAAY,CAAA;AAAA,IACX,MAAO;AAAA;;;MAEPC,EAAA,CAAQ,yCAAiBD,EAAA,WAAA,GAAAE,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;IAG1B,YAGOD,kBAAAE,EAAA,MAAA;AAAA,IAAA,GAAA,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA,EAFY,GAAA;AAAA,gBAA+F,WAAA,CAAA,GAAA,MAAA;AAAA,qCAArEL,EAAkB,GAAAM,EAAAC,GAAA;AAAA,QAAE,KAAK;AAAA,QAA6B,UAAYL,EAAA;AAAA;;MACrD,GAAA,MAAA,GAAA,CAAA,UAAA,CAAxD;MAEFM,UASEC,GAAAC,EAAAR,EAAA,KAAA,GAAA,CAAA;AAAA,IARC,CAAA;AAAA,IACAM,EAAkB,SAAAG,EAAA;AAAA,MACnB,SAA+BT,EAAA;AAAA,MAC/B,UAASA,EAAI;AAAA,MACb,OAAe;AAAA,gBACY;AAAA,MAC1B,MAAA;AAAA,IACA,GAAAA,EAAA;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aotearoan/neon",
3
3
  "description": "Neon is a lightweight design library of Vue 3 components with minimal dependencies.",
4
- "version": "11.0.5",
4
+ "version": "11.0.6",
5
5
  "main": "./dist/neon.cjs.js",
6
6
  "module": "./dist/neon.es.js",
7
7
  "types": "./dist/src/neon.d.ts",