@bridge-ui/vue 0.12.0 → 0.13.0

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 (54) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -1
  2. package/dist/Adapters/Examples/date-moment.js +31 -31
  3. package/dist/Adapters/Examples/i18n-dictionary.js +14 -0
  4. package/dist/Adapters/Examples/icon-fontawesome.js +23 -22
  5. package/dist/Adapters/Examples/icon-heroicons.js +46 -45
  6. package/dist/Adapters/Examples/icon-lucide.js +12 -11
  7. package/dist/Adapters/Examples/icon-phosphor.js +48 -47
  8. package/dist/Adapters/Examples/icon-tabler.js +12 -11
  9. package/dist/Components/BaseField/composables/useBaseField.d.ts +3 -3
  10. package/dist/Components/BaseField/composables/useBaseField.js +7 -7
  11. package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +8 -8
  12. package/dist/Components/Carousel/Carousel.js +5 -0
  13. package/dist/Components/Carousel/Carousel.vue.d.ts +22 -0
  14. package/dist/Components/Carousel/Carousel.vue_vue_type_script_setup_true_lang.js +49 -0
  15. package/dist/Components/Carousel/carousel.types.d.ts +236 -0
  16. package/dist/Components/Carousel/carouselInjectionKey.d.ts +48 -0
  17. package/dist/Components/Carousel/carouselInjectionKey.js +4 -0
  18. package/dist/Components/Carousel/composables/useCarousel.d.ts +91 -0
  19. package/dist/Components/Carousel/composables/useCarousel.js +331 -0
  20. package/dist/Components/Carousel/index.d.ts +4 -0
  21. package/dist/Components/Carousel/index.js +4 -0
  22. package/dist/Components/CarouselSlide/CarouselSlide.js +5 -0
  23. package/dist/Components/CarouselSlide/CarouselSlide.vue.d.ts +11 -0
  24. package/dist/Components/CarouselSlide/CarouselSlide.vue_vue_type_script_setup_true_lang.js +17 -0
  25. package/dist/Components/CarouselSlide/carouselSlide.types.d.ts +40 -0
  26. package/dist/Components/CarouselSlide/composables/useCarouselSlide.d.ts +205 -0
  27. package/dist/Components/CarouselSlide/composables/useCarouselSlide.js +79 -0
  28. package/dist/Components/CarouselSlide/index.d.ts +3 -0
  29. package/dist/Components/CarouselSlide/index.js +3 -0
  30. package/dist/Components/FileUpload/FileUpload.vue.d.ts +22 -24
  31. package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +101 -92
  32. package/dist/Components/FileUpload/composables/useFileUpload.d.ts +66 -16
  33. package/dist/Components/FileUpload/composables/useFileUpload.js +182 -157
  34. package/dist/Components/FileUpload/fileUpload.types.d.ts +113 -23
  35. package/dist/Components/FileUpload/fileUploadInjectionKey.d.ts +61 -0
  36. package/dist/Components/FileUpload/fileUploadInjectionKey.js +4 -0
  37. package/dist/Components/FileUpload/index.d.ts +1 -1
  38. package/dist/Components/FileUploadItem/FileUploadItem.js +5 -0
  39. package/dist/Components/FileUploadItem/FileUploadItem.vue.d.ts +12 -0
  40. package/dist/Components/FileUploadItem/FileUploadItem.vue_vue_type_script_setup_true_lang.js +83 -0
  41. package/dist/Components/FileUploadItem/composables/useFileUploadItem.d.ts +1153 -0
  42. package/dist/Components/FileUploadItem/composables/useFileUploadItem.js +94 -0
  43. package/dist/Components/FileUploadItem/fileUploadItem.types.d.ts +20 -0
  44. package/dist/Components/FileUploadItem/index.d.ts +3 -0
  45. package/dist/Components/FileUploadItem/index.js +3 -0
  46. package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
  47. package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +1 -1
  48. package/dist/augments.d.ts +10 -1
  49. package/dist/index.d.ts +7 -1
  50. package/dist/index.js +115 -109
  51. package/docs/README.md +1 -0
  52. package/docs/components/Carousel.md +113 -0
  53. package/docs/components/FileUpload.md +83 -8
  54. package/package.json +2 -2
@@ -0,0 +1,61 @@
1
+ import { ComputedRef, HTMLAttributes, InjectionKey } from 'vue';
2
+ import { FileUploadOrientation, FileUploadState } from '@bridge-ui/core/Tokens';
3
+ import { ButtonProps } from '../Button';
4
+ /**
5
+ * Card chrome shared by `FileUpload` and `FileUploadItem`.
6
+ */
7
+ export type FileUploadItemContextValue = {
8
+ /**
9
+ * Props for the remove-button cluster.
10
+ */
11
+ actionsBind: HTMLAttributes;
12
+ /**
13
+ * Color forwarded to the default remove button.
14
+ */
15
+ color?: ButtonProps["color"];
16
+ /**
17
+ * Props for the name + metadata stack.
18
+ */
19
+ contentBind: HTMLAttributes;
20
+ /**
21
+ * Props for the metadata line.
22
+ */
23
+ descriptionBind: HTMLAttributes;
24
+ /**
25
+ * Whether the remove button is disabled.
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Props for the card root.
30
+ */
31
+ getItemBind: (index: number) => HTMLAttributes;
32
+ /**
33
+ * Props for the preview or file icon.
34
+ */
35
+ mediaBind: HTMLAttributes;
36
+ /**
37
+ * Field orientation. Cards inherit it unless they pass their own.
38
+ */
39
+ orientation: string;
40
+ /**
41
+ * Merged orientation tokens, including registry overrides.
42
+ */
43
+ orientationItems: Partial<FileUploadOrientation>;
44
+ /**
45
+ * Radius forwarded to the card and the remove button.
46
+ */
47
+ rounded?: ButtonProps["rounded"];
48
+ /**
49
+ * Field size. `xs` hides the default type · size line.
50
+ */
51
+ size: string;
52
+ /**
53
+ * Merged upload-state tokens, including registry overrides.
54
+ */
55
+ stateItems: Partial<FileUploadState>;
56
+ /**
57
+ * Props for the file name.
58
+ */
59
+ titleBind: HTMLAttributes;
60
+ };
61
+ export declare const FILE_UPLOAD_KEY: InjectionKey<ComputedRef<FileUploadItemContextValue>>;
@@ -0,0 +1,4 @@
1
+ //#region src/Components/FileUpload/fileUploadInjectionKey.ts
2
+ var e = Symbol("bridge-file-upload");
3
+ //#endregion
4
+ export { e as FILE_UPLOAD_KEY };
@@ -1,3 +1,3 @@
1
1
  export { useFileUpload } from './composables/useFileUpload';
2
- export type { FileUploadClasses, FileUploadColorOverrides, FileUploadCustomProps, FileUploadEmits, FileUploadItemSlotProps, FileUploadOwnProps, FileUploadProps, FileUploadRoundedOverrides, FileUploadSizeOverrides, FileUploadSlots, FileUploadVariantOverrides, } from './fileUpload.types';
2
+ export type { FileUploadClasses, FileUploadColorOverrides, FileUploadCustomProps, FileUploadEmits, FileUploadItemSlotProps, FileUploadItemSlots, FileUploadItemState, FileUploadListSlotProps, FileUploadModel, FileUploadOrientationOverrides, FileUploadOwnProps, FileUploadProps, FileUploadRemote, FileUploadRoundedOverrides, FileUploadSizeOverrides, FileUploadSlots, FileUploadValue, FileUploadVariantOverrides, } from './fileUpload.types';
3
3
  export { default as FileUpload } from './FileUpload.vue';
@@ -0,0 +1,5 @@
1
+ import e from "./FileUploadItem.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/FileUploadItem/FileUploadItem.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,12 @@
1
+ import { FileUploadItemSlots } from '../FileUpload/fileUpload.types';
2
+ import { FileUploadItemOwnProps } from './fileUploadItem.types';
3
+ type __VLS_Slots = FileUploadItemSlots;
4
+ declare const __VLS_base: import('vue').DefineComponent<FileUploadItemOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FileUploadItemOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -0,0 +1,83 @@
1
+ import { hasNamedSlot as e } from "../../Utils/slotOrProp.js";
2
+ import t from "../Icon/Icon.js";
3
+ import n from "../Button/Button.js";
4
+ import { useFileUploadItem as r } from "./composables/useFileUploadItem.js";
5
+ import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v } from "vue";
6
+ //#region src/Components/FileUploadItem/FileUploadItem.vue?vue&type=script&setup=true&lang.ts
7
+ var y = {
8
+ key: 0,
9
+ class: "flex shrink-0 items-center"
10
+ }, b = ["src"], x = /*@__PURE__*/ l({
11
+ inheritAttrs: !1,
12
+ __name: "FileUploadItem",
13
+ props: {
14
+ description: {},
15
+ orientation: {},
16
+ index: {},
17
+ isImage: { type: Boolean },
18
+ metaLabel: {},
19
+ previewUrl: {},
20
+ remove: { type: Function },
21
+ retry: { type: Function },
22
+ sizeLabel: {},
23
+ value: {}
24
+ },
25
+ setup(l) {
26
+ let x = l, S = v(), { name: C, media: w, retry: T, color: E, remove: D, rounded: O, disabled: k, rootBind: A, showRetry: j, mediaBind: M, titleBind: N, contentBind: P, actionsBind: F, statusLabel: I, descriptionBind: L, showDescription: R } = r(x), z = i(() => w.value.kind === "image" ? w.value.src : void 0), B = i(() => w.value.kind === "icon" ? w.value.icon : "download"), V = i(() => w.value.kind === "icon" && w.value.spin);
27
+ function H() {
28
+ T.value?.();
29
+ }
30
+ function U() {
31
+ D.value();
32
+ }
33
+ return (r, i) => (m(), s("li", p(u(_(A))), [
34
+ _(e)(_(S), "start") ? (m(), s("div", y, [h(r.$slots, "start", p(u(x)))])) : o("", !0),
35
+ c("div", p(u(_(M))), [z.value ? (m(), s("img", {
36
+ key: 0,
37
+ alt: "",
38
+ src: z.value
39
+ }, null, 8, b)) : (m(), a(_(t), {
40
+ key: 1,
41
+ icon: B.value,
42
+ class: f(V.value ? "animate-spin" : void 0)
43
+ }, null, 8, ["icon", "class"]))], 16),
44
+ c("div", p(u(_(P))), [c("p", p(u(_(N))), g(_(C)), 17), _(R) ? (m(), s("p", p(d({ key: 0 }, _(L))), g(_(I)), 17)) : o("", !0)], 16),
45
+ c("div", p(u(_(F))), [_(j) ? (m(), a(_(n), {
46
+ key: 0,
47
+ size: "sm",
48
+ type: "button",
49
+ color: "error",
50
+ icon: "refresh",
51
+ variant: "flat",
52
+ density: "mini",
53
+ rounded: _(O),
54
+ onClick: H,
55
+ disabled: _(k),
56
+ "aria-label": `Retry ${_(C)}`
57
+ }, null, 8, [
58
+ "rounded",
59
+ "disabled",
60
+ "aria-label"
61
+ ])) : o("", !0), _(e)(_(S), "end") ? h(r.$slots, "end", p(u(x)), void 0, void 0, 1) : (m(), a(_(n), {
62
+ key: 2,
63
+ size: "sm",
64
+ icon: "clear",
65
+ type: "button",
66
+ variant: "flat",
67
+ density: "mini",
68
+ color: _(E),
69
+ rounded: _(O),
70
+ disabled: _(k),
71
+ onClick: U,
72
+ "aria-label": `Remove ${_(C)}`
73
+ }, null, 8, [
74
+ "color",
75
+ "rounded",
76
+ "disabled",
77
+ "aria-label"
78
+ ]))], 16)
79
+ ], 16));
80
+ }
81
+ });
82
+ //#endregion
83
+ export { x as default };