@bitrix24/b24ui-nuxt 2.1.1 → 2.1.2

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/README.md CHANGED
@@ -12,22 +12,18 @@ Visit https://bitrix24.github.io/b24ui/ to explore the documentation.
12
12
 
13
13
  ```bash [pnpm]
14
14
  pnpm add @bitrix24/b24ui-nuxt
15
- pnpm add @bitrix24/b24icons-vue
16
15
  ```
17
16
 
18
17
  ```bash [yarn]
19
18
  yarn add @bitrix24/b24ui-nuxt
20
- yarn add @bitrix24/b24icons-vue
21
19
  ```
22
20
 
23
21
  ```bash [npm]
24
22
  npm install @bitrix24/b24ui-nuxt
25
- npm install @bitrix24/b24icons-vue
26
23
  ```
27
24
 
28
25
  ```bash [bun]
29
26
  yarn add @bitrix24/b24ui-nuxt
30
- yarn add @bitrix24/b24icons-vue
31
27
  ```
32
28
 
33
29
  ### Nuxt
package/dist/meta.d.mts CHANGED
@@ -699,7 +699,7 @@ var B24UIMeta = {
699
699
  ],
700
700
  "events": [],
701
701
  "exposed": [],
702
- "hash": "izrfkbvSosLUz1S2srq5SR3llz4V8RYMM1Vt6nGsIfo"
702
+ "hash": "AduWQ3nb1hxoZJohRUybusVQLdPsmYxhyS91n-Mvro0"
703
703
  }
704
704
  },
705
705
  "ProseCard": {
@@ -70234,6 +70234,29 @@ var B24UIMeta = {
70234
70234
  }
70235
70235
  }
70236
70236
  },
70237
+ {
70238
+ "name": "preview",
70239
+ "global": false,
70240
+ "description": "Show the file preview/list after upload.",
70241
+ "tags": [
70242
+ {
70243
+ "name": "defaultValue",
70244
+ "text": "true"
70245
+ }
70246
+ ],
70247
+ "required": false,
70248
+ "type": "boolean | undefined",
70249
+ "schema": {
70250
+ "kind": "enum",
70251
+ "type": "boolean | undefined",
70252
+ "schema": {
70253
+ "0": "undefined",
70254
+ "1": "false",
70255
+ "2": "true"
70256
+ }
70257
+ },
70258
+ "default": "true"
70259
+ },
70237
70260
  {
70238
70261
  "name": "b24ui",
70239
70262
  "global": false,
@@ -70447,7 +70470,7 @@ var B24UIMeta = {
70447
70470
  ],
70448
70471
  "events": [],
70449
70472
  "exposed": [],
70450
- "hash": "2ZP94ufhreubb7xfnc5cMYhbLv0FbbKuG1GsPh_4DXU"
70473
+ "hash": "xl1RZNbo4ABnsUi-OdSezkLwIo3ji56M_zOkyGVjJ5k"
70451
70474
  }
70452
70475
  },
70453
70476
  "B24Form": {
package/dist/meta.mjs CHANGED
@@ -699,7 +699,7 @@ const B24UIMeta = {
699
699
  ],
700
700
  "events": [],
701
701
  "exposed": [],
702
- "hash": "izrfkbvSosLUz1S2srq5SR3llz4V8RYMM1Vt6nGsIfo"
702
+ "hash": "AduWQ3nb1hxoZJohRUybusVQLdPsmYxhyS91n-Mvro0"
703
703
  }
704
704
  },
705
705
  "ProseCard": {
@@ -70234,6 +70234,29 @@ const B24UIMeta = {
70234
70234
  }
70235
70235
  }
70236
70236
  },
70237
+ {
70238
+ "name": "preview",
70239
+ "global": false,
70240
+ "description": "Show the file preview/list after upload.",
70241
+ "tags": [
70242
+ {
70243
+ "name": "defaultValue",
70244
+ "text": "true"
70245
+ }
70246
+ ],
70247
+ "required": false,
70248
+ "type": "boolean | undefined",
70249
+ "schema": {
70250
+ "kind": "enum",
70251
+ "type": "boolean | undefined",
70252
+ "schema": {
70253
+ "0": "undefined",
70254
+ "1": "false",
70255
+ "2": "true"
70256
+ }
70257
+ },
70258
+ "default": "true"
70259
+ },
70237
70260
  {
70238
70261
  "name": "b24ui",
70239
70262
  "global": false,
@@ -70447,7 +70470,7 @@ const B24UIMeta = {
70447
70470
  ],
70448
70471
  "events": [],
70449
70472
  "exposed": [],
70450
- "hash": "2ZP94ufhreubb7xfnc5cMYhbLv0FbbKuG1GsPh_4DXU"
70473
+ "hash": "xl1RZNbo4ABnsUi-OdSezkLwIo3ji56M_zOkyGVjJ5k"
70451
70474
  }
70452
70475
  },
70453
70476
  "B24Form": {
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitrix24/b24ui-nuxt",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
5
5
  "configKey": "b24ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
- import { defineNuxtModule, createResolver, addPlugin, hasNuxtModule, addComponentsDir, addImportsDir } from '@nuxt/kit';
3
- import { d as defaultOptions, v as version, n as name, a as getDefaultConfig, b as addTemplates } from './shared/b24ui-nuxt.B13KxxqP.mjs';
2
+ import { defineNuxtModule, createResolver, addPlugin, hasNuxtModule, addComponentsDir, addImportsDir, installModule } from '@nuxt/kit';
3
+ import { d as defaultOptions, v as version, n as name, a as getDefaultConfig, b as addTemplates } from './shared/b24ui-nuxt.B9uYyQGR.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
  import 'knitwork';
@@ -36,6 +36,14 @@ const module$1 = defineNuxtModule({
36
36
  if (nuxt.options.builder !== "@nuxt/vite-builder") {
37
37
  nuxt.options.postcss.plugins["@tailwindcss/postcss"] = {};
38
38
  }
39
+ async function registerModule(name2, key, options2) {
40
+ if (!hasNuxtModule(name2)) {
41
+ await installModule(name2, defu(nuxt.options[key], options2));
42
+ } else {
43
+ nuxt.options[key] = defu(nuxt.options[key], options2);
44
+ }
45
+ }
46
+ await registerModule("@bitrix24/b24icons-nuxt", "empty", {});
39
47
  addPlugin({ src: resolve("./runtime/plugins/colors") });
40
48
  addPlugin({ src: resolve("./runtime/plugins/ui-version") });
41
49
  if (hasNuxtModule("@nuxtjs/mdc") || options.mdc || (hasNuxtModule("@nuxt/content") || options.content)) {
@@ -90,6 +90,11 @@ export interface FileUploadProps<M extends boolean = false> extends /** @vue-ign
90
90
  * @IconComponent
91
91
  */
92
92
  fileDeleteIcon?: IconComponent;
93
+ /**
94
+ * Show the file preview/list after upload.
95
+ * @defaultValue true
96
+ */
97
+ preview?: boolean;
93
98
  class?: any;
94
99
  b24ui?: FileUpload['slots'];
95
100
  }
@@ -37,6 +37,7 @@ const props = defineProps({
37
37
  fileIcon: { type: [Function, Object], required: false },
38
38
  fileDelete: { type: [Boolean, Object], required: false, default: true },
39
39
  fileDeleteIcon: { type: [Function, Object], required: false },
40
+ preview: { type: Boolean, required: false, default: true },
40
41
  class: { type: null, required: false },
41
42
  b24ui: { type: null, required: false }
42
43
  });
@@ -135,7 +136,7 @@ defineExpose({
135
136
 
136
137
  <template>
137
138
  <DefineFilesTemplate>
138
- <template v-if="modelValue && (Array.isArray(modelValue) ? modelValue.length : true)">
139
+ <template v-if="props.preview && modelValue && (Array.isArray(modelValue) ? modelValue.length : true)">
139
140
  <slot name="files-top" :files="modelValue" :open="open" :remove-file="removeFile" />
140
141
 
141
142
  <div :class="b24ui.files({ class: props.b24ui?.files })">
@@ -90,6 +90,11 @@ export interface FileUploadProps<M extends boolean = false> extends /** @vue-ign
90
90
  * @IconComponent
91
91
  */
92
92
  fileDeleteIcon?: IconComponent;
93
+ /**
94
+ * Show the file preview/list after upload.
95
+ * @defaultValue true
96
+ */
97
+ preview?: boolean;
93
98
  class?: any;
94
99
  b24ui?: FileUpload['slots'];
95
100
  }
@@ -10,6 +10,7 @@ import icons from "../../dictionary/icons";
10
10
  import B24Link from "../Link.vue";
11
11
  import GitHubIcon from "@bitrix24/b24icons-vue/social/GitHubIcon";
12
12
  import InfoCircleIcon from "@bitrix24/b24icons-vue/outline/InfoCircleIcon";
13
+ import MdnwebdocsIcon from "@bitrix24/b24icons-vue/social/MdnwebdocsIcon";
13
14
  defineOptions({ inheritAttrs: false });
14
15
  const props = defineProps({
15
16
  to: { type: null, required: false },
@@ -32,11 +33,12 @@ const iconFromIconName = computed(() => {
32
33
  return void 0;
33
34
  }
34
35
  switch (props.iconName) {
36
+ case "InfoCircleIcon":
37
+ return InfoCircleIcon;
35
38
  case "GitHubIcon":
36
39
  return GitHubIcon;
37
- /** @todo change icon */
38
40
  case "MdnWebDocIcon":
39
- return InfoCircleIcon;
41
+ return MdnwebdocsIcon;
40
42
  }
41
43
  return void 0;
42
44
  });
@@ -2,6 +2,8 @@
2
2
  * Default icons
3
3
  * ---
4
4
  * @link https://bitrix24.github.io/b24icons/
5
+ * @memo sync with docs/content/docs/1.getting-started/6.integrations/1.icons/1.nuxt.md
6
+ * @memo sync with docs/content/docs/1.getting-started/6.integrations/1.icons/2.vue.md
5
7
  */
6
8
  declare const _default: {
7
9
  arrowLeft: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}>;
@@ -1,6 +1,6 @@
1
1
  import type { InertiaLinkProps } from '@inertiajs/vue3';
2
2
  import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../types/html';
3
- export interface LinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
3
+ export interface LinkProps extends Partial<Omit<InertiaLinkProps, 'href' | 'onClick'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
4
4
  /**
5
5
  * The element or component this component should render as when not a link.
6
6
  * @defaultValue 'button'
@@ -1,6 +1,6 @@
1
1
  import type { InertiaLinkProps } from '@inertiajs/vue3';
2
2
  import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../types/html';
3
- export interface LinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
3
+ export interface LinkProps extends Partial<Omit<InertiaLinkProps, 'href' | 'onClick'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
4
4
  /**
5
5
  * The element or component this component should render as when not a link.
6
6
  * @defaultValue 'button'
@@ -1,6 +1,6 @@
1
1
  import type { RouterLinkProps } from 'vue-router';
2
2
  import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../types/html';
3
- export interface LinkProps extends Omit<RouterLinkProps, 'custom'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
3
+ export interface LinkProps extends Partial<Omit<RouterLinkProps, 'custom'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
4
4
  /**
5
5
  * The element or component this component should render as when not a link.
6
6
  * @defaultValue 'button'
@@ -36,7 +36,7 @@ const props = defineProps({
36
36
  exactActiveClass: { type: String, required: false },
37
37
  ariaCurrentValue: { type: String, required: false, default: "page" },
38
38
  viewTransition: { type: Boolean, required: false },
39
- to: { type: null, required: true },
39
+ to: { type: null, required: false },
40
40
  replace: { type: Boolean, required: false }
41
41
  });
42
42
  defineSlots();
@@ -1,6 +1,6 @@
1
1
  import type { RouterLinkProps } from 'vue-router';
2
2
  import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../types/html';
3
- export interface LinkProps extends Omit<RouterLinkProps, 'custom'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
3
+ export interface LinkProps extends Partial<Omit<RouterLinkProps, 'custom'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
4
4
  /**
5
5
  * The element or component this component should render as when not a link.
6
6
  * @defaultValue 'button'
@@ -8,7 +8,7 @@ import { globSync } from 'tinyglobby';
8
8
  import { defuFn } from 'defu';
9
9
 
10
10
  const name = "@bitrix24/b24ui-nuxt";
11
- const version = "2.1.1";
11
+ const version = "2.1.2";
12
12
 
13
13
  function getDefaultConfig(theme) {
14
14
  return {
@@ -3144,7 +3144,6 @@ const error = {
3144
3144
  const fileUpload = {
3145
3145
  slots: {
3146
3146
  root: [
3147
- "light",
3148
3147
  "relative",
3149
3148
  "flex flex-col"
3150
3149
  ].join(" "),
@@ -3153,6 +3152,7 @@ const fileUpload = {
3153
3152
  "flex-1",
3154
3153
  "bg-(--b24ui-background)/90",
3155
3154
  "border-(--b24ui-border-color) border-(length:--b24ui-border-width)",
3155
+ "text-(--b24ui-color)",
3156
3156
  "flex flex-col gap-2 items-stretch justify-center",
3157
3157
  "rounded-(--ui-border-radius-md)",
3158
3158
  "focus-visible:outline-2",
@@ -3174,14 +3174,14 @@ const fileUpload = {
3174
3174
  },
3175
3175
  variants: {
3176
3176
  color: {
3177
- "air-primary": { root: "style-filled-inverted" },
3178
- "air-primary-success": { root: "style-filled-success-inverted" },
3179
- "air-primary-alert": { root: "style-filled-alert-inverted" },
3180
- "air-primary-copilot": { root: "style-filled-copilot-inverted" },
3181
- "air-primary-warning": { root: "style-filled-warning-inverted" },
3182
- "air-secondary": { root: "style-tinted" },
3183
- "air-secondary-alert": { root: "style-tinted-alert" },
3184
- "air-secondary-accent": { root: "style-outline" },
3177
+ "air-primary": { root: "light style-filled-inverted" },
3178
+ "air-primary-success": { root: "light style-filled-success-inverted" },
3179
+ "air-primary-alert": { root: "light style-filled-alert-inverted" },
3180
+ "air-primary-copilot": { root: "light style-filled-copilot-inverted" },
3181
+ "air-primary-warning": { root: "light style-filled-warning-inverted" },
3182
+ "air-secondary": { root: "style-outline" },
3183
+ "air-secondary-alert": { root: "light style-tinted-alert" },
3184
+ "air-secondary-accent": { root: "light style-tinted" },
3185
3185
  "air-secondary-accent-1": { root: "style-outline-accent-1" },
3186
3186
  "air-secondary-accent-2": { root: "style-outline-accent-2" },
3187
3187
  "air-tertiary": { root: "style-outline-no-accent" }
@@ -3239,7 +3239,15 @@ const fileUpload = {
3239
3239
  "-top-1.5",
3240
3240
  "-end-1.5",
3241
3241
  "rounded-(--ui-border-radius-pill)",
3242
- "border"
3242
+ "border",
3243
+ // @memo change color|bg for btn
3244
+ "edge-light:[--ui-btn-background:var(--ui-color-base-white-fixed)]",
3245
+ "edge-dark:[--ui-btn-background:var(--ui-color-base-white-fixed)]",
3246
+ "edge-dark:hover:bg-(--ui-color-base-white-fixed)/90",
3247
+ "edge-dark:[--ui-btn-color:var(--ui-color-g-content-grey-1)]",
3248
+ "dark:[--ui-btn-background:var(--ui-color-g-content-grey-1)]",
3249
+ "dark:hover:bg-(--ui-color-g-content-grey-1)/90",
3250
+ "dark:[--ui-btn-color:var(--ui-color-g-content-grey-4)]"
3243
3251
  ].join(" ")
3244
3252
  }
3245
3253
  },
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 getDefaultConfig } from './shared/b24ui-nuxt.B13KxxqP.mjs';
6
+ import { g as getTemplates, d as defaultOptions, a as getDefaultConfig } from './shared/b24ui-nuxt.B9uYyQGR.mjs';
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
9
  import MagicString from 'magic-string';
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.B13KxxqP.mjs';
7
+ import './shared/b24ui-nuxt.B9uYyQGR.mjs';
8
8
  import 'scule';
9
9
  import 'knitwork';
10
10
  import '@nuxt/kit';
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": "2.1.1",
4
+ "version": "2.1.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/bitrix24/b24ui.git"
@@ -104,7 +104,7 @@
104
104
  "vue-plugin.d.ts"
105
105
  ],
106
106
  "dependencies": {
107
- "@bitrix24/b24icons-vue": "^2.0.5",
107
+ "@bitrix24/b24icons-nuxt": "^2.0.7",
108
108
  "@internationalized/date": "^3.10.0",
109
109
  "@internationalized/number": "^3.6.5",
110
110
  "@nuxt/kit": "^4.2.1",
@@ -207,7 +207,9 @@
207
207
  "@bitrix24/b24ui-nuxt": "workspace:*",
208
208
  "debug": "4.3.7",
209
209
  "typescript": "5.8.3",
210
- "unplugin": "^2.3.10"
210
+ "unplugin": "^2.3.10",
211
+ "ai": "5.0.90",
212
+ "@ai-sdk/vue": "2.0.90"
211
213
  },
212
214
  "keywords": [
213
215
  "bitrix24-ui",