@aotearoan/neon 25.0.1 → 25.0.2
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.
- package/dist/components/layout/modal/NeonModal.cjs.js +1 -1
- package/dist/components/layout/modal/NeonModal.cjs.js.map +1 -1
- package/dist/components/layout/modal/NeonModal.es.js +5 -1
- package/dist/components/layout/modal/NeonModal.es.js.map +1 -1
- package/dist/components/layout/modal/NeonModal.vue.cjs.js +1 -1
- package/dist/components/layout/modal/NeonModal.vue.cjs.js.map +1 -1
- package/dist/components/layout/modal/NeonModal.vue.es.js +6 -6
- package/dist/components/layout/modal/NeonModal.vue.es.js.map +1 -1
- package/dist/src/components/feedback/dialog/NeonDialog.d.ts +7 -0
- package/dist/src/components/layout/modal/NeonModal.d.ts +17 -16
- package/package.json +1 -1
- package/src/sass/components/_button.scss +1 -1
- package/src/sass/components/_label.scss +0 -1
- package/src/sass/components/_modal.scss +9 -4
- package/src/sass/variables.scss +10 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),c=require("../../../common/utils/NeonClosableUtils.cjs.js"),
|
|
1
|
+
"use strict";const e=require("vue"),c=require("../../../common/utils/NeonClosableUtils.cjs.js"),f=require("../../user-input/button/NeonButton.vue.cjs.js"),p=require("../../../common/enums/NeonResponsive.cjs.js"),d=e.defineComponent({name:"NeonDrawer",components:{NeonButton:f},props:{open:{type:Boolean,required:!0},dismissible:{type:Boolean,default:!0},opaque:{type:Boolean,default:!1},showTopNav:{type:Boolean,default:!1},breakpoint:{type:String,default:p.NeonResponsive.Mobile},noOffset:{type:Boolean}},emits:["close"],setup(o,{emit:u}){const l=e.ref(null),n=e.ref(null),r=()=>{u("close")},t=()=>{o.open&&o.dismissible&&r()};return e.onMounted(()=>{o.dismissible&&(n.value=l.value&&new c.NeonClosableUtils(l.value,t)||null)}),e.onUnmounted(()=>{var s;(s=n.value)==null||s.destroy()}),e.watch(()=>o.open,s=>{var i,a;s?(i=n.value)==null||i.open():(a=n.value)==null||a.close()},{immediate:!0}),{modal:l,close:t}}});module.exports=d;
|
|
2
2
|
//# sourceMappingURL=NeonModal.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonModal.cjs.js","sources":["../../../../src/components/layout/modal/NeonModal.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';\nimport { NeonClosableUtils } from '@/common/utils/NeonClosableUtils';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport { NeonResponsive } from '@/common/enums/NeonResponsive';\n\n/**\n * A modal dialog component. This will be rendered above the content of the main window and can either be dismissed by the user or configured to require user interaction before dismissal.\n */\nexport default defineComponent({\n name: 'NeonDrawer',\n components: {\n NeonButton,\n },\n props: {\n /**\n * Whether the modal is currently open.\n */\n open: { type: Boolean, required: true },\n /**\n * Whether the user is allowed to dismiss the modal by clicking outside the modal or pressing escape.\n */\n dismissible: { type: Boolean, default: true },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n /**\n * Keep the top nav visible when the modal is open\n */\n showTopNav: { type: Boolean, default: false },\n /**\n * Responsive breakpoint below which point the modal becomes fullscreen.\n * Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.\n */\n breakpoint: { type: String as () => NeonResponsive, default: NeonResponsive.Mobile },\n },\n emits: [\n /**\n * Emitted when the modal is closed.\n * @type {void}\n */\n 'close',\n ],\n setup(props, { emit }) {\n const modal = ref(null);\n const closableUtils = ref<NeonClosableUtils | null>(null);\n\n const onClose = () => {\n emit('close');\n };\n\n const close = () => {\n if (props.open && props.dismissible) {\n onClose();\n }\n };\n\n onMounted(() => {\n if (props.dismissible) {\n closableUtils.value = (modal.value && new NeonClosableUtils(modal.value, close)) || null;\n }\n });\n\n onUnmounted(() => {\n closableUtils.value?.destroy();\n });\n\n watch(\n () => props.open,\n (value) => {\n if (value) {\n closableUtils.value?.open();\n } else {\n closableUtils.value?.close();\n }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonResponsive","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value","_b"],"mappings":"oNAQAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,WAAAC,CAAA,EAEF,MAAO,CAIL,KAAM,CAAE,KAAM,QAAS,SAAU,EAAA,EAIjC,YAAa,CAAE,KAAM,QAAS,QAAS,EAAA,EAIvC,OAAQ,CAAE,KAAM,QAAS,QAAS,EAAA,EAIlC,WAAY,CAAE,KAAM,QAAS,QAAS,EAAA,EAKtC,WAAY,CAAE,KAAM,OAAgC,QAASC,EAAAA,eAAe,MAAA,
|
|
1
|
+
{"version":3,"file":"NeonModal.cjs.js","sources":["../../../../src/components/layout/modal/NeonModal.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';\nimport { NeonClosableUtils } from '@/common/utils/NeonClosableUtils';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport { NeonResponsive } from '@/common/enums/NeonResponsive';\n\n/**\n * A modal dialog component. This will be rendered above the content of the main window and can either be dismissed by the user or configured to require user interaction before dismissal.\n */\nexport default defineComponent({\n name: 'NeonDrawer',\n components: {\n NeonButton,\n },\n props: {\n /**\n * Whether the modal is currently open.\n */\n open: { type: Boolean, required: true },\n /**\n * Whether the user is allowed to dismiss the modal by clicking outside the modal or pressing escape.\n */\n dismissible: { type: Boolean, default: true },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n /**\n * Keep the top nav visible when the modal is open\n */\n showTopNav: { type: Boolean, default: false },\n /**\n * Responsive breakpoint below which point the modal becomes fullscreen.\n * Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.\n */\n breakpoint: { type: String as () => NeonResponsive, default: NeonResponsive.Mobile },\n /**\n * Remove the offset from the top of the modal.\n */\n noOffset: { type: Boolean },\n },\n emits: [\n /**\n * Emitted when the modal is closed.\n * @type {void}\n */\n 'close',\n ],\n setup(props, { emit }) {\n const modal = ref(null);\n const closableUtils = ref<NeonClosableUtils | null>(null);\n\n const onClose = () => {\n emit('close');\n };\n\n const close = () => {\n if (props.open && props.dismissible) {\n onClose();\n }\n };\n\n onMounted(() => {\n if (props.dismissible) {\n closableUtils.value = (modal.value && new NeonClosableUtils(modal.value, close)) || null;\n }\n });\n\n onUnmounted(() => {\n closableUtils.value?.destroy();\n });\n\n watch(\n () => props.open,\n (value) => {\n if (value) {\n closableUtils.value?.open();\n } else {\n closableUtils.value?.close();\n }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonResponsive","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value","_b"],"mappings":"oNAQAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,WAAAC,CAAA,EAEF,MAAO,CAIL,KAAM,CAAE,KAAM,QAAS,SAAU,EAAA,EAIjC,YAAa,CAAE,KAAM,QAAS,QAAS,EAAA,EAIvC,OAAQ,CAAE,KAAM,QAAS,QAAS,EAAA,EAIlC,WAAY,CAAE,KAAM,QAAS,QAAS,EAAA,EAKtC,WAAY,CAAE,KAAM,OAAgC,QAASC,EAAAA,eAAe,MAAA,EAI5E,SAAU,CAAE,KAAM,OAAA,CAAQ,EAE5B,MAAO,CAKL,OAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,IAAI,IAAI,EAChBC,EAAgBD,EAAAA,IAA8B,IAAI,EAElDE,EAAU,IAAM,CACpBJ,EAAK,OAAO,CACd,EAEMK,EAAQ,IAAM,CACdN,EAAM,MAAQA,EAAM,aACtBK,EAAA,CAEJ,EAEAE,OAAAA,EAAAA,UAAU,IAAM,CACVP,EAAM,cACRI,EAAc,MAASF,EAAM,OAAS,IAAIM,EAAAA,kBAAkBN,EAAM,MAAOI,CAAK,GAAM,KAExF,CAAC,EAEDG,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAc,QAAd,MAAAM,EAAqB,SACvB,CAAC,EAEDC,EAAAA,MACE,IAAMX,EAAM,KACXY,GAAU,SACLA,GACFF,EAAAN,EAAc,QAAd,MAAAM,EAAqB,QAErBG,EAAAT,EAAc,QAAd,MAAAS,EAAqB,OAEzB,EACA,CAAE,UAAW,EAAA,CAAK,EAGb,CACL,MAAAX,EACA,MAAAI,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -28,7 +28,11 @@ const C = r({
|
|
|
28
28
|
* Responsive breakpoint below which point the modal becomes fullscreen.
|
|
29
29
|
* Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.
|
|
30
30
|
*/
|
|
31
|
-
breakpoint: { type: String, default: b.Mobile }
|
|
31
|
+
breakpoint: { type: String, default: b.Mobile },
|
|
32
|
+
/**
|
|
33
|
+
* Remove the offset from the top of the modal.
|
|
34
|
+
*/
|
|
35
|
+
noOffset: { type: Boolean }
|
|
32
36
|
},
|
|
33
37
|
emits: [
|
|
34
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonModal.es.js","sources":["../../../../src/components/layout/modal/NeonModal.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';\nimport { NeonClosableUtils } from '@/common/utils/NeonClosableUtils';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport { NeonResponsive } from '@/common/enums/NeonResponsive';\n\n/**\n * A modal dialog component. This will be rendered above the content of the main window and can either be dismissed by the user or configured to require user interaction before dismissal.\n */\nexport default defineComponent({\n name: 'NeonDrawer',\n components: {\n NeonButton,\n },\n props: {\n /**\n * Whether the modal is currently open.\n */\n open: { type: Boolean, required: true },\n /**\n * Whether the user is allowed to dismiss the modal by clicking outside the modal or pressing escape.\n */\n dismissible: { type: Boolean, default: true },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n /**\n * Keep the top nav visible when the modal is open\n */\n showTopNav: { type: Boolean, default: false },\n /**\n * Responsive breakpoint below which point the modal becomes fullscreen.\n * Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.\n */\n breakpoint: { type: String as () => NeonResponsive, default: NeonResponsive.Mobile },\n },\n emits: [\n /**\n * Emitted when the modal is closed.\n * @type {void}\n */\n 'close',\n ],\n setup(props, { emit }) {\n const modal = ref(null);\n const closableUtils = ref<NeonClosableUtils | null>(null);\n\n const onClose = () => {\n emit('close');\n };\n\n const close = () => {\n if (props.open && props.dismissible) {\n onClose();\n }\n };\n\n onMounted(() => {\n if (props.dismissible) {\n closableUtils.value = (modal.value && new NeonClosableUtils(modal.value, close)) || null;\n }\n });\n\n onUnmounted(() => {\n closableUtils.value?.destroy();\n });\n\n watch(\n () => props.open,\n (value) => {\n if (value) {\n closableUtils.value?.open();\n } else {\n closableUtils.value?.close();\n }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonResponsive","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value","_b"],"mappings":";;;;AAQA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,EAAE,MAAM,SAAS,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAIjC,aAAa,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIvC,QAAQ,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIlC,YAAY,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKtC,YAAY,EAAE,MAAM,QAAgC,SAASC,EAAe,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"NeonModal.es.js","sources":["../../../../src/components/layout/modal/NeonModal.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';\nimport { NeonClosableUtils } from '@/common/utils/NeonClosableUtils';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport { NeonResponsive } from '@/common/enums/NeonResponsive';\n\n/**\n * A modal dialog component. This will be rendered above the content of the main window and can either be dismissed by the user or configured to require user interaction before dismissal.\n */\nexport default defineComponent({\n name: 'NeonDrawer',\n components: {\n NeonButton,\n },\n props: {\n /**\n * Whether the modal is currently open.\n */\n open: { type: Boolean, required: true },\n /**\n * Whether the user is allowed to dismiss the modal by clicking outside the modal or pressing escape.\n */\n dismissible: { type: Boolean, default: true },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n /**\n * Keep the top nav visible when the modal is open\n */\n showTopNav: { type: Boolean, default: false },\n /**\n * Responsive breakpoint below which point the modal becomes fullscreen.\n * Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.\n */\n breakpoint: { type: String as () => NeonResponsive, default: NeonResponsive.Mobile },\n /**\n * Remove the offset from the top of the modal.\n */\n noOffset: { type: Boolean },\n },\n emits: [\n /**\n * Emitted when the modal is closed.\n * @type {void}\n */\n 'close',\n ],\n setup(props, { emit }) {\n const modal = ref(null);\n const closableUtils = ref<NeonClosableUtils | null>(null);\n\n const onClose = () => {\n emit('close');\n };\n\n const close = () => {\n if (props.open && props.dismissible) {\n onClose();\n }\n };\n\n onMounted(() => {\n if (props.dismissible) {\n closableUtils.value = (modal.value && new NeonClosableUtils(modal.value, close)) || null;\n }\n });\n\n onUnmounted(() => {\n closableUtils.value?.destroy();\n });\n\n watch(\n () => props.open,\n (value) => {\n if (value) {\n closableUtils.value?.open();\n } else {\n closableUtils.value?.close();\n }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonResponsive","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value","_b"],"mappings":";;;;AAQA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,EAAE,MAAM,SAAS,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAIjC,aAAa,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIvC,QAAQ,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIlC,YAAY,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKtC,YAAY,EAAE,MAAM,QAAgC,SAASC,EAAe,OAAA;AAAA;AAAA;AAAA;AAAA,IAI5E,UAAU,EAAE,MAAM,QAAA;AAAA,EAAQ;AAAA,EAE5B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA,EAAA;AAAA,EAEF,MAAMC,GAAO,EAAE,MAAAC,KAAQ;AACrB,UAAMC,IAAQC,EAAI,IAAI,GAChBC,IAAgBD,EAA8B,IAAI,GAElDE,IAAU,MAAM;AACpB,MAAAJ,EAAK,OAAO;AAAA,IACd,GAEMK,IAAQ,MAAM;AAClB,MAAIN,EAAM,QAAQA,EAAM,eACtBK,EAAA;AAAA,IAEJ;AAEA,WAAAE,EAAU,MAAM;AACd,MAAIP,EAAM,gBACRI,EAAc,QAASF,EAAM,SAAS,IAAIM,EAAkBN,EAAM,OAAOI,CAAK,KAAM;AAAA,IAExF,CAAC,GAEDG,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAc,UAAd,QAAAM,EAAqB;AAAA,IACvB,CAAC,GAEDC;AAAA,MACE,MAAMX,EAAM;AAAA,MACZ,CAACY,MAAU;;AACT,QAAIA,KACFF,IAAAN,EAAc,UAAd,QAAAM,EAAqB,UAErBG,IAAAT,EAAc,UAAd,QAAAS,EAAqB;AAAA,MAEzB;AAAA,MACA,EAAE,WAAW,GAAA;AAAA,IAAK,GAGb;AAAA,MACL,OAAAX;AAAA,MACA,OAAAI;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const l=require("./NeonModal.cjs.js"),e=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r={ref:"modal",class:"neon-modal__container"};function
|
|
1
|
+
"use strict";const l=require("./NeonModal.cjs.js"),e=require("vue"),t=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),r={ref:"modal",class:"neon-modal__container"};function s(o,c,i,d,u,p){const n=e.resolveComponent("neon-button");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[{"neon-modal--open":o.open,"neon-modal--no-offset":o.noOffset},`neon-modal--breakpoint-${o.breakpoint}`],"neon-modal"]),role:"dialog"},[e.createElementVNode("div",r,[e.renderSlot(o.$slots,"default"),o.dismissible?(e.openBlock(),e.createBlock(n,{key:0,circular:!0,transparent:!0,"button-style":"text",class:"neon-modal__close",color:"low-contrast",icon:"times",size:"s",tabindex:"0",onClick:o.close},null,8,["onClick"])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",{class:e.normalizeClass([{"neon-modal__overlay--opaque":o.opaque,"neon-modal__overlay--show-top-nav":o.showTopNav},"neon-modal__overlay"])},null,2)],2)}const a=t(l,[["render",s]]);module.exports=a;
|
|
2
2
|
//# sourceMappingURL=NeonModal.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonModal.vue.cjs.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div
|
|
1
|
+
{"version":3,"file":"NeonModal.vue.cjs.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div\n :class=\"[{ 'neon-modal--open': open, 'neon-modal--no-offset': noOffset }, `neon-modal--breakpoint-${breakpoint}`]\"\n class=\"neon-modal\"\n role=\"dialog\"\n >\n <div ref=\"modal\" class=\"neon-modal__container\">\n <!-- @slot modal contents -->\n <slot></slot>\n <neon-button\n v-if=\"dismissible\"\n :circular=\"true\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-modal__close\"\n color=\"low-contrast\"\n icon=\"times\"\n size=\"s\"\n tabindex=\"0\"\n @click=\"close\"\n />\n </div>\n <div\n :class=\"{ 'neon-modal__overlay--opaque': opaque, 'neon-modal__overlay--show-top-nav': showTopNav }\"\n class=\"neon-modal__overlay\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonModal.ts\"></script>\n"],"names":["_createElementBlock","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button","_normalizeClass"],"mappings":"uIAMS,IAAI,QAAQ,MAAM,gHALzBA,EAAAA,mBAyBM,MAAA,CAxBH,6CAA8BC,EAAA,KAAI,wBAA2BA,UAAQ,EAAA,0BAA8BA,EAAA,UAAU,IACxG,YAAY,CAAA,EAClB,KAAK,WAELC,EAAAA,mBAeM,MAfNC,EAeM,CAbJC,aAAaH,EAAA,OAAA,SAAA,EAELA,EAAA,2BADRI,EAAAA,YAWEC,EAAA,OATC,SAAU,GACV,YAAa,GACd,eAAa,OACb,MAAM,oBACN,MAAM,eACN,KAAK,QACL,KAAK,IACL,SAAS,IACR,QAAOL,EAAA,8DAGZC,EAAAA,mBAGO,MAAA,CAFJ,MAAKK,EAAAA,eAAA,CAAA,CAAA,8BAAmCN,EAAA,OAAM,oCAAuCA,EAAA,UAAU,EAC1F,qBAAqB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "./NeonModal.es.js";
|
|
2
|
-
import { resolveComponent as r, openBlock as e, createElementBlock as s, normalizeClass as n, createElementVNode as l, renderSlot as
|
|
3
|
-
import
|
|
2
|
+
import { resolveComponent as r, openBlock as e, createElementBlock as s, normalizeClass as n, createElementVNode as l, renderSlot as d, createBlock as m, createCommentVNode as i } from "vue";
|
|
3
|
+
import c from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
4
|
const p = {
|
|
5
5
|
ref: "modal",
|
|
6
6
|
class: "neon-modal__container"
|
|
@@ -8,12 +8,12 @@ const p = {
|
|
|
8
8
|
function u(o, _, f, v, k, b) {
|
|
9
9
|
const a = r("neon-button");
|
|
10
10
|
return e(), s("div", {
|
|
11
|
-
class: n([[{ "neon-modal--open": o.open }, `neon-modal--breakpoint-${o.breakpoint}`], "neon-modal"]),
|
|
11
|
+
class: n([[{ "neon-modal--open": o.open, "neon-modal--no-offset": o.noOffset }, `neon-modal--breakpoint-${o.breakpoint}`], "neon-modal"]),
|
|
12
12
|
role: "dialog"
|
|
13
13
|
}, [
|
|
14
14
|
l("div", p, [
|
|
15
|
-
|
|
16
|
-
o.dismissible ? (e(),
|
|
15
|
+
d(o.$slots, "default"),
|
|
16
|
+
o.dismissible ? (e(), m(a, {
|
|
17
17
|
key: 0,
|
|
18
18
|
circular: !0,
|
|
19
19
|
transparent: !0,
|
|
@@ -31,7 +31,7 @@ function u(o, _, f, v, k, b) {
|
|
|
31
31
|
}, null, 2)
|
|
32
32
|
], 2);
|
|
33
33
|
}
|
|
34
|
-
const h = /* @__PURE__ */
|
|
34
|
+
const h = /* @__PURE__ */ c(t, [["render", u]]);
|
|
35
35
|
export {
|
|
36
36
|
h as default
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonModal.vue.es.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div
|
|
1
|
+
{"version":3,"file":"NeonModal.vue.es.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div\n :class=\"[{ 'neon-modal--open': open, 'neon-modal--no-offset': noOffset }, `neon-modal--breakpoint-${breakpoint}`]\"\n class=\"neon-modal\"\n role=\"dialog\"\n >\n <div ref=\"modal\" class=\"neon-modal__container\">\n <!-- @slot modal contents -->\n <slot></slot>\n <neon-button\n v-if=\"dismissible\"\n :circular=\"true\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-modal__close\"\n color=\"low-contrast\"\n icon=\"times\"\n size=\"s\"\n tabindex=\"0\"\n @click=\"close\"\n />\n </div>\n <div\n :class=\"{ 'neon-modal__overlay--opaque': opaque, 'neon-modal__overlay--show-top-nav': showTopNav }\"\n class=\"neon-modal__overlay\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonModal.ts\"></script>\n"],"names":["_createElementBlock","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button","_normalizeClass"],"mappings":";;;;EAMS,KAAI;AAAA,EAAQ,OAAM;;;;cALzBA,EAyBM,OAAA;AAAA,IAxBH,iCAA8BC,EAAA,MAAI,yBAA2BA,WAAQ,GAAA,0BAA8BA,EAAA,UAAU,KACxG,YAAY,CAAA;AAAA,IAClB,MAAK;AAAA;IAELC,EAeM,OAfNC,GAeM;AAAA,MAbJC,EAAaH,EAAA,QAAA,SAAA;AAAA,MAELA,EAAA,oBADRI,EAWEC,GAAA;AAAA;QATC,UAAU;AAAA,QACV,aAAa;AAAA,QACd,gBAAa;AAAA,QACb,OAAM;AAAA,QACN,OAAM;AAAA,QACN,MAAK;AAAA,QACL,MAAK;AAAA,QACL,UAAS;AAAA,QACR,SAAOL,EAAA;AAAA;;IAGZC,EAGO,OAAA;AAAA,MAFJ,OAAKK,EAAA,CAAA,EAAA,+BAAmCN,EAAA,QAAM,qCAAuCA,EAAA,WAAU,GAC1F,qBAAqB,CAAA;AAAA;;;;"}
|
|
@@ -633,6 +633,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
633
633
|
type: () => import("../../../neon").NeonResponsive;
|
|
634
634
|
default: import("../../../neon").NeonResponsive;
|
|
635
635
|
};
|
|
636
|
+
noOffset: {
|
|
637
|
+
type: BooleanConstructor;
|
|
638
|
+
};
|
|
636
639
|
}>, {
|
|
637
640
|
modal: import("vue").Ref<null, null>;
|
|
638
641
|
close: () => void;
|
|
@@ -657,6 +660,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
657
660
|
type: () => import("../../../neon").NeonResponsive;
|
|
658
661
|
default: import("../../../neon").NeonResponsive;
|
|
659
662
|
};
|
|
663
|
+
noOffset: {
|
|
664
|
+
type: BooleanConstructor;
|
|
665
|
+
};
|
|
660
666
|
}>> & Readonly<{
|
|
661
667
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
662
668
|
}>, {
|
|
@@ -664,6 +670,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
664
670
|
breakpoint: import("../../../neon").NeonResponsive;
|
|
665
671
|
opaque: boolean;
|
|
666
672
|
showTopNav: boolean;
|
|
673
|
+
noOffset: boolean;
|
|
667
674
|
}, {}, {
|
|
668
675
|
NeonButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
669
676
|
href: {
|
|
@@ -39,6 +39,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
39
39
|
type: () => NeonResponsive;
|
|
40
40
|
default: NeonResponsive;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Remove the offset from the top of the modal.
|
|
44
|
+
*/
|
|
45
|
+
noOffset: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
};
|
|
42
48
|
}>, {
|
|
43
49
|
modal: import("vue").Ref<null, null>;
|
|
44
50
|
close: () => void;
|
|
@@ -79,6 +85,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
79
85
|
type: () => NeonResponsive;
|
|
80
86
|
default: NeonResponsive;
|
|
81
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Remove the offset from the top of the modal.
|
|
90
|
+
*/
|
|
91
|
+
noOffset: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
};
|
|
82
94
|
}>> & Readonly<{
|
|
83
95
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
84
96
|
}>, {
|
|
@@ -86,6 +98,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
86
98
|
breakpoint: NeonResponsive;
|
|
87
99
|
opaque: boolean;
|
|
88
100
|
showTopNav: boolean;
|
|
101
|
+
noOffset: boolean;
|
|
89
102
|
}, {}, {
|
|
90
103
|
NeonButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
91
104
|
href: {
|
|
@@ -98,14 +111,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
98
111
|
};
|
|
99
112
|
size: {
|
|
100
113
|
type: () => import("../../../neon").NeonButtonSize;
|
|
101
|
-
default: import("../../../neon").NeonButtonSize;
|
|
102
|
-
|
|
103
|
-
* @type {void}
|
|
104
|
-
*/
|
|
105
|
-
}; /**
|
|
106
|
-
* Emitted when the modal is closed.
|
|
107
|
-
* @type {void}
|
|
108
|
-
*/
|
|
114
|
+
default: import("../../../neon").NeonButtonSize;
|
|
115
|
+
};
|
|
109
116
|
color: {
|
|
110
117
|
type: () => import("../../../neon").NeonFunctionalColor;
|
|
111
118
|
default: import("../../../neon").NeonFunctionalColor;
|
|
@@ -203,14 +210,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
203
210
|
};
|
|
204
211
|
size: {
|
|
205
212
|
type: () => import("../../../neon").NeonButtonSize;
|
|
206
|
-
default: import("../../../neon").NeonButtonSize;
|
|
207
|
-
|
|
208
|
-
* @type {void}
|
|
209
|
-
*/
|
|
210
|
-
}; /**
|
|
211
|
-
* Emitted when the modal is closed.
|
|
212
|
-
* @type {void}
|
|
213
|
-
*/
|
|
213
|
+
default: import("../../../neon").NeonButtonSize;
|
|
214
|
+
};
|
|
214
215
|
color: {
|
|
215
216
|
type: () => import("../../../neon").NeonFunctionalColor;
|
|
216
217
|
default: import("../../../neon").NeonFunctionalColor;
|
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": "25.0.
|
|
4
|
+
"version": "25.0.2",
|
|
5
5
|
"main": "./dist/neon.cjs.js",
|
|
6
6
|
"module": "./dist/neon.es.js",
|
|
7
7
|
"types": "./dist/src/neon.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.neon-modal__container {
|
|
35
|
-
margin-top: -
|
|
35
|
+
margin-top: var(--neon-margin-top-modal-closed);
|
|
36
36
|
transition: all ease-in-out var(--neon-animation-speed-slow);
|
|
37
37
|
|
|
38
38
|
& > .neon-card {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
&.neon-modal--open {
|
|
45
45
|
.neon-modal__container {
|
|
46
|
-
margin-top: -
|
|
46
|
+
margin-top: var(--neon-margin-top-modal-open);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
transition: all ease-in-out var(--neon-animation-speed-fast);
|
|
128
128
|
|
|
129
129
|
.neon-card {
|
|
130
|
-
margin-top: -
|
|
130
|
+
margin-top: var(--neon-margin-top-modal-closed);
|
|
131
131
|
transition: all ease-in-out var(--neon-animation-speed-slow);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
&.neon-modal--open {
|
|
136
136
|
.neon-card {
|
|
137
|
-
margin-top: -
|
|
137
|
+
margin-top: var(--neon-margin-top-modal-open);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -164,5 +164,10 @@
|
|
|
164
164
|
@include modal-responsive();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
+
|
|
168
|
+
&--no-offset {
|
|
169
|
+
--neon-margin-top-modal-closed: 0;
|
|
170
|
+
--neon-margin-top-modal-open: 0;
|
|
171
|
+
}
|
|
167
172
|
}
|
|
168
173
|
}
|
package/src/sass/variables.scss
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
--neon-spacing-horizontal-desktop: calc(var(--neon-gutter-desktop) * var(--neon-spacing-horizontal-multiplier));
|
|
86
86
|
|
|
87
87
|
/* animation */
|
|
88
|
+
--neon-animation-speed-slowest: 0.5s;
|
|
88
89
|
--neon-animation-speed-slow: 0.3s;
|
|
89
90
|
--neon-animation-speed-fast: 0.225s;
|
|
90
91
|
--neon-animation-speed-fastest: 0.05s;
|
|
@@ -154,7 +155,7 @@
|
|
|
154
155
|
--neon-h1-weight: var(--neon-font-weight-semi-bold);
|
|
155
156
|
--neon-h0-weight: var(--neon-font-weight-semi-bold);
|
|
156
157
|
|
|
157
|
-
--neon-font-weight-em:
|
|
158
|
+
--neon-font-weight-em: inherit;
|
|
158
159
|
--neon-font-weight-strong: var(--neon-font-weight-medium);
|
|
159
160
|
|
|
160
161
|
--neon-letter-spacing-headings: 0;
|
|
@@ -303,6 +304,10 @@
|
|
|
303
304
|
--neon-opacity-mobile-menu-focus: 0.125;
|
|
304
305
|
--neon-height-mobile-menu: 66rem;
|
|
305
306
|
|
|
307
|
+
/* modal */
|
|
308
|
+
--neon-margin-top-modal-closed: -30vh;
|
|
309
|
+
--neon-margin-top-modal-open: -20vh;
|
|
310
|
+
|
|
306
311
|
/* dropdown */
|
|
307
312
|
--neon-max-height-dropdown: 280rem;
|
|
308
313
|
|
|
@@ -593,6 +598,8 @@
|
|
|
593
598
|
--neon-background-solid-button-dark-error: var(--neon-color-error-l1);
|
|
594
599
|
|
|
595
600
|
/* outline buttons */
|
|
601
|
+
--neon-background-color-outline-button: transparent;
|
|
602
|
+
|
|
596
603
|
--neon-border-color-outline-button-inactive-high-contrast: var(--neon-border-color);
|
|
597
604
|
--neon-background-outline-button-hover-high-contrast: var(--neon-color-high-contrast-l2);
|
|
598
605
|
--neon-background-outline-button-active-high-contrast: var(--neon-color-high-contrast-l1);
|
|
@@ -951,6 +958,8 @@
|
|
|
951
958
|
--neon-background-solid-button-dark-error: var(--neon-color-error-d2);
|
|
952
959
|
|
|
953
960
|
/* outline buttons */
|
|
961
|
+
--neon-background-color-outline-button: transparent;
|
|
962
|
+
|
|
954
963
|
--neon-border-color-outline-button-inactive-high-contrast: var(--neon-border-color);
|
|
955
964
|
--neon-background-outline-button-hover-high-contrast: var(--neon-color-high-contrast-d1);
|
|
956
965
|
--neon-background-outline-button-active-high-contrast: var(--neon-color-high-contrast-d2);
|