@bitrix24/b24ui-nuxt 0.4.11 → 0.5.1

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 (44) hide show
  1. package/.nuxt/b24ui/navigation-menu.ts +301 -68
  2. package/.nuxt/b24ui/sidebar-body.ts +1 -1
  3. package/.nuxt/b24ui/sidebar-footer.ts +1 -1
  4. package/.nuxt/b24ui/sidebar-header.ts +1 -1
  5. package/.nuxt/b24ui/sidebar-heading.ts +1 -1
  6. package/.nuxt/b24ui/sidebar-section.ts +1 -1
  7. package/.nuxt/b24ui.css +1 -1
  8. package/README.md +2 -2
  9. package/dist/meta.cjs +6503 -263
  10. package/dist/meta.d.cts +6503 -263
  11. package/dist/meta.d.mts +6503 -263
  12. package/dist/meta.d.ts +6503 -263
  13. package/dist/meta.mjs +6503 -263
  14. package/dist/module.cjs +1 -1
  15. package/dist/module.json +1 -1
  16. package/dist/module.mjs +1 -1
  17. package/dist/runtime/components/DropdownMenu.vue +5 -5
  18. package/dist/runtime/components/Form.vue +21 -1
  19. package/dist/runtime/components/FormField.vue +5 -0
  20. package/dist/runtime/components/InputMenu.vue +3 -3
  21. package/dist/runtime/components/Modal.vue +10 -7
  22. package/dist/runtime/components/NavigationMenu.vue +44 -36
  23. package/dist/runtime/components/Popover.vue +3 -2
  24. package/dist/runtime/components/RadioGroup.vue +2 -2
  25. package/dist/runtime/components/Select.vue +3 -3
  26. package/dist/runtime/components/SelectMenu.vue +3 -3
  27. package/dist/runtime/components/Slideover.vue +10 -7
  28. package/dist/runtime/components/Toast.vue +1 -1
  29. package/dist/runtime/components/Tooltip.vue +3 -2
  30. package/dist/runtime/composables/useComponentIcons.d.ts +2 -2
  31. package/dist/runtime/index.css +1 -1
  32. package/dist/runtime/plugins/colors.d.ts +3 -0
  33. package/dist/runtime/types/form.d.ts +1 -3
  34. package/dist/runtime/utils/form.d.ts +0 -4
  35. package/dist/runtime/utils/form.js +2 -47
  36. package/dist/runtime/utils/link.d.ts +8 -8
  37. package/dist/runtime/vue/stubs.d.ts +1 -1
  38. package/dist/shared/{b24ui-nuxt.CJqO7fYv.mjs → b24ui-nuxt.CBnBA3PE.mjs} +466 -56
  39. package/dist/shared/{b24ui-nuxt.CltBJi1M.cjs → b24ui-nuxt.ClMXHpMM.cjs} +466 -56
  40. package/dist/unplugin.cjs +1 -1
  41. package/dist/unplugin.mjs +1 -1
  42. package/dist/vite.cjs +1 -1
  43. package/dist/vite.mjs +1 -1
  44. package/package.json +11 -11
@@ -7,18 +7,12 @@ export function isYupError(error) {
7
7
  export function isSuperStructSchema(schema) {
8
8
  return "schema" in schema && typeof schema.coercer === "function" && typeof schema.validator === "function" && typeof schema.refiner === "function";
9
9
  }
10
- export function isZodSchema(schema) {
11
- return schema.parse !== void 0;
12
- }
13
10
  export function isJoiSchema(schema) {
14
11
  return schema.validateAsync !== void 0 && schema.id !== void 0;
15
12
  }
16
13
  export function isJoiError(error) {
17
14
  return error.isJoi === true;
18
15
  }
19
- export function isValibotSchema(schema) {
20
- return "_run" in schema || typeof schema === "function" && "schema" in schema;
21
- }
22
16
  export function isStandardSchema(schema) {
23
17
  return "~standard" in schema;
24
18
  }
@@ -77,23 +71,6 @@ async function validateSuperstructSchema(state, schema) {
77
71
  result
78
72
  };
79
73
  }
80
- async function validateZodSchema(state, schema) {
81
- const result = await schema.safeParseAsync(state);
82
- if (result.success === false) {
83
- const errors = result.error.issues.map((issue) => ({
84
- name: issue.path.join("."),
85
- message: issue.message
86
- }));
87
- return {
88
- errors,
89
- result: null
90
- };
91
- }
92
- return {
93
- result: result.data,
94
- errors: null
95
- };
96
- }
97
74
  async function validateJoiSchema(state, schema) {
98
75
  try {
99
76
  const result = await schema.validateAsync(state, { abortEarly: false });
@@ -116,33 +93,11 @@ async function validateJoiSchema(state, schema) {
116
93
  }
117
94
  }
118
95
  }
119
- async function validateValibotSchema(state, schema) {
120
- const result = await ("_run" in schema ? schema._run({ typed: false, value: state }, {}) : schema(state));
121
- if (!result.issues || result.issues.length === 0) {
122
- const output = "output" in result ? result.output : "value" in result ? result.value : null;
123
- return {
124
- errors: null,
125
- result: output
126
- };
127
- }
128
- const errors = result.issues.map((issue) => ({
129
- name: issue.path?.map((item) => item.key).join(".") || "",
130
- message: issue.message
131
- }));
132
- return {
133
- errors,
134
- result: null
135
- };
136
- }
137
96
  export function validateSchema(state, schema) {
138
- if (isZodSchema(schema)) {
139
- return validateZodSchema(state, schema);
97
+ if (isStandardSchema(schema)) {
98
+ return validateStandardSchema(state, schema);
140
99
  } else if (isJoiSchema(schema)) {
141
100
  return validateJoiSchema(state, schema);
142
- } else if (isStandardSchema(schema)) {
143
- return validateStandardSchema(state, schema);
144
- } else if (isValibotSchema(schema)) {
145
- return validateValibotSchema(state, schema);
146
101
  } else if (isYupSchema(schema)) {
147
102
  return validateYupSchema(state, schema);
148
103
  } else if (isSuperStructSchema(schema)) {
@@ -6,24 +6,24 @@ export declare function pickLinkProps(link: LinkProps & {
6
6
  replace: any;
7
7
  type: any;
8
8
  title: any;
9
- href: any;
10
- target: any;
11
- as: any;
12
- prefetch: any;
13
- rel: any;
14
- external: any;
15
- exact: any;
16
9
  active: any;
17
- disabled: any;
18
10
  activeClass: any;
19
11
  ariaCurrentValue: any;
20
12
  ariaLabel: any;
13
+ as: any;
14
+ disabled: any;
15
+ exact: any;
21
16
  exactActiveClass: any;
22
17
  exactHash: any;
23
18
  exactQuery: any;
19
+ external: any;
20
+ href: any;
24
21
  inactiveClass: any;
25
22
  noPrefetch: any;
26
23
  noRel: any;
24
+ prefetch: any;
27
25
  prefetchedClass: any;
26
+ rel: any;
27
+ target: any;
28
28
  to: any;
29
29
  };
@@ -12,7 +12,7 @@ export declare const useColorMode: () => {
12
12
  preference?: undefined;
13
13
  readonly value?: undefined;
14
14
  } | {
15
- preference: "dark" | "light" | "system";
15
+ preference: "light" | "dark" | "system";
16
16
  readonly value: import("@vueuse/core").BasicColorMode;
17
17
  forced: boolean;
18
18
  };