@bitrix24/b24ui-nuxt 0.3.3 → 0.3.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 (35) hide show
  1. package/.nuxt/b24ui/container.ts +1 -1
  2. package/.nuxt/b24ui/index.ts +1 -0
  3. package/.nuxt/b24ui/slideover.ts +101 -0
  4. package/dist/meta.cjs +467 -4
  5. package/dist/meta.d.cts +467 -4
  6. package/dist/meta.d.mts +467 -4
  7. package/dist/meta.d.ts +467 -4
  8. package/dist/meta.mjs +467 -4
  9. package/dist/module.cjs +1 -2
  10. package/dist/module.json +1 -1
  11. package/dist/module.mjs +1 -2
  12. package/dist/runtime/components/App.vue +3 -4
  13. package/dist/runtime/components/Modal.vue +4 -2
  14. package/dist/runtime/components/OverlayProvider.vue +29 -0
  15. package/dist/runtime/components/Slideover.vue +193 -0
  16. package/dist/runtime/composables/useOverlay.d.ts +30 -0
  17. package/dist/runtime/composables/useOverlay.js +71 -0
  18. package/dist/runtime/types/index.d.ts +1 -0
  19. package/dist/runtime/types/index.js +1 -0
  20. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  21. package/dist/runtime/vue/composables/useAppConfig.js +2 -0
  22. package/dist/runtime/vue/stubs.d.ts +10 -0
  23. package/dist/runtime/vue/stubs.js +22 -0
  24. package/dist/shared/{b24ui-nuxt.ngV6AJEg.cjs → b24ui-nuxt.BpFAFOHo.cjs} +120 -1
  25. package/dist/shared/{b24ui-nuxt.BTln9cW-.mjs → b24ui-nuxt.BqTJ-9uP.mjs} +120 -1
  26. package/dist/unplugin.cjs +3 -3
  27. package/dist/unplugin.mjs +3 -3
  28. package/dist/vite.cjs +1 -1
  29. package/dist/vite.mjs +1 -1
  30. package/package.json +1 -1
  31. package/dist/runtime/components/ModalProvider.vue +0 -12
  32. package/dist/runtime/composables/useModal.d.ts +0 -17
  33. package/dist/runtime/composables/useModal.js +0 -46
  34. package/dist/runtime/plugins/modal.d.ts +0 -2
  35. package/dist/runtime/plugins/modal.js +0 -10
package/dist/unplugin.mjs CHANGED
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.BTln9cW-.mjs';
6
+ import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.BqTJ-9uP.mjs';
7
7
  import { globSync } from 'tinyglobby';
8
8
  import { genSafeVariableName } from 'knitwork';
9
9
  import MagicString from 'magic-string';
@@ -184,7 +184,7 @@ function Bitrix24EnvironmentPlugin() {
184
184
  function AutoImportPlugin(options, meta) {
185
185
  const pluginOptions = defu(options.autoImport, {
186
186
  dts: options.dts ?? true,
187
- dirs: [join(runtimeDir, "composables")]
187
+ dirs: [join(runtimeDir, "composables"), join(runtimeDir, "vue/composables")]
188
188
  });
189
189
  return AutoImport.raw(pluginOptions, meta);
190
190
  }
@@ -192,7 +192,7 @@ function AutoImportPlugin(options, meta) {
192
192
  const runtimeDir = normalize(fileURLToPath(new URL("./runtime", import.meta.url)));
193
193
  const Bitrix24UIPlugin = createUnplugin((_options = {}, meta) => {
194
194
  const options = defu(_options, { devtools: { enabled: false } }, defaultOptions);
195
- const appConfig = defu({ b24ui: options.b24ui }, { b24ui: getDefaultUiConfig() });
195
+ const appConfig = defu({ b24ui: options.b24ui, colorMode: options.colorMode }, { b24ui: getDefaultUiConfig() });
196
196
  return [
197
197
  Bitrix24EnvironmentPlugin(),
198
198
  ComponentImportPlugin(options, meta),
package/dist/vite.cjs CHANGED
@@ -6,7 +6,7 @@ require('pathe');
6
6
  require('unplugin');
7
7
  require('defu');
8
8
  require('@tailwindcss/vite');
9
- require('./shared/b24ui-nuxt.ngV6AJEg.cjs');
9
+ require('./shared/b24ui-nuxt.BpFAFOHo.cjs');
10
10
  require('scule');
11
11
  require('@nuxt/kit');
12
12
  require('tinyglobby');
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/b24ui-nuxt.BTln9cW-.mjs';
7
+ import './shared/b24ui-nuxt.BqTJ-9uP.mjs';
8
8
  import 'scule';
9
9
  import '@nuxt/kit';
10
10
  import 'tinyglobby';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrix24/b24ui-nuxt",
3
3
  "description": "Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE",
4
- "version": "0.3.3",
4
+ "version": "0.3.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/bitrix24/b24ui.git"
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- import { inject } from 'vue'
3
- import { useModal, modalInjectionKey } from '../composables/useModal'
4
-
5
- const modalState = inject(modalInjectionKey)
6
-
7
- const { isOpen } = useModal()
8
- </script>
9
-
10
- <template>
11
- <component :is="modalState.component" v-if="modalState" v-bind="modalState.props" v-model:open="isOpen" />
12
- </template>
@@ -1,17 +0,0 @@
1
- import type { ShallowRef, Component, InjectionKey } from 'vue';
2
- import type { ComponentProps } from 'vue-component-type-helpers';
3
- import type { ModalProps } from '../types';
4
- export interface ModalState {
5
- component: Component | string;
6
- props: ModalProps;
7
- }
8
- export declare const modalInjectionKey: InjectionKey<ShallowRef<ModalState>>;
9
- declare function _useModal(): {
10
- open: <T extends Component>(component: T, props?: ModalProps & ComponentProps<T>) => void;
11
- close: () => Promise<void>;
12
- reset: () => void;
13
- patch: <T extends Component = Record<string, never>>(props: Partial<ModalProps & ComponentProps<T>>) => void;
14
- isOpen: import("vue").Ref<boolean, boolean>;
15
- };
16
- export declare const useModal: typeof _useModal;
17
- export {};
@@ -1,46 +0,0 @@
1
- import { ref, inject } from "vue";
2
- import { createSharedComposable } from "@vueuse/core";
3
- export const modalInjectionKey = Symbol("bitrix24-ui.modal");
4
- function _useModal() {
5
- const modalState = inject(modalInjectionKey);
6
- const isOpen = ref(false);
7
- function open(component, props) {
8
- if (!modalState) {
9
- throw new Error("useModal() is called without provider");
10
- }
11
- modalState.value = {
12
- component,
13
- props: props ?? {}
14
- };
15
- isOpen.value = true;
16
- }
17
- async function close() {
18
- if (!modalState) return;
19
- isOpen.value = false;
20
- }
21
- function reset() {
22
- if (!modalState) return;
23
- modalState.value = {
24
- component: "div",
25
- props: {}
26
- };
27
- }
28
- function patch(props) {
29
- if (!modalState) return;
30
- modalState.value = {
31
- ...modalState.value,
32
- props: {
33
- ...modalState.value.props,
34
- ...props
35
- }
36
- };
37
- }
38
- return {
39
- open,
40
- close,
41
- reset,
42
- patch,
43
- isOpen
44
- };
45
- }
46
- export const useModal = createSharedComposable(_useModal);
@@ -1,2 +0,0 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;
@@ -1,10 +0,0 @@
1
- import { shallowRef } from "vue";
2
- import { defineNuxtPlugin } from "#imports";
3
- import { modalInjectionKey } from "../composables/useModal.js";
4
- export default defineNuxtPlugin((nuxtApp) => {
5
- const modalState = shallowRef({
6
- component: "div",
7
- props: {}
8
- });
9
- nuxtApp.vueApp.provide(modalInjectionKey, modalState);
10
- });