@bitrix24/b24ui-nuxt 0.5.5 → 0.5.7

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.
@@ -1,4 +1,5 @@
1
- import { ref } from "vue";
1
+ import { ref, onScopeDispose } from "vue";
2
+ import { createHooks } from "hookable";
2
3
  import appConfig from "#build/app.config";
3
4
  import { useColorMode as useColorModeVueUse } from "@vueuse/core";
4
5
  export { useHead } from "@unhead/vue";
@@ -52,12 +53,20 @@ export const useState = (key, init) => {
52
53
  state[key] = value;
53
54
  return value;
54
55
  };
56
+ const hooks = createHooks();
55
57
  export function useNuxtApp() {
56
58
  return {
57
59
  isHydrating: true,
58
- payload: { serverRendered: false }
60
+ payload: { serverRendered: false },
61
+ hooks,
62
+ hook: hooks.hook
59
63
  };
60
64
  }
65
+ export function useRuntimeHook(name, fn) {
66
+ const nuxtApp = useNuxtApp();
67
+ const unregister = nuxtApp.hook(name, fn);
68
+ onScopeDispose(unregister);
69
+ }
61
70
  export function defineNuxtPlugin(plugin) {
62
71
  return {
63
72
  install(app) {
@@ -2206,7 +2206,7 @@ const formField = {
2206
2206
 
2207
2207
  const input = {
2208
2208
  slots: {
2209
- root: "relative inline-flex items-center w-full",
2209
+ root: "isolate relative inline-flex items-center w-full",
2210
2210
  base: [
2211
2211
  "px-3",
2212
2212
  "w-full py-0 border-0 focus:outline-none",
@@ -2999,7 +2999,7 @@ const inputNumber = () => {
2999
2999
  const input$1 = input;
3000
3000
  return {
3001
3001
  slots: {
3002
- root: "relative inline-flex items-center",
3002
+ root: "isolate relative inline-flex items-center",
3003
3003
  base: [
3004
3004
  "w-full py-0 border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",
3005
3005
  "placeholder:text-base-400",
@@ -5181,7 +5181,7 @@ const select = () => {
5181
5181
  return defu.defuFn(
5182
5182
  {
5183
5183
  slots: {
5184
- root: () => "relative inline-flex items-center w-full",
5184
+ root: () => "isolate relative inline-flex items-center w-full",
5185
5185
  base: () => [
5186
5186
  "px-3",
5187
5187
  "relative inline-flex items-center group",
@@ -6008,7 +6008,7 @@ const tabs = {
6008
6008
 
6009
6009
  const textarea = {
6010
6010
  slots: {
6011
- root: "relative inline-flex items-center w-full",
6011
+ root: "isolate relative inline-flex items-center w-full",
6012
6012
  base: [
6013
6013
  "w-full px-3 py-1.5 border-0 focus:outline-none",
6014
6014
  "disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
@@ -6533,6 +6533,7 @@ const sidebarLayout = {
6533
6533
  "flex items-center",
6534
6534
  "lg:hidden"
6535
6535
  ].join(" "),
6536
+ headerMenuIcon: "",
6536
6537
  headerPaddings: [
6537
6538
  "py-2.5"
6538
6539
  ].join(" "),
@@ -6542,9 +6543,7 @@ const sidebarLayout = {
6542
6543
  ].join(" "),
6543
6544
  container: [
6544
6545
  "flex-1 flex flex-col",
6545
- "lg:min-w-0",
6546
- "pb-2",
6547
- "lg:pt-2 lg:pr-2"
6546
+ "lg:min-w-0"
6548
6547
  ].join(" "),
6549
6548
  containerWrapper: [
6550
6549
  "grow"
@@ -6557,7 +6556,7 @@ const sidebarLayout = {
6557
6556
  container: "lg:pl-[240px]"
6558
6557
  },
6559
6558
  false: {
6560
- container: ""
6559
+ container: "pb-2 lg:pt-2 lg:px-2"
6561
6560
  }
6562
6561
  },
6563
6562
  useLightContent: {
@@ -6566,6 +6565,9 @@ const sidebarLayout = {
6566
6565
  "bg-white dark:bg-white/10",
6567
6566
  "lg:bg-base-50 dark:lg:bg-base-dark"
6568
6567
  ].join(" "),
6568
+ container: [
6569
+ "pb-2 lg:pt-2 lg:pr-2"
6570
+ ].join(" "),
6569
6571
  containerWrapper: [
6570
6572
  "p-6 lg:p-10",
6571
6573
  "lg:bg-white dark:lg:bg-white/10",
@@ -6589,12 +6591,88 @@ const sidebarLayout = {
6589
6591
 
6590
6592
  const stackedLayout = {
6591
6593
  slots: {
6592
- root: "",
6593
- container: ""
6594
+ root: [
6595
+ "min-h-svh w-full",
6596
+ "flex flex-col",
6597
+ "lg:px-2",
6598
+ "relative isolate"
6599
+ ].join(" "),
6600
+ sidebarSlideoverContainer: [
6601
+ "max-w-80",
6602
+ "p-2",
6603
+ "bg-transparent dark:bg-transparent sm:shadow-none"
6604
+ ].join(" "),
6605
+ sidebarSlideover: [
6606
+ "h-full",
6607
+ "overflow-hidden",
6608
+ "flex flex-col",
6609
+ "bg-white dark:bg-base-dark",
6610
+ "ring-1 ring-base-950/5 dark:ring-white/10",
6611
+ "shadow-xs",
6612
+ "rounded-lg"
6613
+ ].join(" "),
6614
+ sidebarSlideoverBtnClose: [
6615
+ "-mb-3",
6616
+ "px-4 pt-3"
6617
+ ].join(" "),
6618
+ header: [
6619
+ "px-4",
6620
+ "flex items-center",
6621
+ /**
6622
+ * @memo this sync with NavigationMenu
6623
+ */
6624
+ "h-[84px]"
6625
+ ].join(" "),
6626
+ headerMenuIcon: [
6627
+ "lg:hidden"
6628
+ ].join(" "),
6629
+ headerPaddings: [
6630
+ "py-2.5"
6631
+ ].join(" "),
6632
+ headerWrapper: [
6633
+ "min-w-0",
6634
+ "flex-1"
6635
+ ].join(" "),
6636
+ container: [
6637
+ "flex-1 flex flex-col",
6638
+ "lg:min-w-0",
6639
+ "pb-2"
6640
+ ].join(" "),
6641
+ containerWrapper: [
6642
+ "grow"
6643
+ ].join(" "),
6644
+ containerWrapperInner: ""
6645
+ },
6646
+ variants: {
6647
+ useSidebar: {
6648
+ true: "",
6649
+ false: ""
6650
+ },
6651
+ useLightContent: {
6652
+ true: {
6653
+ root: [
6654
+ "bg-white dark:bg-white/10",
6655
+ "lg:bg-base-50 dark:lg:bg-base-dark"
6656
+ ].join(" "),
6657
+ containerWrapper: [
6658
+ "p-6 lg:p-10",
6659
+ "lg:bg-white dark:lg:bg-white/10",
6660
+ "lg:ring-1 lg:ring-base-950/5 dark:lg:ring-white/10",
6661
+ "lg:shadow-xs",
6662
+ "lg:rounded-lg"
6663
+ ].join(" ")
6664
+ },
6665
+ false: {
6666
+ container: [
6667
+ "px-4"
6668
+ ].join(" ")
6669
+ }
6670
+ }
6594
6671
  },
6595
- variants: {},
6596
6672
  compoundVariants: [],
6597
- defaultVariants: {}
6673
+ defaultVariants: {
6674
+ useLightContent: true
6675
+ }
6598
6676
  };
6599
6677
 
6600
6678
  const sidebar = {
@@ -2204,7 +2204,7 @@ const formField = {
2204
2204
 
2205
2205
  const input = {
2206
2206
  slots: {
2207
- root: "relative inline-flex items-center w-full",
2207
+ root: "isolate relative inline-flex items-center w-full",
2208
2208
  base: [
2209
2209
  "px-3",
2210
2210
  "w-full py-0 border-0 focus:outline-none",
@@ -2997,7 +2997,7 @@ const inputNumber = () => {
2997
2997
  const input$1 = input;
2998
2998
  return {
2999
2999
  slots: {
3000
- root: "relative inline-flex items-center",
3000
+ root: "isolate relative inline-flex items-center",
3001
3001
  base: [
3002
3002
  "w-full py-0 border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",
3003
3003
  "placeholder:text-base-400",
@@ -5179,7 +5179,7 @@ const select = () => {
5179
5179
  return defuFn(
5180
5180
  {
5181
5181
  slots: {
5182
- root: () => "relative inline-flex items-center w-full",
5182
+ root: () => "isolate relative inline-flex items-center w-full",
5183
5183
  base: () => [
5184
5184
  "px-3",
5185
5185
  "relative inline-flex items-center group",
@@ -6006,7 +6006,7 @@ const tabs = {
6006
6006
 
6007
6007
  const textarea = {
6008
6008
  slots: {
6009
- root: "relative inline-flex items-center w-full",
6009
+ root: "isolate relative inline-flex items-center w-full",
6010
6010
  base: [
6011
6011
  "w-full px-3 py-1.5 border-0 focus:outline-none",
6012
6012
  "disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
@@ -6531,6 +6531,7 @@ const sidebarLayout = {
6531
6531
  "flex items-center",
6532
6532
  "lg:hidden"
6533
6533
  ].join(" "),
6534
+ headerMenuIcon: "",
6534
6535
  headerPaddings: [
6535
6536
  "py-2.5"
6536
6537
  ].join(" "),
@@ -6540,9 +6541,7 @@ const sidebarLayout = {
6540
6541
  ].join(" "),
6541
6542
  container: [
6542
6543
  "flex-1 flex flex-col",
6543
- "lg:min-w-0",
6544
- "pb-2",
6545
- "lg:pt-2 lg:pr-2"
6544
+ "lg:min-w-0"
6546
6545
  ].join(" "),
6547
6546
  containerWrapper: [
6548
6547
  "grow"
@@ -6555,7 +6554,7 @@ const sidebarLayout = {
6555
6554
  container: "lg:pl-[240px]"
6556
6555
  },
6557
6556
  false: {
6558
- container: ""
6557
+ container: "pb-2 lg:pt-2 lg:px-2"
6559
6558
  }
6560
6559
  },
6561
6560
  useLightContent: {
@@ -6564,6 +6563,9 @@ const sidebarLayout = {
6564
6563
  "bg-white dark:bg-white/10",
6565
6564
  "lg:bg-base-50 dark:lg:bg-base-dark"
6566
6565
  ].join(" "),
6566
+ container: [
6567
+ "pb-2 lg:pt-2 lg:pr-2"
6568
+ ].join(" "),
6567
6569
  containerWrapper: [
6568
6570
  "p-6 lg:p-10",
6569
6571
  "lg:bg-white dark:lg:bg-white/10",
@@ -6587,12 +6589,88 @@ const sidebarLayout = {
6587
6589
 
6588
6590
  const stackedLayout = {
6589
6591
  slots: {
6590
- root: "",
6591
- container: ""
6592
+ root: [
6593
+ "min-h-svh w-full",
6594
+ "flex flex-col",
6595
+ "lg:px-2",
6596
+ "relative isolate"
6597
+ ].join(" "),
6598
+ sidebarSlideoverContainer: [
6599
+ "max-w-80",
6600
+ "p-2",
6601
+ "bg-transparent dark:bg-transparent sm:shadow-none"
6602
+ ].join(" "),
6603
+ sidebarSlideover: [
6604
+ "h-full",
6605
+ "overflow-hidden",
6606
+ "flex flex-col",
6607
+ "bg-white dark:bg-base-dark",
6608
+ "ring-1 ring-base-950/5 dark:ring-white/10",
6609
+ "shadow-xs",
6610
+ "rounded-lg"
6611
+ ].join(" "),
6612
+ sidebarSlideoverBtnClose: [
6613
+ "-mb-3",
6614
+ "px-4 pt-3"
6615
+ ].join(" "),
6616
+ header: [
6617
+ "px-4",
6618
+ "flex items-center",
6619
+ /**
6620
+ * @memo this sync with NavigationMenu
6621
+ */
6622
+ "h-[84px]"
6623
+ ].join(" "),
6624
+ headerMenuIcon: [
6625
+ "lg:hidden"
6626
+ ].join(" "),
6627
+ headerPaddings: [
6628
+ "py-2.5"
6629
+ ].join(" "),
6630
+ headerWrapper: [
6631
+ "min-w-0",
6632
+ "flex-1"
6633
+ ].join(" "),
6634
+ container: [
6635
+ "flex-1 flex flex-col",
6636
+ "lg:min-w-0",
6637
+ "pb-2"
6638
+ ].join(" "),
6639
+ containerWrapper: [
6640
+ "grow"
6641
+ ].join(" "),
6642
+ containerWrapperInner: ""
6643
+ },
6644
+ variants: {
6645
+ useSidebar: {
6646
+ true: "",
6647
+ false: ""
6648
+ },
6649
+ useLightContent: {
6650
+ true: {
6651
+ root: [
6652
+ "bg-white dark:bg-white/10",
6653
+ "lg:bg-base-50 dark:lg:bg-base-dark"
6654
+ ].join(" "),
6655
+ containerWrapper: [
6656
+ "p-6 lg:p-10",
6657
+ "lg:bg-white dark:lg:bg-white/10",
6658
+ "lg:ring-1 lg:ring-base-950/5 dark:lg:ring-white/10",
6659
+ "lg:shadow-xs",
6660
+ "lg:rounded-lg"
6661
+ ].join(" ")
6662
+ },
6663
+ false: {
6664
+ container: [
6665
+ "px-4"
6666
+ ].join(" ")
6667
+ }
6668
+ }
6592
6669
  },
6593
- variants: {},
6594
6670
  compoundVariants: [],
6595
- defaultVariants: {}
6671
+ defaultVariants: {
6672
+ useLightContent: true
6673
+ }
6596
6674
  };
6597
6675
 
6598
6676
  const sidebar = {
package/dist/unplugin.cjs CHANGED
@@ -5,7 +5,7 @@ const pathe = require('pathe');
5
5
  const unplugin = require('unplugin');
6
6
  const defu = require('defu');
7
7
  const tailwind = require('@tailwindcss/vite');
8
- const templates = require('./shared/b24ui-nuxt.BGKKwlPY.cjs');
8
+ const templates = require('./shared/b24ui-nuxt.BsnG7poi.cjs');
9
9
  const tinyglobby = require('tinyglobby');
10
10
  const knitwork = require('knitwork');
11
11
  const MagicString = require('magic-string');
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.DWwKgFlo.mjs';
6
+ import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.CMCKw62O.mjs';
7
7
  import { globSync } from 'tinyglobby';
8
8
  import { genSafeVariableName } from 'knitwork';
9
9
  import MagicString from 'magic-string';
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.BGKKwlPY.cjs');
9
+ require('./shared/b24ui-nuxt.BsnG7poi.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.DWwKgFlo.mjs';
7
+ import './shared/b24ui-nuxt.CMCKw62O.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.5.5",
4
+ "version": "0.5.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/bitrix24/b24ui.git"
@@ -79,7 +79,7 @@
79
79
  "@tailwindcss/postcss": "^4.0.17",
80
80
  "@tailwindcss/vite": "^4.0.17",
81
81
  "@tanstack/vue-table": "^8.21.2",
82
- "@unhead/vue": "^2.0.1",
82
+ "@unhead/vue": "^2.0.2",
83
83
  "@vueuse/core": "^13.0.0",
84
84
  "@vueuse/integrations": "^13.0.0",
85
85
  "canvas-confetti": "^1.9.3",
@@ -94,6 +94,7 @@
94
94
  "embla-carousel-vue": "^8.5.2",
95
95
  "embla-carousel-wheel-gestures": "^8.0.1",
96
96
  "fuse.js": "^7.1.0",
97
+ "hookable": "^5.5.3",
97
98
  "knitwork": "^1.2.0",
98
99
  "magic-string": "^0.30.17",
99
100
  "mlly": "^1.7.4",