@voicenter-team/voicenter-ui-plus 3.0.2 → 3.0.4

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 (57) hide show
  1. package/README.md +50 -0
  2. package/library/assets/assets/sass/main.css +1 -1
  3. package/library/components/VcPluginOverlays/VcPluginOverlays.vue.mjs +41 -0
  4. package/library/components/VcPluginOverlays/VcPluginOverlays.vue2.mjs +4 -0
  5. package/library/index.mjs +106 -102
  6. package/library/index.mjs.br +0 -0
  7. package/library/index.mjs.gz +0 -0
  8. package/library/plugin.mjs +175 -165
  9. package/library/plugin.mjs.br +0 -0
  10. package/library/plugin.mjs.gz +0 -0
  11. package/library/style.css +1 -1
  12. package/library/style.css.br +0 -0
  13. package/library/style.css.gz +0 -0
  14. package/library/types/components/VcAutocomplete/VcAutocomplete.vue.d.ts +6 -6
  15. package/library/types/components/VcButton/VcButton.vue.d.ts +1 -1
  16. package/library/types/components/VcButton/VcButtonIcon.vue.d.ts +2 -2
  17. package/library/types/components/VcButton/VcToggleButton.vue.d.ts +1 -1
  18. package/library/types/components/VcCheckbox/VcCheckbox.vue.d.ts +3 -3
  19. package/library/types/components/VcColorPicker/VcColorPicker.vue.d.ts +1 -1
  20. package/library/types/components/VcDatePicker/VcDatePicker.vue.d.ts +6 -6
  21. package/library/types/components/VcDatePickerPanel/VcDatePickerPanel.vue.d.ts +3 -3
  22. package/library/types/components/VcDropdown/VcDropdown.vue.d.ts +1 -1
  23. package/library/types/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue.d.ts +1 -1
  24. package/library/types/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue.d.ts +1 -1
  25. package/library/types/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.d.ts +2 -2
  26. package/library/types/components/VcFileUploader/VcFileUploader.vue.d.ts +1 -1
  27. package/library/types/components/VcForm/VcForm.vue.d.ts +1 -1
  28. package/library/types/components/VcHyperLink/VcHyperLink.vue.d.ts +1 -1
  29. package/library/types/components/VcImageUploader/VcImageUploader.vue.d.ts +1 -1
  30. package/library/types/components/VcInput/VcInput.vue.d.ts +1 -1
  31. package/library/types/components/VcOtpInput/VcOtpInput.vue.d.ts +1 -1
  32. package/library/types/components/VcPagination/VcPaginationButton.vue.d.ts +2 -2
  33. package/library/types/components/VcPhoneInput/VcPhoneInput.vue.d.ts +1 -1
  34. package/library/types/components/VcPluginOverlays/VcPluginOverlays.vue.d.ts +29 -0
  35. package/library/types/components/VcPopover/VcConfirmPopover.vue.d.ts +1 -1
  36. package/library/types/components/VcRadio/VcRadio.vue.d.ts +3 -3
  37. package/library/types/components/VcRadioButtons/VcRadioButtonsGroup.vue.d.ts +6 -6
  38. package/library/types/components/VcRadioGroup/VcRadioGroup.vue.d.ts +3 -3
  39. package/library/types/components/VcSegmented/VcSegmented.vue.d.ts +6 -6
  40. package/library/types/components/VcSelect/VcInfiniteScrollSelect.vue.d.ts +6 -6
  41. package/library/types/components/VcSelect/VcSelect.vue.d.ts +6 -6
  42. package/library/types/components/VcSelect/VcSelectGrouped.vue.d.ts +6 -6
  43. package/library/types/components/VcSplitButton/VcSplitButton.vue.d.ts +2 -2
  44. package/library/types/components/VcSwitch/VcSwitch.vue.d.ts +3 -3
  45. package/library/types/components/VcTag/VcTag.vue.d.ts +1 -1
  46. package/library/types/components/VcTagInput/VcTagInput.vue.d.ts +3 -3
  47. package/library/types/components/VcTimeInput/VcTimeInput.vue.d.ts +1 -1
  48. package/library/types/components/VcTree/VcTree.vue.d.ts +6 -6
  49. package/library/types/components/VcTree/VcTreeSelect.vue.d.ts +6 -6
  50. package/library/types/enum/icons.d.ts +5841 -0
  51. package/library/types/index.d.ts +2 -0
  52. package/library/types/types/Entry.types.d.ts +15 -0
  53. package/library/types/types/Overlay.types.d.ts +15 -0
  54. package/library/types/types/index.d.ts +1 -0
  55. package/library/types/utils/mountPluginOverlays.d.ts +10 -0
  56. package/library/utils/mountPluginOverlays.mjs +24 -0
  57. package/package.json +1 -1
@@ -59,6 +59,7 @@ export { default as VcProgress } from './components/VcProgress/VcProgress.vue';
59
59
  export { default as VcProgressCircular } from './components/VcProgress/VcProgressCircular.vue';
60
60
  export { default as VcSkeletonLoader } from './components/VcSkeletonLoader/VcSkeletonLoader.vue';
61
61
  export { default as VcNotification } from './components/VcNotification/VcNotification.vue';
62
+ export { default as VcPluginOverlays } from './components/VcPluginOverlays/VcPluginOverlays.vue';
62
63
  export { default as VcForm } from './components/VcForm/VcForm.vue';
63
64
  export { default as VcFormItem } from './components/VcForm/VcFormItem.vue';
64
65
  export { default as VcSplitButton } from './components/VcSplitButton/VcSplitButton.vue';
@@ -81,6 +82,7 @@ export { default as allCountries } from './enum/countries';
81
82
  export type { CountryDataType } from './enum/countries';
82
83
  export { VcIconList } from './enum/icons';
83
84
  export { default as makeDataTestAttributeValue } from './utils/makeDataTestAttributeValue';
85
+ export { mountPluginOverlays } from './utils/mountPluginOverlays';
84
86
  export { convertToUnit, resolveFieldData, getRefElement, getFileSize } from './utils/helpers';
85
87
  export { default as UniqueComponentId } from './utils/UniqueComponentId';
86
88
  export { default as useInputColor } from './composables/input/useInputColor';
@@ -1,5 +1,6 @@
1
1
  import { LanguageType } from '../localization/Localization.types';
2
2
  import { UIThemeConfig } from '../theme/theme.types';
3
+ import type { OverlayNotificationsConfig } from './Overlay.types';
3
4
  export declare type UIConfig = {
4
5
  lang?: LanguageType;
5
6
  themeConfig?: UIThemeConfig;
@@ -10,4 +11,18 @@ export declare type UIConfig = {
10
11
  * Defaults to `false`.
11
12
  */
12
13
  injectIconFont?: boolean;
14
+ /**
15
+ * When `true` (default), plugin install mounts {@link VcPluginOverlays} into
16
+ * `document.body` so `useConfirmModal`, `useConfirmPopup`, and toast
17
+ * notifications work without adding overlay components to App.vue.
18
+ * Set to `false` if you mount `<VcPluginOverlays />` yourself.
19
+ */
20
+ mountOverlays?: boolean;
21
+ /**
22
+ * Notification hosts inside auto-mounted `VcPluginOverlays`.
23
+ * - `'default'` — one top-right container (default)
24
+ * - `'none'` — no notification host; add your own `<VcNotification />` in App.vue
25
+ * - array — multiple `{ group, position }` hosts (pass matching `group` in `$notify.add`)
26
+ */
27
+ overlayNotifications?: OverlayNotificationsConfig;
13
28
  };
@@ -0,0 +1,15 @@
1
+ import type { ToastPositionType } from './VcNotification.types';
2
+ export type OverlayNotificationHost = {
3
+ group?: string;
4
+ position?: ToastPositionType;
5
+ };
6
+ /**
7
+ * Controls which `VcNotification` hosts are rendered inside `VcPluginOverlays`.
8
+ * - `'default'` — single container (top-right, ungrouped messages)
9
+ * - `'none'` — skip notifications; mount your own `<VcNotification />` in App.vue
10
+ * - `OverlayNotificationHost[]` — multiple positioned/grouped containers
11
+ */
12
+ export type OverlayNotificationsConfig = 'default' | 'none' | OverlayNotificationHost[];
13
+ export type VcPluginOverlaysProps = {
14
+ notifications?: OverlayNotificationsConfig;
15
+ };
@@ -50,3 +50,4 @@ export * from './Tabs';
50
50
  export * from './VcEditableTabs.types';
51
51
  export * from './VcSipFlow.types';
52
52
  export * from './VcTour.types';
53
+ export * from './Overlay.types';
@@ -0,0 +1,10 @@
1
+ import type { App, Component } from 'vue';
2
+ /**
3
+ * Mounts singleton overlay components (confirm modal/popover, notifications)
4
+ * into `document.body` with the consumer app's context so globally registered
5
+ * components, directives, i18n, and provide/inject all resolve correctly.
6
+ *
7
+ * Plugin mode calls this automatically. Tree-shake consumers can either mount
8
+ * `<VcPluginOverlays />` in App.vue or call this helper after `createApp`.
9
+ */
10
+ export declare function mountPluginOverlays(app: App, component: Component, props?: Record<string, unknown>): () => void;
@@ -0,0 +1,24 @@
1
+ import { createVNode, render } from "vue";
2
+ const HOST_ATTR = "data-vc-plugin-overlays";
3
+ function mountPluginOverlays(app, component, props) {
4
+ if (typeof document === "undefined") {
5
+ return () => {
6
+ };
7
+ }
8
+ let container = document.querySelector(`[${HOST_ATTR}]`);
9
+ if (!container) {
10
+ container = document.createElement("div");
11
+ container.setAttribute(HOST_ATTR, "");
12
+ document.body.appendChild(container);
13
+ }
14
+ const vnode = createVNode(component, props);
15
+ vnode.appContext = app._context;
16
+ render(vnode, container);
17
+ return () => {
18
+ render(null, container);
19
+ container.remove();
20
+ };
21
+ }
22
+ export {
23
+ mountPluginOverlays
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicenter-team/voicenter-ui-plus",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",