@aotearoan/neon 28.0.0 → 28.0.1

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,2 +1,2 @@
1
- "use strict";const t=require("./NeonToggle.cjs.js"),e=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r=["aria-checked","aria-disabled","tabindex","onKeydown"],i=["checked","disabled","name","value","onClick"],c={key:0,class:"neon-toggle__radio-button"},g={key:0,class:"neon-toggle__radio-button-indicator"},b={key:1};function u(l,m,y,_,h,p){const a=e.resolveComponent("neon-icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[`neon-toggle--${l.toggleStyle}`,`neon-toggle--${l.disabled?"low-contrast":l.color}`,`neon-toggle--${l.orientation}`,`neon-toggle--${l.size}`,{"neon-toggle--disabled":l.disabled}],"neon-toggle"]),role:"radiogroup"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.model,(n,d)=>(e.openBlock(),e.createElementBlock("label",{key:n.key,"aria-checked":n.key===l.modelValue,"aria-disabled":l.disabled||n.disabled,class:e.normalizeClass([{"neon-toggle__label--disabled":l.disabled||n.disabled,"neon-toggle__label--checked":n.key===l.modelValue,"neon-toggle__label--with-icon":n.icon,"neon-toggle__label--with-slot-override":l.slots.option,"neon-toggle__label--with-text":n.label},"neon-toggle__label no-style"]),tabindex:!l.disabled&&!n.disabled?0:void 0,role:"radio",onKeydown:[e.withKeys(o=>l.selectOption(n),["enter"]),e.withKeys(e.withModifiers(o=>l.selectOption(n),["prevent"]),["space"])]},[e.createElementVNode("input",e.mergeProps({checked:n.key===l.modelValue,disabled:l.disabled||n.disabled,name:l.name,tabindex:-1,value:n.key,class:"neon-toggle__input",type:"radio"},{ref_for:!0},l.sanitizedAttributes,{onClick:o=>l.onInput(n)}),null,16,i),l.toggleStyle!==l.NeonToggleStyle.Toggle?(e.openBlock(),e.createElementBlock("div",c,[n.key===l.modelValue?(e.openBlock(),e.createElementBlock("div",g)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"option",{index:d,option:n},()=>[n.icon?(e.openBlock(),e.createBlock(a,{key:0,disabled:l.disabled||n.disabled,name:n.icon},null,8,["disabled","name"])):e.createCommentVNode("",!0),n.label?(e.openBlock(),e.createElementBlock("span",b,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0)])],42,r))),128))],2)}const k=s(t,[["render",u]]);module.exports=k;
1
+ "use strict";const d=require("./NeonToggle.cjs.js"),e=require("vue"),s=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r=["aria-checked","aria-disabled","tabindex","onKeydown"],i=["checked","disabled","name","value","onClick"],c={key:0,class:"neon-toggle__radio-button"},g={key:0,class:"neon-toggle__radio-button-indicator"},u={key:1},m={key:0,class:"neon-toggle__additional-content"};function k(l,y,_,h,p,B){const a=e.resolveComponent("neon-icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[`neon-toggle--${l.toggleStyle}`,`neon-toggle--${l.disabled?"low-contrast":l.color}`,`neon-toggle--${l.orientation}`,`neon-toggle--${l.size}`,{"neon-toggle--disabled":l.disabled}],"neon-toggle"]),role:"radiogroup"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.model,(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o.key},[e.createElementVNode("label",{"aria-checked":o.key===l.modelValue,"aria-disabled":l.disabled||o.disabled,class:e.normalizeClass([{"neon-toggle__label--disabled":l.disabled||o.disabled,"neon-toggle__label--checked":o.key===l.modelValue,"neon-toggle__label--with-icon":o.icon,"neon-toggle__label--with-slot-override":l.slots.option},"neon-toggle__label no-style"]),tabindex:!l.disabled&&!o.disabled?0:void 0,role:"radio",onKeydown:[e.withKeys(t=>l.selectOption(o),["enter"]),e.withKeys(e.withModifiers(t=>l.selectOption(o),["prevent"]),["space"])]},[e.createElementVNode("input",e.mergeProps({checked:o.key===l.modelValue,disabled:l.disabled||o.disabled,name:l.name,tabindex:-1,value:o.key,class:"neon-toggle__input",type:"radio"},{ref_for:!0},l.sanitizedAttributes,{onClick:t=>l.onInput(o)}),null,16,i),l.toggleStyle!==l.NeonToggleStyle.Toggle?(e.openBlock(),e.createElementBlock("div",c,[o.key===l.modelValue?(e.openBlock(),e.createElementBlock("div",g)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"option",{index:n,option:o},()=>[o.icon?(e.openBlock(),e.createBlock(a,{key:0,disabled:l.disabled||o.disabled,name:o.icon},null,8,["disabled","name"])):e.createCommentVNode("",!0),o.label?(e.openBlock(),e.createElementBlock("span",u,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0)])],42,r),l.slots.additionalContent?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(l.$slots,"additionalContent",e.mergeProps({ref_for:!0},{option:o,index:n}))])):e.createCommentVNode("",!0)],64))),128))],2)}const b=s(d,[["render",k]]);module.exports=b;
2
2
  //# sourceMappingURL=NeonToggle.vue.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggle.vue.cjs.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n `neon-toggle--${toggleStyle}`,\n `neon-toggle--${disabled ? 'low-contrast' : color}`,\n `neon-toggle--${orientation}`,\n `neon-toggle--${size}`,\n { 'neon-toggle--disabled': disabled },\n ]\"\n class=\"neon-toggle\"\n role=\"radiogroup\"\n >\n <label\n v-for=\"(option, index) in model\"\n :key=\"option.key\"\n :aria-checked=\"option.key === modelValue\"\n :aria-disabled=\"disabled || option.disabled\"\n :class=\"{\n 'neon-toggle__label--disabled': disabled || option.disabled,\n 'neon-toggle__label--checked': option.key === modelValue,\n 'neon-toggle__label--with-icon': option.icon,\n 'neon-toggle__label--with-slot-override': slots.option,\n 'neon-toggle__label--with-text': option.label,\n }\"\n :tabindex=\"!disabled && !option.disabled ? 0 : undefined\"\n class=\"neon-toggle__label no-style\"\n role=\"radio\"\n @keydown.enter=\"selectOption(option)\"\n @keydown.space.prevent=\"selectOption(option)\"\n >\n <input\n :checked=\"option.key === modelValue\"\n :disabled=\"disabled || option.disabled\"\n :name=\"name\"\n :tabindex=\"-1\"\n :value=\"option.key\"\n class=\"neon-toggle__input\"\n type=\"radio\"\n v-bind=\"sanitizedAttributes\"\n @click=\"onInput(option)\"\n />\n <div v-if=\"toggleStyle !== NeonToggleStyle.Toggle\" class=\"neon-toggle__radio-button\">\n <div v-if=\"option.key === modelValue\" class=\"neon-toggle__radio-button-indicator\"></div>\n </div>\n <!-- @slot This slot is for overriding the option rendering, it is passed two arguments, <em>option</em> - the option model & <em>index</em> -->\n <slot :index=\"index\" :option=\"option\" name=\"option\">\n <neon-icon v-if=\"option.icon\" :disabled=\"disabled || option.disabled\" :name=\"option.icon\" />\n <span v-if=\"option.label\">{{ option.label }}</span>\n </slot>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggle.ts\" />\n"],"names":["_createElementBlock","_normalizeClass","_ctx","_openBlock","_Fragment","_renderList","option","index","_withKeys","$event","_withModifiers","_createElementVNode","_mergeProps","_hoisted_3","_hoisted_4","_renderSlot","_createBlock","_component_neon_icon","_hoisted_5","_toDisplayString"],"mappings":"0PAyCyD,MAAM,sCACjB,MAAM,sIAzClDA,EAAAA,mBAiDM,MAAA,CAhDH,MAAKC,EAAAA,eAAA,CAAA,iBAA0BC,EAAA,WAAW,GAA0B,gBAAAA,EAAA,wBAA4BA,EAAA,KAAK,mBAA0BA,EAAA,WAAW,mBAA0BA,EAAA,IAAI,4BAAqCA,EAAA,QAAQ,GAOhN,aAAa,CAAA,EACnB,KAAK,gBAELC,EAAAA,UAAA,EAAA,EAAAH,EAAAA,mBAqCQI,WAAA,KAAAC,EAAAA,WApCoBH,EAAA,MAAK,CAAvBI,EAAQC,mBADlBP,EAAAA,mBAqCQ,QAAA,CAnCL,IAAKM,EAAO,IACZ,eAAcA,EAAO,MAAQJ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"sourcesContent":["<template>\n <div\n :class=\"[\n `neon-toggle--${toggleStyle}`,\n `neon-toggle--${disabled ? 'low-contrast' : color}`,\n `neon-toggle--${orientation}`,\n `neon-toggle--${size}`,\n { 'neon-toggle--disabled': disabled },\n ]\"\n class=\"neon-toggle\"\n role=\"radiogroup\"\n >\n <template v-for=\"(option, index) in model\" :key=\"option.key\">\n <label\n :aria-checked=\"option.key === modelValue\"\n :aria-disabled=\"disabled || option.disabled\"\n :class=\"{\n 'neon-toggle__label--disabled': disabled || option.disabled,\n 'neon-toggle__label--checked': option.key === modelValue,\n 'neon-toggle__label--with-icon': option.icon,\n 'neon-toggle__label--with-slot-override': slots.option,\n }\"\n :tabindex=\"!disabled && !option.disabled ? 0 : undefined\"\n class=\"neon-toggle__label no-style\"\n role=\"radio\"\n @keydown.enter=\"selectOption(option)\"\n @keydown.space.prevent=\"selectOption(option)\"\n >\n <input\n :checked=\"option.key === modelValue\"\n :disabled=\"disabled || option.disabled\"\n :name=\"name\"\n :tabindex=\"-1\"\n :value=\"option.key\"\n class=\"neon-toggle__input\"\n type=\"radio\"\n v-bind=\"sanitizedAttributes\"\n @click=\"onInput(option)\"\n />\n <div v-if=\"toggleStyle !== NeonToggleStyle.Toggle\" class=\"neon-toggle__radio-button\">\n <div v-if=\"option.key === modelValue\" class=\"neon-toggle__radio-button-indicator\"></div>\n </div>\n <!-- @slot This slot is for overriding the option rendering, it is passed two arguments:\n @binding {NeonToggleModel} option - the option for which to render additional content.\n @binding {number} index - the index of the option in the list. -->\n <slot :index=\"index\" :option=\"option\" name=\"option\">\n <neon-icon v-if=\"option.icon\" :disabled=\"disabled || option.disabled\" :name=\"option.icon\" />\n <span v-if=\"option.label\">{{ option.label }}</span>\n </slot>\n </label>\n <!-- @slot slot for rendering additional option content:\n @binding {NeonToggleModel} option - the option for which to render additional content.\n @binding {number} index - the index of the option in the list. -->\n <div v-if=\"slots.additionalContent\" class=\"neon-toggle__additional-content\">\n <slot name=\"additionalContent\" v-bind=\"{ option, index }\"></slot>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggle.ts\" />\n"],"names":["_createElementBlock","_normalizeClass","_ctx","_openBlock","_Fragment","_renderList","option","index","_createElementVNode","_withKeys","$event","_withModifiers","_mergeProps","_hoisted_3","_hoisted_4","_renderSlot","_createBlock","_component_neon_icon","_hoisted_5","_toDisplayString","_hoisted_6"],"mappings":"0PAuC2D,MAAM,sCACjB,MAAM,0DAaZ,MAAM,wHApD9CA,EAAAA,mBAwDM,MAAA,CAvDH,MAAKC,EAAAA,eAAA,CAAA,iBAA0BC,EAAA,WAAW,GAA0B,gBAAAA,EAAA,wBAA4BA,EAAA,KAAK,mBAA0BA,EAAA,WAAW,mBAA0BA,EAAA,IAAI,4BAAqCA,EAAA,QAAQ,GAOhN,aAAa,CAAA,EACnB,KAAK,gBAELC,EAAAA,UAAA,EAAA,EAAAH,EAAAA,mBA4CWI,WAAA,KAAAC,EAAAA,WA5CyBH,EAAA,MAAK,CAAvBI,EAAQC,oDAAuB,IAAAD,EAAO,MACtDE,EAAAA,mBAoCQ,QAAA,CAnCL,eAAcF,EAAO,MAAQJ,EAAA,WAC7B,gBAAeA,EAAA,UAAYI,EAAO,SAClC,MAAKL,EAAAA,eAAA,CAAA,gCAA8CC,EAAA,UAAYI,EAAO,uCAAmDA,EAAO,MAAQJ,EAAA,WAAuD,gCAAAI,EAAO,KAA0D,yCAAAJ,EAAA,MAAM,QAOjQ,6BAA6B,CAAA,EADlC,UAAWA,EAAA,UAAQ,CAAKI,EAAO,WAAe,OAE/C,KAAK,QACJ,UAAO,CAAQG,EAAAA,SAAAC,GAAAR,EAAA,aAAaI,CAAM,EAAA,CAAA,OAAA,CAAA,EACXG,EAAAA,SAAAE,EAAAA,cAAAD,GAAAR,EAAA,aAAaI,CAAM,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,OAAA,CAAA,KAE3CE,EAAAA,mBAUE,QAVFI,aAUE,CATC,QAASN,EAAO,MAAQJ,EAAA,WACxB,SAAUA,EAAA,UAAYI,EAAO,SAC7B,KAAMJ,EAAA,KACN,SAAU,GACV,MAAOI,EAAO,IACf,MAAM,qBACN,KAAK,sBACGJ,EAAA,oBAAmB,CAC1B,QAAKQ,GAAER,EAAA,QAAQI,CAAM,eAEbJ,EAAA,cAAgBA,EAAA,gBAAgB,QAA3CC,EAAAA,YAAAH,EAAAA,mBAEM,MAFNa,EAEM,CADOP,EAAO,MAAQJ,EAAA,YAA1BC,EAAAA,YAAAH,EAAAA,mBAAwF,MAAxFc,CAAwF,8DAK1FC,aAGOb,EAAA,OAAA,SAAA,CAHA,MAAOK,EAAQ,OAAQD,GAA9B,IAGO,CAFYA,EAAO,oBAAxBU,EAAAA,YAA4FC,EAAA,OAA7D,SAAUf,EAAA,UAAYI,EAAO,SAAW,KAAMA,EAAO,+DACxEA,EAAO,qBAAnBN,EAAAA,mBAAmD,OAAAkB,EAAAC,EAAAA,gBAAtBb,EAAO,KAAK,EAAA,CAAA,wCAMlCJ,EAAA,MAAM,mBAAjBC,EAAAA,YAAAH,EAAAA,mBAEM,MAFNoB,EAEM,CADJL,EAAAA,WAAiEb,EAAA,OAAA,oBAAjEU,EAAAA,WAAiE,CAAA,QAAA,EAAA,EAAA,CAAxB,OAAAN,EAAQ,MAAAC,CAAK,CAAA,CAAA"}
@@ -1,17 +1,20 @@
1
- import g from "./NeonToggle.es.js";
2
- import { resolveComponent as b, openBlock as n, createElementBlock as o, normalizeClass as s, Fragment as u, renderList as c, withKeys as i, withModifiers as m, createElementVNode as k, mergeProps as y, createCommentVNode as d, renderSlot as h, createBlock as _, toDisplayString as f } from "vue";
1
+ import m from "./NeonToggle.es.js";
2
+ import { resolveComponent as k, openBlock as n, createElementBlock as o, normalizeClass as t, Fragment as i, renderList as y, createElementVNode as r, withKeys as g, withModifiers as h, mergeProps as b, createCommentVNode as d, renderSlot as u, createBlock as _, toDisplayString as f } from "vue";
3
3
  import $ from "../../../_virtual/_plugin-vue_export-helper.es.js";
4
- const v = ["aria-checked", "aria-disabled", "tabindex", "onKeydown"], w = ["checked", "disabled", "name", "value", "onClick"], p = {
4
+ const v = ["aria-checked", "aria-disabled", "tabindex", "onKeydown"], p = ["checked", "disabled", "name", "value", "onClick"], w = {
5
5
  key: 0,
6
6
  class: "neon-toggle__radio-button"
7
- }, V = {
7
+ }, C = {
8
8
  key: 0,
9
9
  class: "neon-toggle__radio-button-indicator"
10
- }, C = { key: 1 };
11
- function S(e, N, z, B, K, T) {
12
- const t = b("neon-icon");
10
+ }, V = { key: 1 }, S = {
11
+ key: 0,
12
+ class: "neon-toggle__additional-content"
13
+ };
14
+ function N(e, z, B, K, T, E) {
15
+ const c = k("neon-icon");
13
16
  return n(), o("div", {
14
- class: s([[
17
+ class: t([[
15
18
  `neon-toggle--${e.toggleStyle}`,
16
19
  `neon-toggle--${e.disabled ? "low-contrast" : e.color}`,
17
20
  `neon-toggle--${e.orientation}`,
@@ -20,54 +23,59 @@ function S(e, N, z, B, K, T) {
20
23
  ], "neon-toggle"]),
21
24
  role: "radiogroup"
22
25
  }, [
23
- (n(!0), o(u, null, c(e.model, (l, r) => (n(), o("label", {
24
- key: l.key,
25
- "aria-checked": l.key === e.modelValue,
26
- "aria-disabled": e.disabled || l.disabled,
27
- class: s([{
28
- "neon-toggle__label--disabled": e.disabled || l.disabled,
29
- "neon-toggle__label--checked": l.key === e.modelValue,
30
- "neon-toggle__label--with-icon": l.icon,
31
- "neon-toggle__label--with-slot-override": e.slots.option,
32
- "neon-toggle__label--with-text": l.label
33
- }, "neon-toggle__label no-style"]),
34
- tabindex: !e.disabled && !l.disabled ? 0 : void 0,
35
- role: "radio",
36
- onKeydown: [
37
- i((a) => e.selectOption(l), ["enter"]),
38
- i(m((a) => e.selectOption(l), ["prevent"]), ["space"])
39
- ]
26
+ (n(!0), o(i, null, y(e.model, (l, a) => (n(), o(i, {
27
+ key: l.key
40
28
  }, [
41
- k("input", y({
42
- checked: l.key === e.modelValue,
43
- disabled: e.disabled || l.disabled,
44
- name: e.name,
45
- tabindex: -1,
46
- value: l.key,
47
- class: "neon-toggle__input",
48
- type: "radio"
49
- }, { ref_for: !0 }, e.sanitizedAttributes, {
50
- onClick: (a) => e.onInput(l)
51
- }), null, 16, w),
52
- e.toggleStyle !== e.NeonToggleStyle.Toggle ? (n(), o("div", p, [
53
- l.key === e.modelValue ? (n(), o("div", V)) : d("", !0)
54
- ])) : d("", !0),
55
- h(e.$slots, "option", {
56
- index: r,
57
- option: l
58
- }, () => [
59
- l.icon ? (n(), _(t, {
60
- key: 0,
29
+ r("label", {
30
+ "aria-checked": l.key === e.modelValue,
31
+ "aria-disabled": e.disabled || l.disabled,
32
+ class: t([{
33
+ "neon-toggle__label--disabled": e.disabled || l.disabled,
34
+ "neon-toggle__label--checked": l.key === e.modelValue,
35
+ "neon-toggle__label--with-icon": l.icon,
36
+ "neon-toggle__label--with-slot-override": e.slots.option
37
+ }, "neon-toggle__label no-style"]),
38
+ tabindex: !e.disabled && !l.disabled ? 0 : void 0,
39
+ role: "radio",
40
+ onKeydown: [
41
+ g((s) => e.selectOption(l), ["enter"]),
42
+ g(h((s) => e.selectOption(l), ["prevent"]), ["space"])
43
+ ]
44
+ }, [
45
+ r("input", b({
46
+ checked: l.key === e.modelValue,
61
47
  disabled: e.disabled || l.disabled,
62
- name: l.icon
63
- }, null, 8, ["disabled", "name"])) : d("", !0),
64
- l.label ? (n(), o("span", C, f(l.label), 1)) : d("", !0)
65
- ])
66
- ], 42, v))), 128))
48
+ name: e.name,
49
+ tabindex: -1,
50
+ value: l.key,
51
+ class: "neon-toggle__input",
52
+ type: "radio"
53
+ }, { ref_for: !0 }, e.sanitizedAttributes, {
54
+ onClick: (s) => e.onInput(l)
55
+ }), null, 16, p),
56
+ e.toggleStyle !== e.NeonToggleStyle.Toggle ? (n(), o("div", w, [
57
+ l.key === e.modelValue ? (n(), o("div", C)) : d("", !0)
58
+ ])) : d("", !0),
59
+ u(e.$slots, "option", {
60
+ index: a,
61
+ option: l
62
+ }, () => [
63
+ l.icon ? (n(), _(c, {
64
+ key: 0,
65
+ disabled: e.disabled || l.disabled,
66
+ name: l.icon
67
+ }, null, 8, ["disabled", "name"])) : d("", !0),
68
+ l.label ? (n(), o("span", V, f(l.label), 1)) : d("", !0)
69
+ ])
70
+ ], 42, v),
71
+ e.slots.additionalContent ? (n(), o("div", S, [
72
+ u(e.$slots, "additionalContent", b({ ref_for: !0 }, { option: l, index: a }))
73
+ ])) : d("", !0)
74
+ ], 64))), 128))
67
75
  ], 2);
68
76
  }
69
- const D = /* @__PURE__ */ $(g, [["render", S]]);
77
+ const F = /* @__PURE__ */ $(m, [["render", N]]);
70
78
  export {
71
- D as default
79
+ F as default
72
80
  };
73
81
  //# sourceMappingURL=NeonToggle.vue.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NeonToggle.vue.es.js","sources":["../../../../src/components/user-input/toggle/NeonToggle.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n `neon-toggle--${toggleStyle}`,\n `neon-toggle--${disabled ? 'low-contrast' : color}`,\n `neon-toggle--${orientation}`,\n `neon-toggle--${size}`,\n { 'neon-toggle--disabled': disabled },\n ]\"\n class=\"neon-toggle\"\n role=\"radiogroup\"\n >\n <label\n v-for=\"(option, index) in model\"\n :key=\"option.key\"\n :aria-checked=\"option.key === modelValue\"\n :aria-disabled=\"disabled || option.disabled\"\n :class=\"{\n 'neon-toggle__label--disabled': disabled || option.disabled,\n 'neon-toggle__label--checked': option.key === modelValue,\n 'neon-toggle__label--with-icon': option.icon,\n 'neon-toggle__label--with-slot-override': slots.option,\n 'neon-toggle__label--with-text': option.label,\n }\"\n :tabindex=\"!disabled && !option.disabled ? 0 : undefined\"\n class=\"neon-toggle__label no-style\"\n role=\"radio\"\n @keydown.enter=\"selectOption(option)\"\n @keydown.space.prevent=\"selectOption(option)\"\n >\n <input\n :checked=\"option.key === modelValue\"\n :disabled=\"disabled || option.disabled\"\n :name=\"name\"\n :tabindex=\"-1\"\n :value=\"option.key\"\n class=\"neon-toggle__input\"\n type=\"radio\"\n v-bind=\"sanitizedAttributes\"\n @click=\"onInput(option)\"\n />\n <div v-if=\"toggleStyle !== NeonToggleStyle.Toggle\" class=\"neon-toggle__radio-button\">\n <div v-if=\"option.key === modelValue\" class=\"neon-toggle__radio-button-indicator\"></div>\n </div>\n <!-- @slot This slot is for overriding the option rendering, it is passed two arguments, <em>option</em> - the option model & <em>index</em> -->\n <slot :index=\"index\" :option=\"option\" name=\"option\">\n <neon-icon v-if=\"option.icon\" :disabled=\"disabled || option.disabled\" :name=\"option.icon\" />\n <span v-if=\"option.label\">{{ option.label }}</span>\n </slot>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggle.ts\" />\n"],"names":["_createElementBlock","_normalizeClass","_ctx","_openBlock","_Fragment","_renderList","option","index","_withKeys","$event","_withModifiers","_createElementVNode","_mergeProps","_hoisted_3","_hoisted_4","_renderSlot","_createBlock","_component_neon_icon","_hoisted_5","_toDisplayString"],"mappings":";;;;;EAyCyD,OAAM;;;EACjB,OAAM;;;;cAzClDA,EAiDM,OAAA;AAAA,IAhDH,OAAKC,EAAA,CAAA;AAAA,sBAA0BC,EAAA,WAAW;AAAA,MAA0B,gBAAAA,EAAA,4BAA4BA,EAAA,KAAK;AAAA,sBAA0BA,EAAA,WAAW;AAAA,sBAA0BA,EAAA,IAAI;AAAA,iCAAqCA,EAAA,SAAQ;AAAA,OAOhN,aAAa,CAAA;AAAA,IACnB,MAAK;AAAA;KAELC,EAAA,EAAA,GAAAH,EAqCQI,GAAA,MAAAC,EApCoBH,EAAA,OAAK,CAAvBI,GAAQC,YADlBP,EAqCQ,SAAA;AAAA,MAnCL,KAAKM,EAAO;AAAA,MACZ,gBAAcA,EAAO,QAAQJ,EAAA;AAAA,MAC7B,iBAAeA,EAAA,YAAYI,EAAO;AAAA,MAClC,OAAKL,EAAA,CAAA;AAAA,wCAA4CC,EAAA,YAAYI,EAAO;AAAA,uCAAiDA,EAA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>\n <div\n :class=\"[\n `neon-toggle--${toggleStyle}`,\n `neon-toggle--${disabled ? 'low-contrast' : color}`,\n `neon-toggle--${orientation}`,\n `neon-toggle--${size}`,\n { 'neon-toggle--disabled': disabled },\n ]\"\n class=\"neon-toggle\"\n role=\"radiogroup\"\n >\n <template v-for=\"(option, index) in model\" :key=\"option.key\">\n <label\n :aria-checked=\"option.key === modelValue\"\n :aria-disabled=\"disabled || option.disabled\"\n :class=\"{\n 'neon-toggle__label--disabled': disabled || option.disabled,\n 'neon-toggle__label--checked': option.key === modelValue,\n 'neon-toggle__label--with-icon': option.icon,\n 'neon-toggle__label--with-slot-override': slots.option,\n }\"\n :tabindex=\"!disabled && !option.disabled ? 0 : undefined\"\n class=\"neon-toggle__label no-style\"\n role=\"radio\"\n @keydown.enter=\"selectOption(option)\"\n @keydown.space.prevent=\"selectOption(option)\"\n >\n <input\n :checked=\"option.key === modelValue\"\n :disabled=\"disabled || option.disabled\"\n :name=\"name\"\n :tabindex=\"-1\"\n :value=\"option.key\"\n class=\"neon-toggle__input\"\n type=\"radio\"\n v-bind=\"sanitizedAttributes\"\n @click=\"onInput(option)\"\n />\n <div v-if=\"toggleStyle !== NeonToggleStyle.Toggle\" class=\"neon-toggle__radio-button\">\n <div v-if=\"option.key === modelValue\" class=\"neon-toggle__radio-button-indicator\"></div>\n </div>\n <!-- @slot This slot is for overriding the option rendering, it is passed two arguments:\n @binding {NeonToggleModel} option - the option for which to render additional content.\n @binding {number} index - the index of the option in the list. -->\n <slot :index=\"index\" :option=\"option\" name=\"option\">\n <neon-icon v-if=\"option.icon\" :disabled=\"disabled || option.disabled\" :name=\"option.icon\" />\n <span v-if=\"option.label\">{{ option.label }}</span>\n </slot>\n </label>\n <!-- @slot slot for rendering additional option content:\n @binding {NeonToggleModel} option - the option for which to render additional content.\n @binding {number} index - the index of the option in the list. -->\n <div v-if=\"slots.additionalContent\" class=\"neon-toggle__additional-content\">\n <slot name=\"additionalContent\" v-bind=\"{ option, index }\"></slot>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonToggle.ts\" />\n"],"names":["_createElementBlock","_normalizeClass","_ctx","_openBlock","_Fragment","_renderList","option","index","_createElementVNode","_withKeys","$event","_withModifiers","_mergeProps","_hoisted_3","_hoisted_4","_renderSlot","_createBlock","_component_neon_icon","_hoisted_5","_toDisplayString","_hoisted_6"],"mappings":";;;;;EAuC2D,OAAM;;;EACjB,OAAM;;;EAaZ,OAAM;;;;cApD9CA,EAwDM,OAAA;AAAA,IAvDH,OAAKC,EAAA,CAAA;AAAA,sBAA0BC,EAAA,WAAW;AAAA,MAA0B,gBAAAA,EAAA,4BAA4BA,EAAA,KAAK;AAAA,sBAA0BA,EAAA,WAAW;AAAA,sBAA0BA,EAAA,IAAI;AAAA,iCAAqCA,EAAA,SAAQ;AAAA,OAOhN,aAAa,CAAA;AAAA,IACnB,MAAK;AAAA;KAELC,EAAA,EAAA,GAAAH,EA4CWI,GAAA,MAAAC,EA5CyBH,EAAA,OAAK,CAAvBI,GAAQC;MAAuB,KAAAD,EAAO;AAAA;MACtDE,EAoCQ,SAAA;AAAA,QAnCL,gBAAcF,EAAO,QAAQJ,EAAA;AAAA,QAC7B,iBAAeA,EAAA,YAAYI,EAAO;AAAA,QAClC,OAAKL,EAAA,CAAA;AAAA,0CAA8CC,EAAA,YAAYI,EAAO;AAAA,yCAAmDA,EAAO,QAAQJ,EAAA;AAAA,UAAuD,iCAAAI,EAAO;AAAA,UAA0D,0CAAAJ,EAAA,MAAM;AAAA,WAOjQ,6BAA6B,CAAA;AAAA,QADlC,WAAWA,EAAA,YAAQ,CAAKI,EAAO,eAAe;AAAA,QAE/C,MAAK;AAAA,QACJ,WAAO;AAAA,UAAQG,EAAA,CAAAC,MAAAR,EAAA,aAAaI,CAAM,GAAA,CAAA,OAAA,CAAA;AAAA,UACXG,EAAAE,EAAA,CAAAD,MAAAR,EAAA,aAAaI,CAAM,GAAA,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA;AAAA;;QAE3CE,EAUE,SAVFI,EAUE;AAAA,UATC,SAASN,EAAO,QAAQJ,EAAA;AAAA,UACxB,UAAUA,EAAA,YAAYI,EAAO;AAAA,UAC7B,MAAMJ,EAAA;AAAA,UACN,UAAU;AAAA,UACV,OAAOI,EAAO;AAAA,UACf,OAAM;AAAA,UACN,MAAK;AAAA,4BACGJ,EAAA,qBAAmB;AAAA,UAC1B,SAAK,CAAAQ,MAAER,EAAA,QAAQI,CAAM;AAAA;QAEbJ,EAAA,gBAAgBA,EAAA,gBAAgB,UAA3CC,KAAAH,EAEM,OAFNa,GAEM;AAAA,UADOP,EAAO,QAAQJ,EAAA,cAA1BC,KAAAH,EAAwF,OAAxFc,CAAwF;;QAK1FC,EAGOb,EAAA,QAAA,UAAA;AAAA,UAHA,OAAOK;AAAA,UAAQ,QAAQD;AAAA,WAA9B,MAGO;AAAA,UAFYA,EAAO,aAAxBU,EAA4FC,GAAA;AAAA;YAA7D,UAAUf,EAAA,YAAYI,EAAO;AAAA,YAAW,MAAMA,EAAO;AAAA;UACxEA,EAAO,cAAnBN,EAAmD,QAAAkB,GAAAC,EAAtBb,EAAO,KAAK,GAAA,CAAA;;;MAMlCJ,EAAA,MAAM,qBAAjBC,KAAAH,EAEM,OAFNoB,GAEM;AAAA,QADJL,EAAiEb,EAAA,QAAA,qBAAjEU,EAAiE,EAAA,SAAA,GAAA,GAAA,EAAxB,QAAAN,GAAQ,OAAAC,EAAK,CAAA,CAAA;AAAA;;;;;"}
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": "28.0.0",
4
+ "version": "28.0.1",
5
5
  "main": "./dist/neon.cjs.js",
6
6
  "module": "./dist/neon.es.js",
7
7
  "types": "./dist/src/neon.d.ts",
@@ -36,6 +36,10 @@
36
36
  min-height: 1.25 * $control-size;
37
37
  }
38
38
 
39
+ .neon-toggle__additional-content {
40
+ margin-left: calc(#{1.25 * $control-size} + var(--neon-space-12));
41
+ }
42
+
39
43
  .neon-toggle__label--checked {
40
44
  .neon-toggle__radio-button {
41
45
  &-indicator {