@aotearoan/neon 23.2.5 → 23.3.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.
- package/dist/common/enums/NeonFunctionalColor.cjs.js +1 -1
- package/dist/common/enums/NeonFunctionalColor.cjs.js.map +1 -1
- package/dist/common/enums/NeonFunctionalColor.es.js +1 -1
- package/dist/common/enums/NeonFunctionalColor.es.js.map +1 -1
- package/dist/common/utils/NeonClosableUtils.cjs.js +1 -1
- package/dist/common/utils/NeonClosableUtils.cjs.js.map +1 -1
- package/dist/common/utils/NeonClosableUtils.es.js +1 -1
- package/dist/common/utils/NeonClosableUtils.es.js.map +1 -1
- 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 +26 -20
- 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 +9 -9
- package/dist/components/layout/modal/NeonModal.vue.es.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js.map +1 -1
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.es.js +15 -15
- package/dist/components/presentation/image-carousel/NeonImageCarousel.vue.es.js.map +1 -1
- package/dist/components/user-input/number/NeonNumber.cjs.js +1 -1
- package/dist/components/user-input/number/NeonNumber.cjs.js.map +1 -1
- package/dist/components/user-input/number/NeonNumber.es.js +13 -9
- package/dist/components/user-input/number/NeonNumber.es.js.map +1 -1
- package/dist/components/user-input/number/NeonNumber.vue.cjs.js +1 -1
- package/dist/components/user-input/number/NeonNumber.vue.cjs.js.map +1 -1
- package/dist/components/user-input/number/NeonNumber.vue.es.js +7 -6
- package/dist/components/user-input/number/NeonNumber.vue.es.js.map +1 -1
- package/dist/src/common/enums/NeonFunctionalColor.d.ts +2 -0
- package/dist/src/common/models/NeonCarouselImage.d.ts +4 -0
- package/dist/src/components/feedback/dialog/NeonDialog.d.ts +11 -6
- package/dist/src/components/layout/modal/NeonModal.d.ts +38 -16
- package/dist/src/components/user-input/number/NeonNumber.d.ts +85 -104
- package/package.json +1 -1
- package/src/sass/color-variables.scss +11 -0
- package/src/sass/components/_button.scss +4 -1
- package/src/sass/components/_date-picker.scss +2 -0
- package/src/sass/components/_field-group.scss +8 -1
- package/src/sass/components/_input-indicator.scss +2 -0
- package/src/sass/components/_menu.scss +17 -10
- package/src/sass/components/_mobile-menu.scss +6 -6
- package/src/sass/components/_modal.scss +73 -53
- package/src/sass/components/_select.scss +2 -0
- package/src/sass/components/_stepper.scss +0 -7
- package/src/sass/global/_base-html.scss +4 -0
- package/src/sass/global/_typography.scss +4 -0
- package/src/sass/includes/_palettes.scss +2 -0
- package/src/sass/palette.scss +10 -0
- package/src/sass/theme.scss +1 -0
- package/src/sass/variables.scss +41 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s=(r=>(r.LowContrast="low-contrast",r.Neutral="neutral",r.HighContrast="high-contrast",r.Brand="brand",r.Primary="primary",r.Info="info",r.Success="success",r.Warn="warn",r.Error="error",r))(s||{});exports.NeonFunctionalColor=s;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var s=(r=>(r.LowContrast="low-contrast",r.Neutral="neutral",r.HighContrast="high-contrast",r.Brand="brand",r.Accent="accent",r.Primary="primary",r.Info="info",r.Success="success",r.Warn="warn",r.Error="error",r))(s||{});exports.NeonFunctionalColor=s;
|
|
2
2
|
//# sourceMappingURL=NeonFunctionalColor.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonFunctionalColor.cjs.js","sources":["../../../src/common/enums/NeonFunctionalColor.ts"],"sourcesContent":["/**\n * The core color palettes available for styling components in Neon. See the design section\n * <a href=\"/design/color\">Color</a> page for more details on color palettes.\n */\nexport enum NeonFunctionalColor {\n /** Low contrast is a more subtle neutral palette which can be used for secondary actions & supporting text. */\n LowContrast = 'low-contrast',\n /** Neutral is the base greyscale palette. */\n Neutral = 'neutral',\n /**\n * High contrast is a higher contrast palette than can be used for increased accessibility or for a stronger black &\n * white application.\n * */\n HighContrast = 'high-contrast',\n /** Brand is the main brand color palette, this is useful for branded CTAs, text & controls. */\n Brand = 'brand',\n /** Primary is the main application color palette. For most applications this will be used by default. */\n Primary = 'primary',\n /** Info can be used to convey informational context, e.g. notes & alerts */\n Info = 'info',\n /** Success can be used to convey successful actions. */\n Success = 'success',\n /** Warn can be used to convey issues/actions that are less severe but may still impact the user. */\n Warn = 'warn',\n /** Error can be used to convey issues/actions that are severe & that the user may not be able to recover from. */\n Error = 'error',\n}\n"],"names":["NeonFunctionalColor"],"mappings":"gFAIO,IAAKA,GAAAA,IAEVA,EAAA,YAAc,eAEdA,EAAA,QAAU,UAKVA,EAAA,aAAe,gBAEfA,EAAA,MAAQ,QAERA,EAAA,QAAU,UAEVA,EAAA,KAAO,OAEPA,EAAA,QAAU,UAEVA,EAAA,KAAO,OAEPA,EAAA,MAAQ,
|
|
1
|
+
{"version":3,"file":"NeonFunctionalColor.cjs.js","sources":["../../../src/common/enums/NeonFunctionalColor.ts"],"sourcesContent":["/**\n * The core color palettes available for styling components in Neon. See the design section\n * <a href=\"/design/color\">Color</a> page for more details on color palettes.\n */\nexport enum NeonFunctionalColor {\n /** Low contrast is a more subtle neutral palette which can be used for secondary actions & supporting text. */\n LowContrast = 'low-contrast',\n /** Neutral is the base greyscale palette. */\n Neutral = 'neutral',\n /**\n * High contrast is a higher contrast palette than can be used for increased accessibility or for a stronger black &\n * white application.\n * */\n HighContrast = 'high-contrast',\n /** Brand is the main brand color palette, this is useful for branded CTAs, text & controls. */\n Brand = 'brand',\n /** Accent is an alternative brand accent palette used when multiple brand colors are required */\n Accent = 'accent',\n /** Primary is the main application color palette. For most applications this will be used by default. */\n Primary = 'primary',\n /** Info can be used to convey informational context, e.g. notes & alerts */\n Info = 'info',\n /** Success can be used to convey successful actions. */\n Success = 'success',\n /** Warn can be used to convey issues/actions that are less severe but may still impact the user. */\n Warn = 'warn',\n /** Error can be used to convey issues/actions that are severe & that the user may not be able to recover from. */\n Error = 'error',\n}\n"],"names":["NeonFunctionalColor"],"mappings":"gFAIO,IAAKA,GAAAA,IAEVA,EAAA,YAAc,eAEdA,EAAA,QAAU,UAKVA,EAAA,aAAe,gBAEfA,EAAA,MAAQ,QAERA,EAAA,OAAS,SAETA,EAAA,QAAU,UAEVA,EAAA,KAAO,OAEPA,EAAA,QAAU,UAEVA,EAAA,KAAO,OAEPA,EAAA,MAAQ,QAvBEA,IAAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var s = /* @__PURE__ */ ((r) => (r.LowContrast = "low-contrast", r.Neutral = "neutral", r.HighContrast = "high-contrast", r.Brand = "brand", r.Primary = "primary", r.Info = "info", r.Success = "success", r.Warn = "warn", r.Error = "error", r))(s || {});
|
|
1
|
+
var s = /* @__PURE__ */ ((r) => (r.LowContrast = "low-contrast", r.Neutral = "neutral", r.HighContrast = "high-contrast", r.Brand = "brand", r.Accent = "accent", r.Primary = "primary", r.Info = "info", r.Success = "success", r.Warn = "warn", r.Error = "error", r))(s || {});
|
|
2
2
|
export {
|
|
3
3
|
s as NeonFunctionalColor
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonFunctionalColor.es.js","sources":["../../../src/common/enums/NeonFunctionalColor.ts"],"sourcesContent":["/**\n * The core color palettes available for styling components in Neon. See the design section\n * <a href=\"/design/color\">Color</a> page for more details on color palettes.\n */\nexport enum NeonFunctionalColor {\n /** Low contrast is a more subtle neutral palette which can be used for secondary actions & supporting text. */\n LowContrast = 'low-contrast',\n /** Neutral is the base greyscale palette. */\n Neutral = 'neutral',\n /**\n * High contrast is a higher contrast palette than can be used for increased accessibility or for a stronger black &\n * white application.\n * */\n HighContrast = 'high-contrast',\n /** Brand is the main brand color palette, this is useful for branded CTAs, text & controls. */\n Brand = 'brand',\n /** Primary is the main application color palette. For most applications this will be used by default. */\n Primary = 'primary',\n /** Info can be used to convey informational context, e.g. notes & alerts */\n Info = 'info',\n /** Success can be used to convey successful actions. */\n Success = 'success',\n /** Warn can be used to convey issues/actions that are less severe but may still impact the user. */\n Warn = 'warn',\n /** Error can be used to convey issues/actions that are severe & that the user may not be able to recover from. */\n Error = 'error',\n}\n"],"names":["NeonFunctionalColor"],"mappings":"AAIO,IAAKA,sBAAAA,OAEVA,EAAA,cAAc,gBAEdA,EAAA,UAAU,WAKVA,EAAA,eAAe,iBAEfA,EAAA,QAAQ,SAERA,EAAA,UAAU,WAEVA,EAAA,OAAO,QAEPA,EAAA,UAAU,WAEVA,EAAA,OAAO,QAEPA,EAAA,QAAQ,
|
|
1
|
+
{"version":3,"file":"NeonFunctionalColor.es.js","sources":["../../../src/common/enums/NeonFunctionalColor.ts"],"sourcesContent":["/**\n * The core color palettes available for styling components in Neon. See the design section\n * <a href=\"/design/color\">Color</a> page for more details on color palettes.\n */\nexport enum NeonFunctionalColor {\n /** Low contrast is a more subtle neutral palette which can be used for secondary actions & supporting text. */\n LowContrast = 'low-contrast',\n /** Neutral is the base greyscale palette. */\n Neutral = 'neutral',\n /**\n * High contrast is a higher contrast palette than can be used for increased accessibility or for a stronger black &\n * white application.\n * */\n HighContrast = 'high-contrast',\n /** Brand is the main brand color palette, this is useful for branded CTAs, text & controls. */\n Brand = 'brand',\n /** Accent is an alternative brand accent palette used when multiple brand colors are required */\n Accent = 'accent',\n /** Primary is the main application color palette. For most applications this will be used by default. */\n Primary = 'primary',\n /** Info can be used to convey informational context, e.g. notes & alerts */\n Info = 'info',\n /** Success can be used to convey successful actions. */\n Success = 'success',\n /** Warn can be used to convey issues/actions that are less severe but may still impact the user. */\n Warn = 'warn',\n /** Error can be used to convey issues/actions that are severe & that the user may not be able to recover from. */\n Error = 'error',\n}\n"],"names":["NeonFunctionalColor"],"mappings":"AAIO,IAAKA,sBAAAA,OAEVA,EAAA,cAAc,gBAEdA,EAAA,UAAU,WAKVA,EAAA,eAAe,iBAEfA,EAAA,QAAQ,SAERA,EAAA,SAAS,UAETA,EAAA,UAAU,WAEVA,EAAA,OAAO,QAEPA,EAAA,UAAU,WAEVA,EAAA,OAAO,QAEPA,EAAA,QAAQ,SAvBEA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var o=(s,e,t)=>e in s?n(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>o(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{constructor(e,t){i(this,"target");i(this,"closeCallback");i(this,"_open",!1);this.target=e,this.closeCallback=t,document.addEventListener("keydown",this.escapeKeyListener.bind(this),{passive:!0}),document.addEventListener("mousedown",this.handleOutsideClick.bind(this),{passive:!0}),document.addEventListener("touchstart",this.handleOutsideClick.bind(this),{passive:!0})}open(){this._open=!0,document.body.classList.add("neon-closable--open")}destroy(){document.removeEventListener("keydown",this.escapeKeyListener.bind(this)),document.removeEventListener("mousedown",this.handleOutsideClick.bind(this)),document.removeEventListener("touchstart",this.handleOutsideClick.bind(this))}escapeKeyListener(e){e.key==="Escape"&&this.close()}close(){this.closeCallback(),this._open&&(document.body.classList.remove("neon-closable--open"),this._open=!1)}handleOutsideClick(e){const t=e.target&&e.target;return t&&!this.target.contains(t)&&this.close(),!0}}exports.NeonClosableUtils=a;
|
|
1
|
+
"use strict";var n=Object.defineProperty;var o=(s,e,t)=>e in s?n(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var i=(s,e,t)=>o(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{constructor(e,t){i(this,"target");i(this,"closeCallback");i(this,"_open",!1);this.target=e,this.closeCallback=t,document.addEventListener("keydown",this.escapeKeyListener.bind(this),{passive:!0}),document.addEventListener("mousedown",this.handleOutsideClick.bind(this),{passive:!0}),document.addEventListener("touchstart",this.handleOutsideClick.bind(this),{passive:!0})}open(){this._open=!0,document.body.classList.add("neon-closable--open")}destroy(){this.close(),document.removeEventListener("keydown",this.escapeKeyListener.bind(this)),document.removeEventListener("mousedown",this.handleOutsideClick.bind(this)),document.removeEventListener("touchstart",this.handleOutsideClick.bind(this))}escapeKeyListener(e){e.key==="Escape"&&this.close()}close(){this.closeCallback(),this._open&&(document.body.classList.remove("neon-closable--open"),this._open=!1)}handleOutsideClick(e){const t=e.target&&e.target;return t&&!this.target.contains(t)&&this.close(),!0}}exports.NeonClosableUtils=a;
|
|
2
2
|
//# sourceMappingURL=NeonClosableUtils.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonClosableUtils.cjs.js","sources":["../../../src/common/utils/NeonClosableUtils.ts"],"sourcesContent":["/**\n * Utility class for assisting with closing events for popup containers like modals, dropdowns, selects & drawers.\n * Detects click & touch events outside the popup element as well as escape key triggers.\n */\nexport class NeonClosableUtils {\n private readonly target: HTMLElement;\n private readonly closeCallback: () => void;\n private _open = false;\n\n /**\n * Initialise utility to listen to keyboard, mouse & touch events.\n *\n * @param target The popup <em>closable</em> element.\n * @param closeCallback Callback function triggered when an event fires that should close the target\n * element.\n */\n public constructor(target: HTMLElement, closeCallback: () => void) {\n this.target = target;\n this.closeCallback = closeCallback;\n document.addEventListener('keydown', this.escapeKeyListener.bind(this), { passive: true });\n document.addEventListener('mousedown', this.handleOutsideClick.bind(this), { passive: true });\n document.addEventListener('touchstart', this.handleOutsideClick.bind(this), { passive: true });\n }\n\n /**\n * Inform the class that the target is now open. This adds the global <em>neon-closable--open</em> class to the\n * document body to prevent page scrolling while a popup is open.\n */\n public open() {\n this._open = true;\n document.body.classList.add('neon-closable--open');\n }\n\n /**\n * Destroy the listeners. Call this in the parent component's onUnmounted method.\n */\n public destroy() {\n document.removeEventListener('keydown', this.escapeKeyListener.bind(this));\n document.removeEventListener('mousedown', this.handleOutsideClick.bind(this));\n document.removeEventListener('touchstart', this.handleOutsideClick.bind(this));\n }\n\n escapeKeyListener(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.close();\n }\n }\n\n /**\n * Handle closing of the target element. This triggers the closeCallback & removes the global\n * <em>neon-closable--open</em> class from the document body.\n */\n public close() {\n this.closeCallback();\n\n if (this._open) {\n document.body.classList.remove('neon-closable--open');\n this._open = false;\n }\n }\n\n private handleOutsideClick(event: MouseEvent | TouchEvent) {\n const target = event.target && (event.target as Element);\n if (target && !this.target.contains(target)) {\n this.close();\n }\n return true;\n }\n}\n"],"names":["NeonClosableUtils","target","closeCallback","__publicField","event"],"mappings":"oPAIO,MAAMA,CAAkB,CAYtB,YAAYC,EAAqBC,EAA2B,CAXlDC,EAAA,eACAA,EAAA,sBACTA,EAAA,aAAQ,IAUd,KAAK,OAASF,EACd,KAAK,cAAgBC,EACrB,SAAS,iBAAiB,UAAW,KAAK,kBAAkB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,EACzF,SAAS,iBAAiB,YAAa,KAAK,mBAAmB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,EAC5F,SAAS,iBAAiB,aAAc,KAAK,mBAAmB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,CAC/F,CAMO,MAAO,CACZ,KAAK,MAAQ,GACb,SAAS,KAAK,UAAU,IAAI,qBAAqB,CACnD,CAKO,SAAU,CACf,SAAS,oBAAoB,UAAW,KAAK,kBAAkB,KAAK,IAAI,CAAC,EACzE,SAAS,oBAAoB,YAAa,KAAK,mBAAmB,KAAK,IAAI,CAAC,EAC5E,SAAS,oBAAoB,aAAc,KAAK,mBAAmB,KAAK,IAAI,CAAC,CAC/E,CAEA,kBAAkBE,EAAsB,CAClCA,EAAM,MAAQ,UAChB,KAAK,MAAA,CAET,CAMO,OAAQ,CACb,KAAK,cAAA,EAED,KAAK,QACP,SAAS,KAAK,UAAU,OAAO,qBAAqB,EACpD,KAAK,MAAQ,GAEjB,CAEQ,mBAAmBA,EAAgC,CACzD,MAAMH,EAASG,EAAM,QAAWA,EAAM,OACtC,OAAIH,GAAU,CAAC,KAAK,OAAO,SAASA,CAAM,GACxC,KAAK,MAAA,EAEA,EACT,CACF"}
|
|
1
|
+
{"version":3,"file":"NeonClosableUtils.cjs.js","sources":["../../../src/common/utils/NeonClosableUtils.ts"],"sourcesContent":["/**\n * Utility class for assisting with closing events for popup containers like modals, dropdowns, selects & drawers.\n * Detects click & touch events outside the popup element as well as escape key triggers.\n */\nexport class NeonClosableUtils {\n private readonly target: HTMLElement;\n private readonly closeCallback: () => void;\n private _open = false;\n\n /**\n * Initialise utility to listen to keyboard, mouse & touch events.\n *\n * @param target The popup <em>closable</em> element.\n * @param closeCallback Callback function triggered when an event fires that should close the target\n * element.\n */\n public constructor(target: HTMLElement, closeCallback: () => void) {\n this.target = target;\n this.closeCallback = closeCallback;\n document.addEventListener('keydown', this.escapeKeyListener.bind(this), { passive: true });\n document.addEventListener('mousedown', this.handleOutsideClick.bind(this), { passive: true });\n document.addEventListener('touchstart', this.handleOutsideClick.bind(this), { passive: true });\n }\n\n /**\n * Inform the class that the target is now open. This adds the global <em>neon-closable--open</em> class to the\n * document body to prevent page scrolling while a popup is open.\n */\n public open() {\n this._open = true;\n document.body.classList.add('neon-closable--open');\n }\n\n /**\n * Destroy the listeners. Call this in the parent component's onUnmounted method.\n */\n public destroy() {\n this.close();\n document.removeEventListener('keydown', this.escapeKeyListener.bind(this));\n document.removeEventListener('mousedown', this.handleOutsideClick.bind(this));\n document.removeEventListener('touchstart', this.handleOutsideClick.bind(this));\n }\n\n escapeKeyListener(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.close();\n }\n }\n\n /**\n * Handle closing of the target element. This triggers the closeCallback & removes the global\n * <em>neon-closable--open</em> class from the document body.\n */\n public close() {\n this.closeCallback();\n\n if (this._open) {\n document.body.classList.remove('neon-closable--open');\n this._open = false;\n }\n }\n\n private handleOutsideClick(event: MouseEvent | TouchEvent) {\n const target = event.target && (event.target as Element);\n if (target && !this.target.contains(target)) {\n this.close();\n }\n return true;\n }\n}\n"],"names":["NeonClosableUtils","target","closeCallback","__publicField","event"],"mappings":"oPAIO,MAAMA,CAAkB,CAYtB,YAAYC,EAAqBC,EAA2B,CAXlDC,EAAA,eACAA,EAAA,sBACTA,EAAA,aAAQ,IAUd,KAAK,OAASF,EACd,KAAK,cAAgBC,EACrB,SAAS,iBAAiB,UAAW,KAAK,kBAAkB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,EACzF,SAAS,iBAAiB,YAAa,KAAK,mBAAmB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,EAC5F,SAAS,iBAAiB,aAAc,KAAK,mBAAmB,KAAK,IAAI,EAAG,CAAE,QAAS,GAAM,CAC/F,CAMO,MAAO,CACZ,KAAK,MAAQ,GACb,SAAS,KAAK,UAAU,IAAI,qBAAqB,CACnD,CAKO,SAAU,CACf,KAAK,MAAA,EACL,SAAS,oBAAoB,UAAW,KAAK,kBAAkB,KAAK,IAAI,CAAC,EACzE,SAAS,oBAAoB,YAAa,KAAK,mBAAmB,KAAK,IAAI,CAAC,EAC5E,SAAS,oBAAoB,aAAc,KAAK,mBAAmB,KAAK,IAAI,CAAC,CAC/E,CAEA,kBAAkBE,EAAsB,CAClCA,EAAM,MAAQ,UAChB,KAAK,MAAA,CAET,CAMO,OAAQ,CACb,KAAK,cAAA,EAED,KAAK,QACP,SAAS,KAAK,UAAU,OAAO,qBAAqB,EACpD,KAAK,MAAQ,GAEjB,CAEQ,mBAAmBA,EAAgC,CACzD,MAAMH,EAASG,EAAM,QAAWA,EAAM,OACtC,OAAIH,GAAU,CAAC,KAAK,OAAO,SAASA,CAAM,GACxC,KAAK,MAAA,EAEA,EACT,CACF"}
|
|
@@ -26,7 +26,7 @@ class d {
|
|
|
26
26
|
* Destroy the listeners. Call this in the parent component's onUnmounted method.
|
|
27
27
|
*/
|
|
28
28
|
destroy() {
|
|
29
|
-
document.removeEventListener("keydown", this.escapeKeyListener.bind(this)), document.removeEventListener("mousedown", this.handleOutsideClick.bind(this)), document.removeEventListener("touchstart", this.handleOutsideClick.bind(this));
|
|
29
|
+
this.close(), document.removeEventListener("keydown", this.escapeKeyListener.bind(this)), document.removeEventListener("mousedown", this.handleOutsideClick.bind(this)), document.removeEventListener("touchstart", this.handleOutsideClick.bind(this));
|
|
30
30
|
}
|
|
31
31
|
escapeKeyListener(e) {
|
|
32
32
|
e.key === "Escape" && this.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonClosableUtils.es.js","sources":["../../../src/common/utils/NeonClosableUtils.ts"],"sourcesContent":["/**\n * Utility class for assisting with closing events for popup containers like modals, dropdowns, selects & drawers.\n * Detects click & touch events outside the popup element as well as escape key triggers.\n */\nexport class NeonClosableUtils {\n private readonly target: HTMLElement;\n private readonly closeCallback: () => void;\n private _open = false;\n\n /**\n * Initialise utility to listen to keyboard, mouse & touch events.\n *\n * @param target The popup <em>closable</em> element.\n * @param closeCallback Callback function triggered when an event fires that should close the target\n * element.\n */\n public constructor(target: HTMLElement, closeCallback: () => void) {\n this.target = target;\n this.closeCallback = closeCallback;\n document.addEventListener('keydown', this.escapeKeyListener.bind(this), { passive: true });\n document.addEventListener('mousedown', this.handleOutsideClick.bind(this), { passive: true });\n document.addEventListener('touchstart', this.handleOutsideClick.bind(this), { passive: true });\n }\n\n /**\n * Inform the class that the target is now open. This adds the global <em>neon-closable--open</em> class to the\n * document body to prevent page scrolling while a popup is open.\n */\n public open() {\n this._open = true;\n document.body.classList.add('neon-closable--open');\n }\n\n /**\n * Destroy the listeners. Call this in the parent component's onUnmounted method.\n */\n public destroy() {\n document.removeEventListener('keydown', this.escapeKeyListener.bind(this));\n document.removeEventListener('mousedown', this.handleOutsideClick.bind(this));\n document.removeEventListener('touchstart', this.handleOutsideClick.bind(this));\n }\n\n escapeKeyListener(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.close();\n }\n }\n\n /**\n * Handle closing of the target element. This triggers the closeCallback & removes the global\n * <em>neon-closable--open</em> class from the document body.\n */\n public close() {\n this.closeCallback();\n\n if (this._open) {\n document.body.classList.remove('neon-closable--open');\n this._open = false;\n }\n }\n\n private handleOutsideClick(event: MouseEvent | TouchEvent) {\n const target = event.target && (event.target as Element);\n if (target && !this.target.contains(target)) {\n this.close();\n }\n return true;\n }\n}\n"],"names":["NeonClosableUtils","target","closeCallback","__publicField","event"],"mappings":";;;AAIO,MAAMA,EAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYtB,YAAYC,GAAqBC,GAA2B;AAXlD,IAAAC,EAAA;AACA,IAAAA,EAAA;AACT,IAAAA,EAAA,eAAQ;AAUd,SAAK,SAASF,GACd,KAAK,gBAAgBC,GACrB,SAAS,iBAAiB,WAAW,KAAK,kBAAkB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM,GACzF,SAAS,iBAAiB,aAAa,KAAK,mBAAmB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM,GAC5F,SAAS,iBAAiB,cAAc,KAAK,mBAAmB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM;AAAA,EAC/F;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,OAAO;AACZ,SAAK,QAAQ,IACb,SAAS,KAAK,UAAU,IAAI,qBAAqB;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA,EAKO,UAAU;AACf,
|
|
1
|
+
{"version":3,"file":"NeonClosableUtils.es.js","sources":["../../../src/common/utils/NeonClosableUtils.ts"],"sourcesContent":["/**\n * Utility class for assisting with closing events for popup containers like modals, dropdowns, selects & drawers.\n * Detects click & touch events outside the popup element as well as escape key triggers.\n */\nexport class NeonClosableUtils {\n private readonly target: HTMLElement;\n private readonly closeCallback: () => void;\n private _open = false;\n\n /**\n * Initialise utility to listen to keyboard, mouse & touch events.\n *\n * @param target The popup <em>closable</em> element.\n * @param closeCallback Callback function triggered when an event fires that should close the target\n * element.\n */\n public constructor(target: HTMLElement, closeCallback: () => void) {\n this.target = target;\n this.closeCallback = closeCallback;\n document.addEventListener('keydown', this.escapeKeyListener.bind(this), { passive: true });\n document.addEventListener('mousedown', this.handleOutsideClick.bind(this), { passive: true });\n document.addEventListener('touchstart', this.handleOutsideClick.bind(this), { passive: true });\n }\n\n /**\n * Inform the class that the target is now open. This adds the global <em>neon-closable--open</em> class to the\n * document body to prevent page scrolling while a popup is open.\n */\n public open() {\n this._open = true;\n document.body.classList.add('neon-closable--open');\n }\n\n /**\n * Destroy the listeners. Call this in the parent component's onUnmounted method.\n */\n public destroy() {\n this.close();\n document.removeEventListener('keydown', this.escapeKeyListener.bind(this));\n document.removeEventListener('mousedown', this.handleOutsideClick.bind(this));\n document.removeEventListener('touchstart', this.handleOutsideClick.bind(this));\n }\n\n escapeKeyListener(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.close();\n }\n }\n\n /**\n * Handle closing of the target element. This triggers the closeCallback & removes the global\n * <em>neon-closable--open</em> class from the document body.\n */\n public close() {\n this.closeCallback();\n\n if (this._open) {\n document.body.classList.remove('neon-closable--open');\n this._open = false;\n }\n }\n\n private handleOutsideClick(event: MouseEvent | TouchEvent) {\n const target = event.target && (event.target as Element);\n if (target && !this.target.contains(target)) {\n this.close();\n }\n return true;\n }\n}\n"],"names":["NeonClosableUtils","target","closeCallback","__publicField","event"],"mappings":";;;AAIO,MAAMA,EAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYtB,YAAYC,GAAqBC,GAA2B;AAXlD,IAAAC,EAAA;AACA,IAAAA,EAAA;AACT,IAAAA,EAAA,eAAQ;AAUd,SAAK,SAASF,GACd,KAAK,gBAAgBC,GACrB,SAAS,iBAAiB,WAAW,KAAK,kBAAkB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM,GACzF,SAAS,iBAAiB,aAAa,KAAK,mBAAmB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM,GAC5F,SAAS,iBAAiB,cAAc,KAAK,mBAAmB,KAAK,IAAI,GAAG,EAAE,SAAS,IAAM;AAAA,EAC/F;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,OAAO;AACZ,SAAK,QAAQ,IACb,SAAS,KAAK,UAAU,IAAI,qBAAqB;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA,EAKO,UAAU;AACf,SAAK,MAAA,GACL,SAAS,oBAAoB,WAAW,KAAK,kBAAkB,KAAK,IAAI,CAAC,GACzE,SAAS,oBAAoB,aAAa,KAAK,mBAAmB,KAAK,IAAI,CAAC,GAC5E,SAAS,oBAAoB,cAAc,KAAK,mBAAmB,KAAK,IAAI,CAAC;AAAA,EAC/E;AAAA,EAEA,kBAAkBE,GAAsB;AACtC,IAAIA,EAAM,QAAQ,YAChB,KAAK,MAAA;AAAA,EAET;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,QAAQ;AACb,SAAK,cAAA,GAED,KAAK,UACP,SAAS,KAAK,UAAU,OAAO,qBAAqB,GACpD,KAAK,QAAQ;AAAA,EAEjB;AAAA,EAEQ,mBAAmBA,GAAgC;AACzD,UAAMH,IAASG,EAAM,UAAWA,EAAM;AACtC,WAAIH,KAAU,CAAC,KAAK,OAAO,SAASA,CAAM,KACxC,KAAK,MAAA,GAEA;AAAA,EACT;AACF;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),c=require("../../../common/utils/NeonClosableUtils.cjs.js"),d=require("../../user-input/button/NeonButton.vue.cjs.js"),p=require("../../../common/enums/NeonResponsive.cjs.js"),f=e.defineComponent({name:"NeonDrawer",components:{NeonButton:d},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}},emits:["close"],setup(o,{emit:a}){const l=e.ref(null),n=e.ref(null),r=()=>{a("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,u;s?(i=n.value)==null||i.open():(u=n.value)==null||u.close()},{immediate:!0}),{modal:l,close:t}}});module.exports=f;
|
|
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';\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 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 }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value"],"mappings":"
|
|
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,CAAO,EAErF,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"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NeonClosableUtils as
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r, ref as i, onMounted as f, onUnmounted as p, watch as d } from "vue";
|
|
2
|
+
import { NeonClosableUtils as c } from "../../../common/utils/NeonClosableUtils.es.js";
|
|
3
|
+
import v from "../../user-input/button/NeonButton.vue.es.js";
|
|
4
|
+
import { NeonResponsive as b } from "../../../common/enums/NeonResponsive.es.js";
|
|
5
|
+
const C = r({
|
|
5
6
|
name: "NeonDrawer",
|
|
6
7
|
components: {
|
|
7
|
-
NeonButton:
|
|
8
|
+
NeonButton: v
|
|
8
9
|
},
|
|
9
10
|
props: {
|
|
10
11
|
/**
|
|
@@ -22,7 +23,12 @@ const B = m({
|
|
|
22
23
|
/**
|
|
23
24
|
* Keep the top nav visible when the modal is open
|
|
24
25
|
*/
|
|
25
|
-
showTopNav: { type: Boolean, default: !1 }
|
|
26
|
+
showTopNav: { type: Boolean, default: !1 },
|
|
27
|
+
/**
|
|
28
|
+
* Responsive breakpoint below which point the modal becomes fullscreen.
|
|
29
|
+
* Supports NeonResponsive.Mobile & NeonResponsive.MobileLarge.
|
|
30
|
+
*/
|
|
31
|
+
breakpoint: { type: String, default: b.Mobile }
|
|
26
32
|
},
|
|
27
33
|
emits: [
|
|
28
34
|
/**
|
|
@@ -31,31 +37,31 @@ const B = m({
|
|
|
31
37
|
*/
|
|
32
38
|
"close"
|
|
33
39
|
],
|
|
34
|
-
setup(e, { emit:
|
|
35
|
-
const
|
|
36
|
-
|
|
40
|
+
setup(e, { emit: u }) {
|
|
41
|
+
const n = i(null), o = i(null), m = () => {
|
|
42
|
+
u("close");
|
|
37
43
|
}, t = () => {
|
|
38
|
-
e.open && e.dismissible &&
|
|
44
|
+
e.open && e.dismissible && m();
|
|
39
45
|
};
|
|
40
|
-
return
|
|
41
|
-
e.dismissible && (
|
|
42
|
-
}),
|
|
43
|
-
var
|
|
44
|
-
(
|
|
46
|
+
return f(() => {
|
|
47
|
+
e.dismissible && (o.value = n.value && new c(n.value, t) || null);
|
|
48
|
+
}), p(() => {
|
|
49
|
+
var l;
|
|
50
|
+
(l = o.value) == null || l.destroy();
|
|
45
51
|
}), d(
|
|
46
52
|
() => e.open,
|
|
47
|
-
(
|
|
48
|
-
var s;
|
|
49
|
-
|
|
53
|
+
(l) => {
|
|
54
|
+
var s, a;
|
|
55
|
+
l ? (s = o.value) == null || s.open() : (a = o.value) == null || a.close();
|
|
50
56
|
},
|
|
51
57
|
{ immediate: !0 }
|
|
52
58
|
), {
|
|
53
|
-
modal:
|
|
59
|
+
modal: n,
|
|
54
60
|
close: t
|
|
55
61
|
};
|
|
56
62
|
}
|
|
57
63
|
});
|
|
58
64
|
export {
|
|
59
|
-
|
|
65
|
+
C as default
|
|
60
66
|
};
|
|
61
67
|
//# sourceMappingURL=NeonModal.es.js.map
|
|
@@ -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';\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 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 }\n },\n { immediate: true },\n );\n\n return {\n modal,\n close,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","props","emit","modal","ref","closableUtils","onClose","close","onMounted","NeonClosableUtils","onUnmounted","_a","watch","value"],"mappings":"
|
|
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,EAAO;AAAA,EAErF,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 a(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--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 s=t(l,[["render",a]]);module.exports=s;
|
|
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 :class=\"{ 'neon-modal--open': open }\" class=\"neon-modal\" role=\"dialog\">\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","_normalizeClass","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button"],"mappings":"uIAES,IAAI,QAAQ,MAAM,gHADzBA,EAAAA,mBAqBM,MAAA,CArBA,MAAKC,EAAAA,eAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"NeonModal.vue.cjs.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div :class=\"[{ 'neon-modal--open': open }, `neon-modal--breakpoint-${breakpoint}`]\" class=\"neon-modal\" role=\"dialog\">\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","_normalizeClass","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button"],"mappings":"uIAES,IAAI,QAAQ,MAAM,gHADzBA,EAAAA,mBAqBM,MAAA,CArBA,MAAKC,EAAAA,eAAA,CAAA,CAAA,CAAA,mBAAyBC,EAAA,IAAI,EAAA,0BAA8BA,EAAA,UAAU,IAAW,YAAY,CAAA,EAAC,KAAK,WAC3GC,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,MAAKF,EAAAA,eAAA,CAAA,CAAA,8BAAmCC,EAAA,OAAM,oCAAuCA,EAAA,UAAU,EAC1F,qBAAqB,CAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as r, openBlock as e, createElementBlock as s, normalizeClass as n, createElementVNode as l, renderSlot as c, createBlock as d, createCommentVNode as
|
|
3
|
-
import
|
|
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 c, createBlock as d, createCommentVNode as i } from "vue";
|
|
3
|
+
import m from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
4
|
const p = {
|
|
5
5
|
ref: "modal",
|
|
6
6
|
class: "neon-modal__container"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
const
|
|
8
|
+
function u(o, _, f, v, k, b) {
|
|
9
|
+
const a = r("neon-button");
|
|
10
10
|
return e(), s("div", {
|
|
11
|
-
class: n([{ "neon-modal--open": o.open }, "neon-modal"]),
|
|
11
|
+
class: n([[{ "neon-modal--open": o.open }, `neon-modal--breakpoint-${o.breakpoint}`], "neon-modal"]),
|
|
12
12
|
role: "dialog"
|
|
13
13
|
}, [
|
|
14
14
|
l("div", p, [
|
|
15
15
|
c(o.$slots, "default"),
|
|
16
|
-
o.dismissible ? (e(), d(
|
|
16
|
+
o.dismissible ? (e(), d(a, {
|
|
17
17
|
key: 0,
|
|
18
18
|
circular: !0,
|
|
19
19
|
transparent: !0,
|
|
@@ -24,14 +24,14 @@ function _(o, u, f, v, k, b) {
|
|
|
24
24
|
size: "s",
|
|
25
25
|
tabindex: "0",
|
|
26
26
|
onClick: o.close
|
|
27
|
-
}, null, 8, ["onClick"])) :
|
|
27
|
+
}, null, 8, ["onClick"])) : i("", !0)
|
|
28
28
|
], 512),
|
|
29
29
|
l("div", {
|
|
30
30
|
class: n([{ "neon-modal__overlay--opaque": o.opaque, "neon-modal__overlay--show-top-nav": o.showTopNav }, "neon-modal__overlay"])
|
|
31
31
|
}, null, 2)
|
|
32
32
|
], 2);
|
|
33
33
|
}
|
|
34
|
-
const h = /* @__PURE__ */
|
|
34
|
+
const h = /* @__PURE__ */ m(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 :class=\"{ 'neon-modal--open': open }\" class=\"neon-modal\" role=\"dialog\">\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","_normalizeClass","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button"],"mappings":";;;;EAES,KAAI;AAAA,EAAQ,OAAM;;;;cADzBA,EAqBM,OAAA;AAAA,IArBA,OAAKC,EAAA,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"NeonModal.vue.es.js","sources":["../../../../src/components/layout/modal/NeonModal.vue"],"sourcesContent":["<template>\n <div :class=\"[{ 'neon-modal--open': open }, `neon-modal--breakpoint-${breakpoint}`]\" class=\"neon-modal\" role=\"dialog\">\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","_normalizeClass","_ctx","_createElementVNode","_hoisted_1","_renderSlot","_createBlock","_component_neon_button"],"mappings":";;;;EAES,KAAI;AAAA,EAAQ,OAAM;;;;cADzBA,EAqBM,OAAA;AAAA,IArBA,OAAKC,EAAA,CAAA,CAAA,EAAA,oBAAyBC,EAAA,KAAI,GAAA,0BAA8BA,EAAA,UAAU,KAAW,YAAY,CAAA;AAAA,IAAC,MAAK;AAAA;IAC3GC,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,OAAKF,EAAA,CAAA,EAAA,+BAAmCC,EAAA,QAAM,qCAAuCA,EAAA,WAAU,GAC1F,qBAAqB,CAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("./NeonImageCarousel.cjs.js"),e=require("vue"),c=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),d={class:"neon-image-carousel-wrapper"},m={class:"neon-image-carousel__container",tabindex:"-1"},p={ref:"carouselItems",class:"no-style neon-image-carousel__items"},g=["alt","src"],k={key:0,class:"neon-image-carousel__item-title"},v={class:"neon-image-carousel__nav",tabindex:"-1"},C=["onClickCapture"],_={key:0,class:"neon-image-carousel__label",tabindex:"-1"};function b(n,o,w,E,f,h){const l=e.resolveComponent("neon-button"),
|
|
1
|
+
"use strict";const u=require("./NeonImageCarousel.cjs.js"),e=require("vue"),c=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),d={class:"neon-image-carousel-wrapper"},m={class:"neon-image-carousel__container",tabindex:"-1"},p={ref:"carouselItems",class:"no-style neon-image-carousel__items"},g=["alt","src"],k={key:0,class:"neon-image-carousel__item-title"},v={class:"neon-image-carousel__nav",tabindex:"-1"},C=["onClickCapture"],_={key:0,class:"neon-image-carousel__label",tabindex:"-1"};function b(n,o,w,E,f,h){const l=e.resolveComponent("neon-button"),i=e.resolveComponent("neon-link"),r=e.resolveComponent("neon-stack");return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",{class:e.normalizeClass([{"neon-image-carousel--initialised":n.initialised,"neon-image-carousel--expanded":n.isExpanded},"neon-image-carousel"]),tabindex:"0",onKeydown:[o[2]||(o[2]=e.withKeys(e.withModifiers((...t)=>n.previous&&n.previous(...t),["stop","prevent"]),["left"])),o[3]||(o[3]=e.withKeys(e.withModifiers((...t)=>n.next&&n.next(...t),["stop","prevent"]),["right"])),o[4]||(o[4]=e.withKeys(t=>n.isExpanded&&n.toggleExpanded(),["esc"]))]},[e.createElementVNode("div",m,[n.isExpanded?(e.openBlock(),e.createBlock(l,{key:0,title:n.closeLabel,"button-style":"text",class:"neon-image-carousel__close",color:"low-contrast",icon:"close",size:"l",transparent:"",onClick:o[0]||(o[0]=t=>n.isExpanded&&n.toggleExpanded())},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(l,{disabled:n.currentImage===0,title:n.previousLabel,transparent:!0,"button-style":"text",class:"neon-image-carousel__previous",color:"neutral",icon:"arrow-left-1",size:"l",onClickCapture:e.withModifiers(n.previous,["stop"])},null,8,["disabled","title","onClickCapture"]),e.createElementVNode("ul",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.images,(t,s)=>(e.openBlock(),e.createElementBlock("li",{key:t.src,ref_for:!0,ref:"carouselItem",class:e.normalizeClass([{"neon-image-carousel__item--active":s===n.currentImage},"neon-image-carousel__item"])},[e.createElementVNode("img",{alt:t.alt,src:t.src,class:"neon-image-carousel__image",onClick:o[1]||(o[1]=e.withModifiers(a=>!n.isExpanded&&n.toggleExpanded(),["stop"]))},null,8,g),n.isExpanded&&t.title?(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],2))),128))],512),e.createVNode(l,{disabled:n.currentImage===n.images.length-1,title:n.nextLabel,transparent:!0,"button-style":"text",class:"neon-image-carousel__next",color:"neutral",icon:"arrow-right-1",size:"l",onClickCapture:e.withModifiers(n.next,["stop"])},null,8,["disabled","title","onClickCapture"])]),e.createVNode(r,{class:"neon-image-carousel__nav-container",gap:"s"},{default:e.withCtx(()=>[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.images,(t,s)=>(e.openBlock(),e.createBlock(i,{key:s,"aria-label":`Display image ${s+1}`,class:"neon-image-carousel__nav-item-link","no-style":"","outline-style":"none",role:"button",tabindex:"0",onKeydownCapture:[e.withKeys(e.withModifiers(a=>n.scrollTo(s),["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(a=>n.scrollTo(s),["stop","prevent"]),["space"])]},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([{"neon-image-carousel__nav-item--active":s===n.currentImage},"neon-image-carousel__nav-item"]),tabindex:"-1",onClickCapture:e.withModifiers(a=>n.scrollTo(s),["stop"])},[...o[5]||(o[5]=[e.createElementVNode("div",{class:"neon-image-carousel__nav-item-indicator"},null,-1)])],42,C)]),_:2},1032,["aria-label","onKeydownCapture"]))),128))]),n.hideLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",_,e.toDisplayString(n.imageCountLabel||`${n.images.length} ${n.images.length===1?"image":"images"}`),1))]),_:1})],34)])}const y=c(u,[["render",b]]);module.exports=y;
|
|
2
2
|
//# sourceMappingURL=NeonImageCarousel.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonImageCarousel.vue.cjs.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div class=\"neon-image-carousel-wrapper\">\n <div\n :class=\"{\n 'neon-image-carousel--initialised': initialised,\n 'neon-image-carousel--expanded': isExpanded,\n }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n @keydown.esc=\"isExpanded && toggleExpanded()\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\">\n <neon-button\n v-if=\"isExpanded\"\n :title=\"closeLabel\"\n button-style=\"text\"\n class=\"neon-image-carousel__close\"\n color=\"low-contrast\"\n icon=\"close\"\n size=\"l\"\n transparent\n @click=\"isExpanded && toggleExpanded()\"\n />\n <neon-button\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"arrow-left-1\"\n size=\"l\"\n @click.capture.stop=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img\n :alt=\"image.alt\"\n :src=\"image.src\"\n class=\"neon-image-carousel__image\"\n @click.stop=\"!isExpanded && toggleExpanded()\"\n />\n <p v-if=\"isExpanded\" class=\"neon-image-carousel__item-title\">{{ image.
|
|
1
|
+
{"version":3,"file":"NeonImageCarousel.vue.cjs.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div class=\"neon-image-carousel-wrapper\">\n <div\n :class=\"{\n 'neon-image-carousel--initialised': initialised,\n 'neon-image-carousel--expanded': isExpanded,\n }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n @keydown.esc=\"isExpanded && toggleExpanded()\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\">\n <neon-button\n v-if=\"isExpanded\"\n :title=\"closeLabel\"\n button-style=\"text\"\n class=\"neon-image-carousel__close\"\n color=\"low-contrast\"\n icon=\"close\"\n size=\"l\"\n transparent\n @click=\"isExpanded && toggleExpanded()\"\n />\n <neon-button\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"arrow-left-1\"\n size=\"l\"\n @click.capture.stop=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img\n :alt=\"image.alt\"\n :src=\"image.src\"\n class=\"neon-image-carousel__image\"\n @click.stop=\"!isExpanded && toggleExpanded()\"\n />\n <p v-if=\"isExpanded && image.title\" class=\"neon-image-carousel__item-title\">{{ image.title }}</p>\n </li>\n </ul>\n <neon-button\n :disabled=\"currentImage === images.length - 1\"\n :title=\"nextLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__next\"\n color=\"neutral\"\n icon=\"arrow-right-1\"\n size=\"l\"\n @click.capture.stop=\"next\"\n />\n </div>\n <neon-stack class=\"neon-image-carousel__nav-container\" gap=\"s\">\n <div class=\"neon-image-carousel__nav\" tabindex=\"-1\">\n <neon-link\n v-for=\"(_image, index) in images\"\n :key=\"index\"\n :aria-label=\"`Display image ${index + 1}`\"\n class=\"neon-image-carousel__nav-item-link\"\n no-style\n outline-style=\"none\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.stop.prevent.capture.enter=\"scrollTo(index)\"\n @keydown.stop.prevent.capture.space=\"scrollTo(index)\"\n >\n <div\n :class=\"{ 'neon-image-carousel__nav-item--active': index === currentImage }\"\n class=\"neon-image-carousel__nav-item\"\n tabindex=\"-1\"\n @click.capture.stop=\"scrollTo(index)\"\n >\n <div class=\"neon-image-carousel__nav-item-indicator\"></div>\n </div>\n </neon-link>\n </div>\n <span v-if=\"!hideLabel\" class=\"neon-image-carousel__label\" tabindex=\"-1\">\n {{ imageCountLabel || `${images.length} ${images.length === 1 ? 'image' : 'images'}` }}\n </span>\n </neon-stack>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonImageCarousel.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_ctx","args","_cache","_withKeys","$event","_hoisted_2","_createBlock","_component_neon_button","_createVNode","_hoisted_3","_Fragment","_renderList","image","index","_withModifiers","_hoisted_5","_toDisplayString","_component_neon_stack","_hoisted_6","_image","_component_neon_link","_hoisted_8"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import $ from "./NeonImageCarousel.es.js";
|
|
2
|
-
import { resolveComponent as m, openBlock as
|
|
2
|
+
import { resolveComponent as m, openBlock as s, createElementBlock as i, createElementVNode as l, withKeys as r, withModifiers as a, normalizeClass as p, createBlock as v, createCommentVNode as c, createVNode as g, Fragment as b, renderList as _, toDisplayString as C, withCtx as k } from "vue";
|
|
3
3
|
import E from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
4
|
const w = { class: "neon-image-carousel-wrapper" }, I = {
|
|
5
5
|
class: "neon-image-carousel__container",
|
|
@@ -20,7 +20,7 @@ const w = { class: "neon-image-carousel-wrapper" }, I = {
|
|
|
20
20
|
};
|
|
21
21
|
function T(e, n, V, D, F, M) {
|
|
22
22
|
const u = m("neon-button"), f = m("neon-link"), y = m("neon-stack");
|
|
23
|
-
return
|
|
23
|
+
return s(), i("div", w, [
|
|
24
24
|
l("div", {
|
|
25
25
|
class: p([{
|
|
26
26
|
"neon-image-carousel--initialised": e.initialised,
|
|
@@ -28,13 +28,13 @@ function T(e, n, V, D, F, M) {
|
|
|
28
28
|
}, "neon-image-carousel"]),
|
|
29
29
|
tabindex: "0",
|
|
30
30
|
onKeydown: [
|
|
31
|
-
n[2] || (n[2] = r(
|
|
32
|
-
n[3] || (n[3] = r(
|
|
31
|
+
n[2] || (n[2] = r(a((...o) => e.previous && e.previous(...o), ["stop", "prevent"]), ["left"])),
|
|
32
|
+
n[3] || (n[3] = r(a((...o) => e.next && e.next(...o), ["stop", "prevent"]), ["right"])),
|
|
33
33
|
n[4] || (n[4] = r((o) => e.isExpanded && e.toggleExpanded(), ["esc"]))
|
|
34
34
|
]
|
|
35
35
|
}, [
|
|
36
36
|
l("div", I, [
|
|
37
|
-
e.isExpanded ? (
|
|
37
|
+
e.isExpanded ? (s(), v(u, {
|
|
38
38
|
key: 0,
|
|
39
39
|
title: e.closeLabel,
|
|
40
40
|
"button-style": "text",
|
|
@@ -54,10 +54,10 @@ function T(e, n, V, D, F, M) {
|
|
|
54
54
|
color: "neutral",
|
|
55
55
|
icon: "arrow-left-1",
|
|
56
56
|
size: "l",
|
|
57
|
-
onClickCapture:
|
|
57
|
+
onClickCapture: a(e.previous, ["stop"])
|
|
58
58
|
}, null, 8, ["disabled", "title", "onClickCapture"]),
|
|
59
59
|
l("ul", h, [
|
|
60
|
-
(
|
|
60
|
+
(s(!0), i(b, null, _(e.images, (o, t) => (s(), i("li", {
|
|
61
61
|
key: o.src,
|
|
62
62
|
ref_for: !0,
|
|
63
63
|
ref: "carouselItem",
|
|
@@ -67,9 +67,9 @@ function T(e, n, V, D, F, M) {
|
|
|
67
67
|
alt: o.alt,
|
|
68
68
|
src: o.src,
|
|
69
69
|
class: "neon-image-carousel__image",
|
|
70
|
-
onClick: n[1] || (n[1] =
|
|
70
|
+
onClick: n[1] || (n[1] = a((d) => !e.isExpanded && e.toggleExpanded(), ["stop"]))
|
|
71
71
|
}, null, 8, L),
|
|
72
|
-
e.isExpanded ? (
|
|
72
|
+
e.isExpanded && o.title ? (s(), i("p", z, C(o.title), 1)) : c("", !0)
|
|
73
73
|
], 2))), 128))
|
|
74
74
|
], 512),
|
|
75
75
|
g(u, {
|
|
@@ -81,7 +81,7 @@ function T(e, n, V, D, F, M) {
|
|
|
81
81
|
color: "neutral",
|
|
82
82
|
icon: "arrow-right-1",
|
|
83
83
|
size: "l",
|
|
84
|
-
onClickCapture:
|
|
84
|
+
onClickCapture: a(e.next, ["stop"])
|
|
85
85
|
}, null, 8, ["disabled", "title", "onClickCapture"])
|
|
86
86
|
]),
|
|
87
87
|
g(y, {
|
|
@@ -90,7 +90,7 @@ function T(e, n, V, D, F, M) {
|
|
|
90
90
|
}, {
|
|
91
91
|
default: k(() => [
|
|
92
92
|
l("div", K, [
|
|
93
|
-
(
|
|
93
|
+
(s(!0), i(b, null, _(e.images, (o, t) => (s(), v(f, {
|
|
94
94
|
key: t,
|
|
95
95
|
"aria-label": `Display image ${t + 1}`,
|
|
96
96
|
class: "neon-image-carousel__nav-item-link",
|
|
@@ -99,15 +99,15 @@ function T(e, n, V, D, F, M) {
|
|
|
99
99
|
role: "button",
|
|
100
100
|
tabindex: "0",
|
|
101
101
|
onKeydownCapture: [
|
|
102
|
-
r(
|
|
103
|
-
r(
|
|
102
|
+
r(a((d) => e.scrollTo(t), ["stop", "prevent"]), ["enter"]),
|
|
103
|
+
r(a((d) => e.scrollTo(t), ["stop", "prevent"]), ["space"])
|
|
104
104
|
]
|
|
105
105
|
}, {
|
|
106
106
|
default: k(() => [
|
|
107
107
|
l("div", {
|
|
108
108
|
class: p([{ "neon-image-carousel__nav-item--active": t === e.currentImage }, "neon-image-carousel__nav-item"]),
|
|
109
109
|
tabindex: "-1",
|
|
110
|
-
onClickCapture:
|
|
110
|
+
onClickCapture: a((d) => e.scrollTo(t), ["stop"])
|
|
111
111
|
}, [...n[5] || (n[5] = [
|
|
112
112
|
l("div", { class: "neon-image-carousel__nav-item-indicator" }, null, -1)
|
|
113
113
|
])], 42, N)
|
|
@@ -115,7 +115,7 @@ function T(e, n, V, D, F, M) {
|
|
|
115
115
|
_: 2
|
|
116
116
|
}, 1032, ["aria-label", "onKeydownCapture"]))), 128))
|
|
117
117
|
]),
|
|
118
|
-
e.hideLabel ? c("", !0) : (
|
|
118
|
+
e.hideLabel ? c("", !0) : (s(), i("span", B, C(e.imageCountLabel || `${e.images.length} ${e.images.length === 1 ? "image" : "images"}`), 1))
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
121
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonImageCarousel.vue.es.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div class=\"neon-image-carousel-wrapper\">\n <div\n :class=\"{\n 'neon-image-carousel--initialised': initialised,\n 'neon-image-carousel--expanded': isExpanded,\n }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n @keydown.esc=\"isExpanded && toggleExpanded()\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\">\n <neon-button\n v-if=\"isExpanded\"\n :title=\"closeLabel\"\n button-style=\"text\"\n class=\"neon-image-carousel__close\"\n color=\"low-contrast\"\n icon=\"close\"\n size=\"l\"\n transparent\n @click=\"isExpanded && toggleExpanded()\"\n />\n <neon-button\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"arrow-left-1\"\n size=\"l\"\n @click.capture.stop=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img\n :alt=\"image.alt\"\n :src=\"image.src\"\n class=\"neon-image-carousel__image\"\n @click.stop=\"!isExpanded && toggleExpanded()\"\n />\n <p v-if=\"isExpanded\" class=\"neon-image-carousel__item-title\">{{ image.
|
|
1
|
+
{"version":3,"file":"NeonImageCarousel.vue.es.js","sources":["../../../../src/components/presentation/image-carousel/NeonImageCarousel.vue"],"sourcesContent":["<template>\n <div class=\"neon-image-carousel-wrapper\">\n <div\n :class=\"{\n 'neon-image-carousel--initialised': initialised,\n 'neon-image-carousel--expanded': isExpanded,\n }\"\n class=\"neon-image-carousel\"\n tabindex=\"0\"\n @keydown.stop.prevent.left=\"previous\"\n @keydown.stop.prevent.right=\"next\"\n @keydown.esc=\"isExpanded && toggleExpanded()\"\n >\n <div class=\"neon-image-carousel__container\" tabindex=\"-1\">\n <neon-button\n v-if=\"isExpanded\"\n :title=\"closeLabel\"\n button-style=\"text\"\n class=\"neon-image-carousel__close\"\n color=\"low-contrast\"\n icon=\"close\"\n size=\"l\"\n transparent\n @click=\"isExpanded && toggleExpanded()\"\n />\n <neon-button\n :disabled=\"currentImage === 0\"\n :title=\"previousLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__previous\"\n color=\"neutral\"\n icon=\"arrow-left-1\"\n size=\"l\"\n @click.capture.stop=\"previous\"\n />\n <ul ref=\"carouselItems\" class=\"no-style neon-image-carousel__items\">\n <li\n v-for=\"(image, index) in images\"\n :key=\"image.src\"\n ref=\"carouselItem\"\n :class=\"{ 'neon-image-carousel__item--active': index === currentImage }\"\n class=\"neon-image-carousel__item\"\n >\n <img\n :alt=\"image.alt\"\n :src=\"image.src\"\n class=\"neon-image-carousel__image\"\n @click.stop=\"!isExpanded && toggleExpanded()\"\n />\n <p v-if=\"isExpanded && image.title\" class=\"neon-image-carousel__item-title\">{{ image.title }}</p>\n </li>\n </ul>\n <neon-button\n :disabled=\"currentImage === images.length - 1\"\n :title=\"nextLabel\"\n :transparent=\"true\"\n button-style=\"text\"\n class=\"neon-image-carousel__next\"\n color=\"neutral\"\n icon=\"arrow-right-1\"\n size=\"l\"\n @click.capture.stop=\"next\"\n />\n </div>\n <neon-stack class=\"neon-image-carousel__nav-container\" gap=\"s\">\n <div class=\"neon-image-carousel__nav\" tabindex=\"-1\">\n <neon-link\n v-for=\"(_image, index) in images\"\n :key=\"index\"\n :aria-label=\"`Display image ${index + 1}`\"\n class=\"neon-image-carousel__nav-item-link\"\n no-style\n outline-style=\"none\"\n role=\"button\"\n tabindex=\"0\"\n @keydown.stop.prevent.capture.enter=\"scrollTo(index)\"\n @keydown.stop.prevent.capture.space=\"scrollTo(index)\"\n >\n <div\n :class=\"{ 'neon-image-carousel__nav-item--active': index === currentImage }\"\n class=\"neon-image-carousel__nav-item\"\n tabindex=\"-1\"\n @click.capture.stop=\"scrollTo(index)\"\n >\n <div class=\"neon-image-carousel__nav-item-indicator\"></div>\n </div>\n </neon-link>\n </div>\n <span v-if=\"!hideLabel\" class=\"neon-image-carousel__label\" tabindex=\"-1\">\n {{ imageCountLabel || `${images.length} ${images.length === 1 ? 'image' : 'images'}` }}\n </span>\n </neon-stack>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonImageCarousel.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_ctx","args","_cache","_withKeys","$event","_hoisted_2","_createBlock","_component_neon_button","_createVNode","_hoisted_3","_Fragment","_renderList","image","index","_withModifiers","_hoisted_5","_toDisplayString","_component_neon_stack","_hoisted_6","_image","_component_neon_link","_hoisted_8"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("vue"),g=require("../../../common/enums/NeonFunctionalColor.cjs.js"),
|
|
1
|
+
"use strict";const u=require("vue"),g=require("../../../common/enums/NeonFunctionalColor.cjs.js"),S=require("../../../common/enums/NeonSize.cjs.js"),q=require("../../../common/enums/NeonInputMode.cjs.js"),F=require("../button/NeonButton.vue.cjs.js"),B=require("../field-group/NeonFieldGroup.vue.cjs.js"),p=require("../input/NeonInput.vue.cjs.js"),s=require("../../../common/utils/NeonNumberUtils.cjs.js"),x=u.defineComponent({name:"NeonNumber",components:{NeonButton:F,NeonFieldGroup:B,NeonInput:p},props:{id:{type:String,default:null},modelValue:{type:Number,default:null},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1},color:{type:String,default:g.NeonFunctionalColor.Primary},size:{type:String,default:S.NeonSize.Medium},locale:{type:String,default:null},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},spinButtons:{type:Boolean,default:!1},percentage:{type:Boolean,default:!1},decimals:{type:Number,required:!1},valueTemplate:{type:String,required:!1},inputmode:{type:String,default:q.NeonInputMode.Numeric},incrementLabel:{type:String,default:"Increment"},decrementLabel:{type:String,default:"Decrement"}},emits:["update:modelValue"],setup(e,{emit:f}){const N=u.useAttrs(),o=u.ref(!1),r=t=>{e.disabled||f("update:modelValue",t)},v=u.computed(()=>{const{onBlur:t,onFocus:n,...i}=N;return i}),V=t=>{const n=s.NeonNumberUtils.parseNumber(t),i=t!==""&&t!==null?Math.max(Math.min(n,e.max??Number.MAX_SAFE_INTEGER),e.min??Number.MIN_SAFE_INTEGER):null;(i===null||!isNaN(n))&&r(i)},l=u.computed(()=>e.decimals??(e.percentage?0:void 0)),a=u.computed(()=>e.percentage&&l.value!==void 0?l.value+2:l.value),m=u.computed(()=>{const t=e.modelValue!==null?+e.modelValue:e.min||0;return a.value!==void 0?Number(t.toFixed(a.value)):t}),b=u.computed(()=>e.modelValue!==null&&(e.valueTemplate!==void 0||l.value!==void 0||e.percentage!==void 0)?s.NeonNumberUtils.formatNumber(e.modelValue,{decimals:l.value,format:e.valueTemplate,percentage:e.percentage},e.locale):e.modelValue),c=u.computed(()=>{var t;return a.value?(t=e.modelValue)==null?void 0:t.toFixed(a.value):e.modelValue}),y=u.computed(()=>o.value?c.value?`${c.value}`:"":b.value),d=u.computed(()=>e.step??(e.percentage?.01:1));return{focus:o,sanitizedAttributes:v,computedDecimals:l,computedRawDecimals:a,computedValue:m,computedStep:d,displayValue:y,valueChanged:V,increment:()=>{const t=m.value+d.value,n=e.max!==void 0?Math.min(e.max,t):t;n!==e.modelValue&&r(n)},decrement:()=>{const t=m.value-d.value,n=e.min!==void 0?Math.max(e.min,t):t;n!==e.modelValue&&r(n)},onFocus:()=>o.value=!0,onBlur:()=>o.value=!1}}});module.exports=x;
|
|
2
2
|
//# sourceMappingURL=NeonNumber.cjs.js.map
|