@aotearoan/neon 28.0.3 → 28.1.0

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.
Files changed (62) hide show
  1. package/dist/components/feedback/alert/NeonAlert.cjs.js +1 -1
  2. package/dist/components/feedback/alert/NeonAlert.cjs.js.map +1 -1
  3. package/dist/components/feedback/alert/NeonAlert.es.js +58 -45
  4. package/dist/components/feedback/alert/NeonAlert.es.js.map +1 -1
  5. package/dist/components/feedback/alert/NeonAlert.vue.cjs.js +1 -1
  6. package/dist/components/feedback/alert/NeonAlert.vue.cjs.js.map +1 -1
  7. package/dist/components/feedback/alert/NeonAlert.vue.es.js +23 -19
  8. package/dist/components/feedback/alert/NeonAlert.vue.es.js.map +1 -1
  9. package/dist/components/feedback/alert/container/NeonDialogContainer.cjs.js +2 -0
  10. package/dist/components/feedback/alert/container/NeonDialogContainer.cjs.js.map +1 -0
  11. package/dist/components/feedback/alert/container/NeonDialogContainer.cjs2.js +2 -0
  12. package/dist/components/feedback/alert/container/NeonDialogContainer.cjs2.js.map +1 -0
  13. package/dist/components/feedback/alert/container/NeonDialogContainer.es.js +25 -0
  14. package/dist/components/feedback/alert/container/NeonDialogContainer.es.js.map +1 -0
  15. package/dist/components/feedback/alert/container/NeonDialogContainer.es2.js +25 -0
  16. package/dist/components/feedback/alert/container/NeonDialogContainer.es2.js.map +1 -0
  17. package/dist/components/feedback/alert/container/NeonDialogContainer.vue.cjs.js +2 -0
  18. package/dist/components/feedback/alert/container/NeonDialogContainer.vue.cjs.js.map +1 -0
  19. package/dist/components/feedback/alert/container/NeonDialogContainer.vue.es.js +18 -0
  20. package/dist/components/feedback/alert/container/NeonDialogContainer.vue.es.js.map +1 -0
  21. package/dist/neon.cjs.js +1 -1
  22. package/dist/neon.es.js +217 -213
  23. package/dist/neon.es.js.map +1 -1
  24. package/dist/src/components/feedback/alert/NeonAlert.d.ts +1038 -0
  25. package/dist/src/components/feedback/alert/container/NeonDialogContainer.d.ts +1021 -0
  26. package/dist/src/components/feedback/alert/container/NeonDialogContainer.vue.d.ts +2 -0
  27. package/dist/src/components/feedback/banner/NeonBanner.d.ts +2 -2
  28. package/dist/src/components/feedback/dialog/NeonDialog.d.ts +6 -6
  29. package/dist/src/components/feedback/note/NeonNote.d.ts +1 -1
  30. package/dist/src/components/layout/card-list/NeonCardList.d.ts +2 -2
  31. package/dist/src/components/layout/drawer/NeonDrawer.d.ts +1 -1
  32. package/dist/src/components/layout/modal/NeonModal.d.ts +3 -3
  33. package/dist/src/components/layout/page/NeonPage.d.ts +1045 -2
  34. package/dist/src/components/layout/swiper/NeonSwiper.d.ts +1 -1
  35. package/dist/src/components/navigation/breadcrumbs/NeonBreadcrumbs.d.ts +1 -1
  36. package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +18 -18
  37. package/dist/src/components/navigation/menu/NeonMenu.d.ts +18 -18
  38. package/dist/src/components/navigation/mobile-menu/NeonMobileMenu.d.ts +18 -18
  39. package/dist/src/components/navigation/pagination/NeonPagination.d.ts +1 -1
  40. package/dist/src/components/presentation/badge/NeonBadge.d.ts +4 -4
  41. package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +6 -6
  42. package/dist/src/components/presentation/header/NeonHeader.d.ts +1 -1
  43. package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +1 -1
  44. package/dist/src/components/presentation/tabs/NeonTabs.d.ts +1 -1
  45. package/dist/src/components/user-input/button/NeonButton.d.ts +1 -1
  46. package/dist/src/components/user-input/color/NeonColor.d.ts +1 -1
  47. package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +8 -8
  48. package/dist/src/components/user-input/file/NeonFile.d.ts +4 -4
  49. package/dist/src/components/user-input/input/NeonInput.d.ts +1 -1
  50. package/dist/src/components/user-input/number/NeonNumber.d.ts +2 -2
  51. package/dist/src/components/user-input/password/NeonPassword.d.ts +1 -1
  52. package/dist/src/components/user-input/search/NeonSearch.d.ts +21 -21
  53. package/dist/src/components/user-input/select/NeonSelect.d.ts +18 -18
  54. package/dist/src/model/feedback/dialog/NeonDialogMessage.d.ts +38 -0
  55. package/dist/src/neon.d.ts +3 -0
  56. package/dist/src/utils/feedback/dialog/NeonDialogService.d.ts +27 -0
  57. package/dist/utils/feedback/dialog/NeonDialogService.cjs.js +2 -0
  58. package/dist/utils/feedback/dialog/NeonDialogService.cjs.js.map +1 -0
  59. package/dist/utils/feedback/dialog/NeonDialogService.es.js +48 -0
  60. package/dist/utils/feedback/dialog/NeonDialogService.es.js.map +1 -0
  61. package/package.json +1 -1
  62. package/src/sass/includes/_dependencies.scss +8 -1
@@ -199,7 +199,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
199
199
  toggleOpen: () => void;
200
200
  onBlur: () => void;
201
201
  onFocus: () => void;
202
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "dropdown-placement")[], import("vue").PublicProps, {
202
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "dropdown-placement")[], import("vue").PublicProps, {
203
203
  color: NeonFunctionalColor;
204
204
  icon: string;
205
205
  label: string;
@@ -508,7 +508,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
508
508
  iconClicked: ($event: Event) => void;
509
509
  changeValue: (event: InputEvent) => void;
510
510
  onKeyDown: (event: KeyboardEvent) => void;
511
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
511
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
512
512
  color: NeonFunctionalColor;
513
513
  icon: string;
514
514
  type: import("../../../neon").NeonInputType;
@@ -823,7 +823,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
823
823
  iconClicked: ($event: Event) => void;
824
824
  changeValue: (event: InputEvent) => void;
825
825
  onKeyDown: (event: KeyboardEvent) => void;
826
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
826
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
827
827
  color: NeonFunctionalColor;
828
828
  icon: string;
829
829
  type: import("../../../neon").NeonInputType;
@@ -1332,8 +1332,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1332
1332
  disabled: boolean;
1333
1333
  href: string;
1334
1334
  size: import("../../../neon").NeonButtonSize;
1335
- outline: boolean;
1336
1335
  alternateColor: NeonFunctionalColor;
1336
+ outline: boolean;
1337
1337
  iconPosition: import("../../../neon").NeonHorizontalPosition;
1338
1338
  buttonStyle: import("../../../neon").NeonButtonStyle;
1339
1339
  buttonType: import("../../../neon").NeonButtonType;
@@ -1655,7 +1655,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1655
1655
  iconClicked: ($event: Event) => void;
1656
1656
  changeValue: (event: InputEvent) => void;
1657
1657
  onKeyDown: (event: KeyboardEvent) => void;
1658
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], "update:modelValue" | "focus" | "blur" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1658
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], "update:modelValue" | "blur" | "focus" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1659
1659
  id: {
1660
1660
  type: StringConstructor;
1661
1661
  default: null;
@@ -2179,8 +2179,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2179
2179
  disabled: boolean;
2180
2180
  href: string;
2181
2181
  size: import("../../../neon").NeonButtonSize;
2182
- outline: boolean;
2183
2182
  alternateColor: NeonFunctionalColor;
2183
+ outline: boolean;
2184
2184
  iconPosition: import("../../../neon").NeonHorizontalPosition;
2185
2185
  buttonStyle: import("../../../neon").NeonButtonStyle;
2186
2186
  buttonType: import("../../../neon").NeonButtonType;
@@ -2642,7 +2642,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2642
2642
  toggleOpen: () => void;
2643
2643
  onBlur: () => void;
2644
2644
  onFocus: () => void;
2645
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "dropdown-placement")[], import("vue").PublicProps, {
2645
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "dropdown-placement")[], import("vue").PublicProps, {
2646
2646
  color: NeonFunctionalColor;
2647
2647
  icon: string;
2648
2648
  label: string;
@@ -2951,7 +2951,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2951
2951
  iconClicked: ($event: Event) => void;
2952
2952
  changeValue: (event: InputEvent) => void;
2953
2953
  onKeyDown: (event: KeyboardEvent) => void;
2954
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
2954
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
2955
2955
  color: NeonFunctionalColor;
2956
2956
  icon: string;
2957
2957
  type: import("../../../neon").NeonInputType;
@@ -3266,7 +3266,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3266
3266
  iconClicked: ($event: Event) => void;
3267
3267
  changeValue: (event: InputEvent) => void;
3268
3268
  onKeyDown: (event: KeyboardEvent) => void;
3269
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
3269
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
3270
3270
  color: NeonFunctionalColor;
3271
3271
  icon: string;
3272
3272
  type: import("../../../neon").NeonInputType;
@@ -3775,8 +3775,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3775
3775
  disabled: boolean;
3776
3776
  href: string;
3777
3777
  size: import("../../../neon").NeonButtonSize;
3778
- outline: boolean;
3779
3778
  alternateColor: NeonFunctionalColor;
3779
+ outline: boolean;
3780
3780
  iconPosition: import("../../../neon").NeonHorizontalPosition;
3781
3781
  buttonStyle: import("../../../neon").NeonButtonStyle;
3782
3782
  buttonType: import("../../../neon").NeonButtonType;
@@ -4098,7 +4098,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4098
4098
  iconClicked: ($event: Event) => void;
4099
4099
  changeValue: (event: InputEvent) => void;
4100
4100
  onKeyDown: (event: KeyboardEvent) => void;
4101
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], "update:modelValue" | "focus" | "blur" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4101
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], "update:modelValue" | "blur" | "focus" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4102
4102
  id: {
4103
4103
  type: StringConstructor;
4104
4104
  default: null;
@@ -4622,8 +4622,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4622
4622
  disabled: boolean;
4623
4623
  href: string;
4624
4624
  size: import("../../../neon").NeonButtonSize;
4625
- outline: boolean;
4626
4625
  alternateColor: NeonFunctionalColor;
4626
+ outline: boolean;
4627
4627
  iconPosition: import("../../../neon").NeonHorizontalPosition;
4628
4628
  buttonStyle: import("../../../neon").NeonButtonStyle;
4629
4629
  buttonType: import("../../../neon").NeonButtonType;
@@ -5206,7 +5206,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
5206
5206
  toggleOpen: () => void;
5207
5207
  onBlur: () => void;
5208
5208
  onFocus: () => void;
5209
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "dropdown-placement")[], "update:modelValue" | "focus" | "blur" | "dropdown-placement", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5209
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "dropdown-placement")[], "update:modelValue" | "blur" | "focus" | "dropdown-placement", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5210
5210
  id: {
5211
5211
  type: StringConstructor;
5212
5212
  };
@@ -5583,7 +5583,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
5583
5583
  iconClicked: ($event: Event) => void;
5584
5584
  changeValue: (event: InputEvent) => void;
5585
5585
  onKeyDown: (event: KeyboardEvent) => void;
5586
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
5586
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
5587
5587
  color: NeonFunctionalColor;
5588
5588
  icon: string;
5589
5589
  type: import("../../../neon").NeonInputType;
@@ -5898,7 +5898,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
5898
5898
  iconClicked: ($event: Event) => void;
5899
5899
  changeValue: (event: InputEvent) => void;
5900
5900
  onKeyDown: (event: KeyboardEvent) => void;
5901
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], import("vue").PublicProps, {
5901
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], import("vue").PublicProps, {
5902
5902
  color: NeonFunctionalColor;
5903
5903
  icon: string;
5904
5904
  type: import("../../../neon").NeonInputType;
@@ -6407,8 +6407,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
6407
6407
  disabled: boolean;
6408
6408
  href: string;
6409
6409
  size: import("../../../neon").NeonButtonSize;
6410
- outline: boolean;
6411
6410
  alternateColor: NeonFunctionalColor;
6411
+ outline: boolean;
6412
6412
  iconPosition: import("../../../neon").NeonHorizontalPosition;
6413
6413
  buttonStyle: import("../../../neon").NeonButtonStyle;
6414
6414
  buttonType: import("../../../neon").NeonButtonType;
@@ -6730,7 +6730,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
6730
6730
  iconClicked: ($event: Event) => void;
6731
6731
  changeValue: (event: InputEvent) => void;
6732
6732
  onKeyDown: (event: KeyboardEvent) => void;
6733
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "icon-click")[], "update:modelValue" | "focus" | "blur" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6733
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus" | "icon-click")[], "update:modelValue" | "blur" | "focus" | "icon-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6734
6734
  id: {
6735
6735
  type: StringConstructor;
6736
6736
  default: null;
@@ -7254,8 +7254,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
7254
7254
  disabled: boolean;
7255
7255
  href: string;
7256
7256
  size: import("../../../neon").NeonButtonSize;
7257
- outline: boolean;
7258
7257
  alternateColor: NeonFunctionalColor;
7258
+ outline: boolean;
7259
7259
  iconPosition: import("../../../neon").NeonHorizontalPosition;
7260
7260
  buttonStyle: import("../../../neon").NeonButtonStyle;
7261
7261
  buttonType: import("../../../neon").NeonButtonType;
@@ -0,0 +1,38 @@
1
+ import type { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';
2
+ /**
3
+ * A confirmation 'Dialog' style message. These are more complex than an alert and return a promise.
4
+ */
5
+ export interface NeonDialogMessage {
6
+ /**
7
+ * The color of the button for the confirm (positive) action.
8
+ */
9
+ color?: NeonFunctionalColor;
10
+ /**
11
+ * Alternate confirm button color for creating a gradient button. NOTE: can also be the same color as 'color'.
12
+ */
13
+ alternateColor?: NeonFunctionalColor;
14
+ /**
15
+ * The label of the button for the cancel (negative) action.
16
+ */
17
+ cancelLabel?: string;
18
+ /**
19
+ * The label of the button for the confirm (positive) action.
20
+ */
21
+ confirmLabel?: string;
22
+ /**
23
+ * The dialog title
24
+ */
25
+ title: string;
26
+ /**
27
+ * The dialog question. Can be html (rendered using v-html).
28
+ */
29
+ question: string;
30
+ /**
31
+ * Whether the dialog is open.
32
+ */
33
+ open?: boolean;
34
+ /**
35
+ * Increase the opacity so that the page behind the modal is no longer visible
36
+ */
37
+ opaque?: boolean;
38
+ }
@@ -15,6 +15,7 @@ export { default as NeonChip } from './components/user-input/chip/NeonChip.vue';
15
15
  export { default as NeonColor } from './components/user-input/color/NeonColor.vue';
16
16
  export { default as NeonDatePicker } from './components/user-input/date-picker/NeonDatePicker.vue';
17
17
  export { default as NeonDialog } from './components/feedback/dialog/NeonDialog.vue';
18
+ export { default as NeonDialogContainer } from './components/feedback/alert/container/NeonDialogContainer.vue';
18
19
  export { default as NeonDrawer } from './components/layout/drawer/NeonDrawer.vue';
19
20
  export { default as NeonDropdown } from './components/presentation/dropdown/NeonDropdown.vue';
20
21
  export { default as NeonDropdownMenu } from './components/navigation/dropdown-menu/NeonDropdownMenu.vue';
@@ -89,6 +90,7 @@ export type { NeonCarouselImage } from '@/model/presentation/image-carousel/Neon
89
90
  export { NeonChipAction } from '@/model/user-input/chip/NeonChipAction';
90
91
  export type { NeonContrastAccessibility } from '@/model/common/color/NeonContrastAccessibility';
91
92
  export type { NeonDate } from '@/model/common/date/NeonDate';
93
+ export type { NeonDialogMessage } from './model/feedback/dialog/NeonDialogMessage';
92
94
  export type { NeonDropdownMenuItem } from '@/model/presentation/dropdown/NeonDropdownMenuItem';
93
95
  export { NeonDropdownPlacement } from '@/model/presentation/dropdown/NeonDropdownPlacement';
94
96
  export type { NeonDropdownPlacementObject } from '@/model/presentation/dropdown/NeonDropdownPlacementObject';
@@ -143,6 +145,7 @@ export { NeonClipboardService, NeonClipboardSupport } from '@/utils/common/clipb
143
145
  export { NeonClosableUtils } from '@/utils/common/closable/NeonClosableUtils';
144
146
  export { NeonDateUtils } from '@/utils/common/date/NeonDateUtils';
145
147
  export { NeonDebounceUtils } from '@/utils/common/debounce/NeonDebounceUtils';
148
+ export { NeonDialogService } from './utils/feedback/dialog/NeonDialogService';
146
149
  export { NeonDropdownPlacementUtils } from '@/utils/presentation/dropdown/NeonDropdownPlacementUtils';
147
150
  export { NeonEventBus } from '@/utils/common/event/NeonEventBus';
148
151
  export { fileToDataURL } from '@/utils/user-input/file/NeonFileUtils';
@@ -0,0 +1,27 @@
1
+ import type { NeonDialogMessage } from '@/model/feedback/dialog/NeonDialogMessage';
2
+ /**
3
+ * NeonDialogService is a service for invoking confirmation dialogs to the <strong>NeonAlert</strong> component for display to the
4
+ * user
5
+ */
6
+ export declare class NeonDialogService {
7
+ static readonly resolveEventKey: string;
8
+ static readonly defaultDialogMessage: NeonDialogMessage;
9
+ /**
10
+ * Show a dialog message.
11
+ *
12
+ * @param dialog the dialog message to display.
13
+ */
14
+ static show(dialog: Omit<NeonDialogMessage, 'open'>): Promise<boolean>;
15
+ /**
16
+ * Trigger a resolution of the show dialog promise.
17
+ *
18
+ * @param key boolean value to resolve the promise.
19
+ */
20
+ static resolve(key: boolean): void;
21
+ /**
22
+ * Generate an event key so that all events are published on the correct topic.
23
+ * @returns The event key for sending a message on <a href="/utils/common/event/NeonEventBus">NeonEventBus</a>.
24
+ */
25
+ static generateEventKey(): string;
26
+ private static emit;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var v=Object.defineProperty;var u=(n,e,t)=>e in n?v(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>u(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../common/event/NeonEventBus.cjs.js"),l=require("vue"),s=class s{static async show(e){return s.resolve(!1),await l.nextTick(),s.emit(e),new Promise(t=>o.NeonEventBus.on(this.resolveEventKey,r=>{t(r)}))}static resolve(e){o.NeonEventBus.emit(s.resolveEventKey,e)}static generateEventKey(){return`${o.NeonEventBus.messagePrefix}-dialog`}static emit(e){const t=s.generateEventKey();o.NeonEventBus.emit(t,e)}};i(s,"resolveEventKey",`${o.NeonEventBus.messagePrefix}-dialog-resolve`),i(s,"defaultDialogMessage",{open:!1,title:"",question:""});let a=s;exports.NeonDialogService=a;
2
+ //# sourceMappingURL=NeonDialogService.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeonDialogService.cjs.js","sources":["../../../../src/utils/feedback/dialog/NeonDialogService.ts"],"sourcesContent":["import type { NeonDialogMessage } from '@/model/feedback/dialog/NeonDialogMessage';\nimport { NeonEventBus } from '@/utils/common/event/NeonEventBus';\nimport { nextTick } from 'vue';\n\n/**\n * NeonDialogService is a service for invoking confirmation dialogs to the <strong>NeonAlert</strong> component for display to the\n * user\n */\nexport class NeonDialogService {\n public static readonly resolveEventKey = `${NeonEventBus.messagePrefix}-dialog-resolve`;\n\n public static readonly defaultDialogMessage: NeonDialogMessage = {\n open: false,\n title: '',\n question: '',\n };\n\n /**\n * Show a dialog message.\n *\n * @param dialog the dialog message to display.\n */\n public static async show(dialog: Omit<NeonDialogMessage, 'open'>): Promise<boolean> {\n NeonDialogService.resolve(false);\n await nextTick();\n NeonDialogService.emit(dialog);\n return new Promise((resolve) =>\n NeonEventBus.on(this.resolveEventKey, (key: boolean) => {\n resolve(key);\n }),\n );\n }\n\n /**\n * Trigger a resolution of the show dialog promise.\n *\n * @param key boolean value to resolve the promise.\n */\n public static resolve(key: boolean) {\n NeonEventBus.emit(NeonDialogService.resolveEventKey, key);\n }\n\n /**\n * Generate an event key so that all events are published on the correct topic.\n * @returns The event key for sending a message on <a href=\"/utils/common/event/NeonEventBus\">NeonEventBus</a>.\n */\n public static generateEventKey() {\n return `${NeonEventBus.messagePrefix}-dialog`;\n }\n\n private static emit(message: NeonDialogMessage) {\n const eventKey = NeonDialogService.generateEventKey();\n NeonEventBus.emit(eventKey, message);\n }\n}\n"],"names":["_NeonDialogService","dialog","nextTick","resolve","NeonEventBus","key","message","eventKey","__publicField","NeonDialogService"],"mappings":"+TAQaA,EAAN,MAAMA,CAAkB,CAc7B,aAAoB,KAAKC,EAA2D,CAClF,OAAAD,EAAkB,QAAQ,EAAK,EAC/B,MAAME,WAAA,EACNF,EAAkB,KAAKC,CAAM,EACtB,IAAI,QAASE,GAClBC,EAAAA,aAAa,GAAG,KAAK,gBAAkBC,GAAiB,CACtDF,EAAQE,CAAG,CACb,CAAC,CAAA,CAEL,CAOA,OAAc,QAAQA,EAAc,CAClCD,EAAAA,aAAa,KAAKJ,EAAkB,gBAAiBK,CAAG,CAC1D,CAMA,OAAc,kBAAmB,CAC/B,MAAO,GAAGD,EAAAA,aAAa,aAAa,SACtC,CAEA,OAAe,KAAKE,EAA4B,CAC9C,MAAMC,EAAWP,EAAkB,iBAAA,EACnCI,eAAa,KAAKG,EAAUD,CAAO,CACrC,CACF,EA7CEE,EADWR,EACY,kBAAkB,GAAGI,eAAa,aAAa,mBAEtEI,EAHWR,EAGY,uBAA0C,CAC/D,KAAM,GACN,MAAO,GACP,SAAU,EAAA,GANP,IAAMS,EAANT"}
@@ -0,0 +1,48 @@
1
+ var l = Object.defineProperty;
2
+ var m = (a, e, t) => e in a ? l(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var r = (a, e, t) => m(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { NeonEventBus as i } from "../../common/event/NeonEventBus.es.js";
5
+ import { nextTick as v } from "vue";
6
+ const s = class s {
7
+ /**
8
+ * Show a dialog message.
9
+ *
10
+ * @param dialog the dialog message to display.
11
+ */
12
+ static async show(e) {
13
+ return s.resolve(!1), await v(), s.emit(e), new Promise(
14
+ (t) => i.on(this.resolveEventKey, (o) => {
15
+ t(o);
16
+ })
17
+ );
18
+ }
19
+ /**
20
+ * Trigger a resolution of the show dialog promise.
21
+ *
22
+ * @param key boolean value to resolve the promise.
23
+ */
24
+ static resolve(e) {
25
+ i.emit(s.resolveEventKey, e);
26
+ }
27
+ /**
28
+ * Generate an event key so that all events are published on the correct topic.
29
+ * @returns The event key for sending a message on <a href="/utils/common/event/NeonEventBus">NeonEventBus</a>.
30
+ */
31
+ static generateEventKey() {
32
+ return `${i.messagePrefix}-dialog`;
33
+ }
34
+ static emit(e) {
35
+ const t = s.generateEventKey();
36
+ i.emit(t, e);
37
+ }
38
+ };
39
+ r(s, "resolveEventKey", `${i.messagePrefix}-dialog-resolve`), r(s, "defaultDialogMessage", {
40
+ open: !1,
41
+ title: "",
42
+ question: ""
43
+ });
44
+ let n = s;
45
+ export {
46
+ n as NeonDialogService
47
+ };
48
+ //# sourceMappingURL=NeonDialogService.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeonDialogService.es.js","sources":["../../../../src/utils/feedback/dialog/NeonDialogService.ts"],"sourcesContent":["import type { NeonDialogMessage } from '@/model/feedback/dialog/NeonDialogMessage';\nimport { NeonEventBus } from '@/utils/common/event/NeonEventBus';\nimport { nextTick } from 'vue';\n\n/**\n * NeonDialogService is a service for invoking confirmation dialogs to the <strong>NeonAlert</strong> component for display to the\n * user\n */\nexport class NeonDialogService {\n public static readonly resolveEventKey = `${NeonEventBus.messagePrefix}-dialog-resolve`;\n\n public static readonly defaultDialogMessage: NeonDialogMessage = {\n open: false,\n title: '',\n question: '',\n };\n\n /**\n * Show a dialog message.\n *\n * @param dialog the dialog message to display.\n */\n public static async show(dialog: Omit<NeonDialogMessage, 'open'>): Promise<boolean> {\n NeonDialogService.resolve(false);\n await nextTick();\n NeonDialogService.emit(dialog);\n return new Promise((resolve) =>\n NeonEventBus.on(this.resolveEventKey, (key: boolean) => {\n resolve(key);\n }),\n );\n }\n\n /**\n * Trigger a resolution of the show dialog promise.\n *\n * @param key boolean value to resolve the promise.\n */\n public static resolve(key: boolean) {\n NeonEventBus.emit(NeonDialogService.resolveEventKey, key);\n }\n\n /**\n * Generate an event key so that all events are published on the correct topic.\n * @returns The event key for sending a message on <a href=\"/utils/common/event/NeonEventBus\">NeonEventBus</a>.\n */\n public static generateEventKey() {\n return `${NeonEventBus.messagePrefix}-dialog`;\n }\n\n private static emit(message: NeonDialogMessage) {\n const eventKey = NeonDialogService.generateEventKey();\n NeonEventBus.emit(eventKey, message);\n }\n}\n"],"names":["_NeonDialogService","dialog","nextTick","resolve","NeonEventBus","key","message","eventKey","__publicField","NeonDialogService"],"mappings":";;;;;AAQO,MAAMA,IAAN,MAAMA,EAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAc7B,aAAoB,KAAKC,GAA2D;AAClF,WAAAD,EAAkB,QAAQ,EAAK,GAC/B,MAAME,EAAA,GACNF,EAAkB,KAAKC,CAAM,GACtB,IAAI;AAAA,MAAQ,CAACE,MAClBC,EAAa,GAAG,KAAK,iBAAiB,CAACC,MAAiB;AACtD,QAAAF,EAAQE,CAAG;AAAA,MACb,CAAC;AAAA,IAAA;AAAA,EAEL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAc,QAAQA,GAAc;AAClC,IAAAD,EAAa,KAAKJ,EAAkB,iBAAiBK,CAAG;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAc,mBAAmB;AAC/B,WAAO,GAAGD,EAAa,aAAa;AAAA,EACtC;AAAA,EAEA,OAAe,KAAKE,GAA4B;AAC9C,UAAMC,IAAWP,EAAkB,iBAAA;AACnC,IAAAI,EAAa,KAAKG,GAAUD,CAAO;AAAA,EACrC;AACF;AA7CEE,EADWR,GACY,mBAAkB,GAAGI,EAAa,aAAa,oBAEtEI,EAHWR,GAGY,wBAA0C;AAAA,EAC/D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA;AANP,IAAMS,IAANT;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aotearoan/neon",
3
3
  "description": "Neon is a lightweight design library of Vue 3 components with minimal dependencies.",
4
- "version": "28.0.3",
4
+ "version": "28.1.0",
5
5
  "main": "./dist/neon.cjs.js",
6
6
  "module": "./dist/neon.es.js",
7
7
  "types": "./dist/src/neon.d.ts",
@@ -5,7 +5,7 @@
5
5
  $neon-component-dependencies: (
6
6
  NeonActionMenu: [NeonLink,
7
7
  NeonIcon],
8
- NeonAlert: [NeonToastContainer, NeonIcon, NeonLink],
8
+ NeonAlert: [NeonToastContainer, NeonIcon, NeonLink, NeonDialogContainer],
9
9
  NeonAnchor: [],
10
10
  NeonBadge: [NeonIcon, NeonFile, NeonButton, NeonInput, NeonList, NeonExpansionIndicator, NeonIcon, NeonLink],
11
11
  NeonButton: [NeonExpansionIndicator,
@@ -109,6 +109,13 @@
109
109
  NeonTab: [],
110
110
  NeonTabs: [NeonIcon, NeonSwiper, NeonLink],
111
111
  NeonToastContainer: [NeonIcon],
112
+ NeonDialogContainer: [NeonDialog, NeonButton,
113
+ NeonCard,
114
+ NeonCardBody,
115
+ NeonModal,
116
+ NeonExpansionIndicator,
117
+ NeonIcon,
118
+ NeonLink],
112
119
  NeonToggle: [NeonIcon],
113
120
  NeonToggleChip: [NeonIcon],
114
121
  NeonTooltip: [],