@bridge-ui/vue 0.0.5 → 0.0.6

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 (77) hide show
  1. package/dist/Adapters/I18n/index.d.ts +1 -0
  2. package/dist/Adapters/I18n/index.js +2 -0
  3. package/dist/Adapters/I18n/useI18nAdapter.d.ts +12 -0
  4. package/dist/Adapters/I18n/useI18nAdapter.js +13 -0
  5. package/dist/Adapters/Icon/iconSource.types.d.ts +11 -0
  6. package/dist/Adapters/Icon/index.d.ts +2 -0
  7. package/dist/Adapters/Icon/index.js +2 -0
  8. package/dist/Adapters/Icon/useIconAdapter.d.ts +11 -0
  9. package/dist/Adapters/Icon/useIconAdapter.js +13 -0
  10. package/dist/Adapters/index.d.ts +3 -0
  11. package/dist/Adapters/index.js +3 -0
  12. package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +1 -5
  13. package/dist/Components/Alert/alert.types.d.ts +2 -2
  14. package/dist/Components/Alert/alertDefaultIcons.d.ts +2 -2
  15. package/dist/Components/Alert/alertDefaultIcons.js +9 -10
  16. package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
  17. package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/Components/Avatar/avatar.types.d.ts +2 -2
  19. package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
  20. package/dist/Components/Avatar/composables/useAvatar.js +43 -44
  21. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +24 -25
  22. package/dist/Components/Button/button.types.d.ts +4 -4
  23. package/dist/Components/Button/composables/useButton.d.ts +1 -1
  24. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +25 -25
  25. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
  26. package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +8 -9
  27. package/dist/Components/FormControl/composables/useFormControl.d.ts +1 -1
  28. package/dist/Components/FormField/composables/useFormField.d.ts +4 -4
  29. package/dist/Components/FormField/composables/useFormField.js +98 -99
  30. package/dist/Components/FormField/formField.types.d.ts +5 -5
  31. package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +7 -7
  32. package/dist/Components/Icon/composables/useIcon.d.ts +2 -0
  33. package/dist/Components/Icon/composables/useIcon.js +20 -18
  34. package/dist/Components/Icon/icon.types.d.ts +3 -3
  35. package/dist/Components/Label/composables/useLabel.d.ts +1 -1
  36. package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +2 -2
  37. package/dist/Components/Link/link.types.d.ts +3 -3
  38. package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
  39. package/dist/Components/ListItem/composables/useListItem.js +75 -76
  40. package/dist/Components/ListItem/listItem.types.d.ts +2 -2
  41. package/dist/Components/Listbox/Listbox.vue.d.ts +0 -2
  42. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +73 -72
  43. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +40 -40
  44. package/dist/Components/NumberField/composables/useNumberField.d.ts +6 -6
  45. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +24 -24
  46. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +6 -6
  47. package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
  48. package/dist/Components/Select/Select.vue.d.ts +0 -1
  49. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +62 -61
  50. package/dist/Components/Select/composables/useSelect.d.ts +8 -8
  51. package/dist/Components/Select/composables/useSelect.js +214 -214
  52. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +81 -75
  53. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +4 -4
  54. package/dist/Components/Snackbar/snackbar.types.d.ts +2 -2
  55. package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +3 -3
  56. package/dist/Components/Snackbar/snackbarDefaultIcons.js +9 -10
  57. package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
  58. package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +2 -2
  59. package/dist/Components/Tab/tab.types.d.ts +3 -3
  60. package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +2 -2
  61. package/dist/Components/TabItem/tabItem.types.d.ts +3 -3
  62. package/dist/Components/Tabs/composables/useTabs.d.ts +468 -4
  63. package/dist/Components/Tabs/tabsInjectionKey.d.ts +5 -5
  64. package/dist/Components/TextField/composables/useTextField.d.ts +6 -6
  65. package/dist/Components/Textarea/composables/useTextarea.d.ts +6 -6
  66. package/dist/Components/Tooltip/Tooltip.js +5 -0
  67. package/dist/Components/Tooltip/Tooltip.vue.d.ts +35 -0
  68. package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +73 -0
  69. package/dist/Components/Tooltip/composables/useTooltip.d.ts +50 -0
  70. package/dist/Components/Tooltip/composables/useTooltip.js +208 -0
  71. package/dist/Components/Tooltip/index.d.ts +4 -0
  72. package/dist/Components/Tooltip/index.js +3 -0
  73. package/dist/Components/Tooltip/tooltip.types.d.ts +166 -0
  74. package/dist/Provider/createBridgeUIApi.js +2 -1
  75. package/dist/index.d.ts +7 -1
  76. package/dist/index.js +80 -76
  77. package/package.json +20 -3
@@ -0,0 +1 @@
1
+ export { setI18nAdapterForTests, useI18nAdapter, } from './useI18nAdapter';
@@ -0,0 +1,2 @@
1
+ import { setI18nAdapterForTests as e, useI18nAdapter as t } from "./useI18nAdapter.js";
2
+ export { e as setI18nAdapterForTests, t as useI18nAdapter };
@@ -0,0 +1,12 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { I18nAdapter } from '@bridge-ui/core';
3
+ /**
4
+ * Sets a process-wide i18n adapter fallback. For tests only.
5
+ */
6
+ export declare function setI18nAdapterForTests(adapter: undefined | I18nAdapter): void;
7
+ /**
8
+ * Returns the active i18n adapter from {@link BridgeUIProvider}.
9
+ * When unset, `resolveMessage` returns the English source string
10
+ * (see `examples/adapters/vue`).
11
+ */
12
+ export declare function useI18nAdapter(): ComputedRef<undefined | I18nAdapter>;
@@ -0,0 +1,13 @@
1
+ import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
2
+ import { computed as t } from "vue";
3
+ //#region src/Adapters/I18n/useI18nAdapter.ts
4
+ var n;
5
+ function r(e) {
6
+ n = e;
7
+ }
8
+ function i() {
9
+ let r = e();
10
+ return t(() => r?.global.value.i18n ?? n);
11
+ }
12
+ //#endregion
13
+ export { r as setI18nAdapterForTests, i as useI18nAdapter };
@@ -0,0 +1,11 @@
1
+ import { Component } from 'vue';
2
+ import { IconSource as CoreIconSource, IconSourceValueOverrides, SemanticIconName } from '@bridge-ui/core';
3
+ /**
4
+ * Renderable icon component accepted by Bridge Icon props.
5
+ */
6
+ export type IconElement = Component;
7
+ /**
8
+ * Semantic icon name, concrete icon component, or an augmented native value.
9
+ */
10
+ export type IconSource = CoreIconSource<IconElement>;
11
+ export type { IconSourceValueOverrides, SemanticIconName };
@@ -0,0 +1,2 @@
1
+ export type { IconElement, IconSource, IconSourceValueOverrides, SemanticIconName, } from './iconSource.types';
2
+ export { setIconAdapterForTests, useIconAdapter, } from './useIconAdapter';
@@ -0,0 +1,2 @@
1
+ import { setIconAdapterForTests as e, useIconAdapter as t } from "./useIconAdapter.js";
2
+ export { e as setIconAdapterForTests, t as useIconAdapter };
@@ -0,0 +1,11 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { IconAdapter } from '@bridge-ui/core';
3
+ /**
4
+ * Sets a process-wide icon adapter fallback. For tests only.
5
+ */
6
+ export declare function setIconAdapterForTests(adapter: undefined | IconAdapter): void;
7
+ /**
8
+ * Returns the active icon adapter from {@link BridgeUIProvider}.
9
+ * Semantic icon names require `global.icons` (see `examples/adapters/vue`).
10
+ */
11
+ export declare function useIconAdapter(): ComputedRef<undefined | IconAdapter>;
@@ -0,0 +1,13 @@
1
+ import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
2
+ import { computed as t } from "vue";
3
+ //#region src/Adapters/Icon/useIconAdapter.ts
4
+ var n;
5
+ function r(e) {
6
+ n = e;
7
+ }
8
+ function i() {
9
+ let r = e();
10
+ return t(() => r?.global.value.icons ?? n);
11
+ }
12
+ //#endregion
13
+ export { r as setIconAdapterForTests, i as useIconAdapter };
@@ -0,0 +1,3 @@
1
+ export { setI18nAdapterForTests, useI18nAdapter } from './I18n';
2
+ export { setIconAdapterForTests, useIconAdapter } from './Icon';
3
+ export type { IconElement, IconSource, IconSourceValueOverrides, SemanticIconName, } from './Icon';
@@ -0,0 +1,3 @@
1
+ import { setI18nAdapterForTests as e, useI18nAdapter as t } from "./I18n/useI18nAdapter.js";
2
+ import { setIconAdapterForTests as n, useIconAdapter as r } from "./Icon/useIconAdapter.js";
3
+ export { e as setI18nAdapterForTests, n as setIconAdapterForTests, t as useI18nAdapter, r as useIconAdapter };
@@ -13,11 +13,7 @@ var v = {
13
13
  classes: {},
14
14
  color: {},
15
15
  customProps: {},
16
- icon: { type: [
17
- null,
18
- Function,
19
- Object
20
- ] },
16
+ icon: {},
21
17
  padding: {},
22
18
  rounded: {},
23
19
  shadow: {},
@@ -1,6 +1,6 @@
1
- import { LucideIcon } from '@lucide/vue';
2
1
  import { HTMLAttributes, Slot } from 'vue';
3
2
  import { AlertColor, AlertPadding, AlertRounded, AlertShadow, AlertVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
3
+ import { IconSource } from '../../Adapters/Icon';
4
4
  import { IconProps } from '../Icon';
5
5
  export interface AlertColorOverrides {}
6
6
  export interface AlertShadowOverrides {}
@@ -73,7 +73,7 @@ export interface AlertOwnProps {
73
73
  *
74
74
  * @default undefined
75
75
  */
76
- icon?: null | LucideIcon;
76
+ icon?: null | IconSource;
77
77
  /**
78
78
  * The padding to apply to the alert.
79
79
  *
@@ -1,4 +1,4 @@
1
- import { LucideIcon } from '@lucide/vue';
2
1
  import { AlertColor } from '@bridge-ui/core/Tokens/Alert';
2
+ import { IconSource } from '../../Adapters/Icon';
3
3
  /** Library fallbacks when neither the `icon` prop nor theme `icon` is set. */
4
- export declare const alertDefaultIcons: Record<keyof AlertColor, LucideIcon>;
4
+ export declare const alertDefaultIcons: Record<keyof AlertColor, IconSource>;
@@ -1,13 +1,12 @@
1
- import { Bell as e, CircleAlert as t, CircleCheck as n, CircleX as r, Info as i, TriangleAlert as a } from "@lucide/vue";
2
1
  //#region src/Components/Alert/alertDefaultIcons.ts
3
- var o = {
4
- dark: i,
5
- primary: e,
6
- error: r,
7
- secondary: i,
8
- info: t,
9
- success: n,
10
- warning: a
2
+ var e = {
3
+ dark: "info",
4
+ info: "alert",
5
+ error: "error",
6
+ primary: "bell",
7
+ secondary: "info",
8
+ success: "success",
9
+ warning: "warning"
11
10
  };
12
11
  //#endregion
13
- export { o as alertDefaultIcons };
12
+ export { e as alertDefaultIcons };
@@ -1,5 +1,5 @@
1
- import { LucideIcon } from '@lucide/vue';
2
1
  import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
2
+ import { IconSource } from '../../../Adapters/Icon';
3
3
  import { AlertOwnProps, AlertProps } from '..';
4
4
  type AlertLibDefaults = LibDefaultsShape<AlertOwnProps, "color" | "shadow" | "padding" | "rounded" | "variant">;
5
5
  type AlertMerged = MergeLibDefaults<AlertOwnProps, AlertLibDefaults>;
@@ -12,7 +12,7 @@ export declare function useAlert(props: AlertOwnProps, libDefaults: AlertLibDefa
12
12
  iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
13
13
  rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<AlertProps, "color" | "icon" | "classes" | "customProps" | "title" | "padding" | "rounded" | "shadow" | "variant">>>;
14
14
  titleBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
15
- resolvedIcon: import('vue').ComputedRef<LucideIcon | null>;
15
+ resolvedIcon: import('vue').ComputedRef<IconSource | null>;
16
16
  hasDefaultBody: import('vue').ComputedRef<boolean>;
17
17
  };
18
18
  export {};
@@ -12,7 +12,7 @@ var p = /* @__PURE__ */ a({
12
12
  color: {},
13
13
  customProps: {},
14
14
  fallback: {},
15
- icon: { type: [Function, Object] },
15
+ icon: {},
16
16
  rounded: {},
17
17
  size: {},
18
18
  src: {}
@@ -1,6 +1,6 @@
1
- import { LucideIcon } from '@lucide/vue';
2
1
  import { HTMLAttributes, ImgHTMLAttributes, Slot } from 'vue';
3
2
  import { AvatarColor, AvatarRounded, AvatarSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
3
+ import { IconSource } from '../../Adapters/Icon';
4
4
  import { IconProps } from '../Icon';
5
5
  export interface AvatarSizeOverrides {}
6
6
  export interface AvatarColorOverrides {}
@@ -81,7 +81,7 @@ export interface AvatarOwnProps {
81
81
  *
82
82
  * @default undefined
83
83
  */
84
- icon?: LucideIcon;
84
+ icon?: IconSource;
85
85
  /**
86
86
  * The roundedness of the avatar.
87
87
  *
@@ -15,7 +15,7 @@ export declare function useAvatar(props: AvatarProps, libDefaults: AvatarLibDefa
15
15
  src: string | undefined;
16
16
  }>>;
17
17
  fallbackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
18
- resolvedIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
18
+ resolvedIcon: import('vue').ComputedRef<import('../../..').IconSource>;
19
19
  hasFallbackSlot: import('vue').ComputedRef<boolean>;
20
20
  hasFallbackText: import('vue').ComputedRef<boolean>;
21
21
  hasCustomContent: import('vue').ComputedRef<boolean>;
@@ -3,10 +3,9 @@ import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistr
3
3
  import { computed as i, useAttrs as a, useSlots as o } from "vue";
4
4
  import { get as s, isEmpty as c, isNil as l } from "es-toolkit/compat";
5
5
  import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
6
- import { User as p } from "@lucide/vue";
7
- import { colorProps as m, iconSizeProps as h, roundedProps as g, sizeProps as _ } from "@bridge-ui/core/Tokens/Avatar";
6
+ import { colorProps as p, iconSizeProps as m, roundedProps as h, sizeProps as g } from "@bridge-ui/core/Tokens/Avatar";
8
7
  //#region src/Components/Avatar/composables/useAvatar.ts
9
- var v = [
8
+ var _ = [
10
9
  "alt",
11
10
  "src",
12
11
  "icon",
@@ -17,58 +16,58 @@ var v = [
17
16
  "fallback",
18
17
  "customProps"
19
18
  ];
20
- function y(y, b) {
21
- let x = a(), S = o(), C = i(() => f({
22
- bridgeKeys: v,
19
+ function v(v, y) {
20
+ let b = a(), x = o(), S = i(() => f({
21
+ bridgeKeys: _,
23
22
  props: {
24
- ...x,
25
- ...y
23
+ ...b,
24
+ ...v
26
25
  }
27
- })), { merged: w, entry: T } = n({
28
- libDefaults: b,
26
+ })), { merged: C, entry: w } = n({
27
+ libDefaults: y,
29
28
  componentName: "Avatar",
30
- props: () => C.value.componentProps
31
- }), E = r({
32
- entry: T,
33
- props: () => C.value.componentProps
34
- }), D = i(() => e(S, "default")), O = i(() => !l(w.value.src) && !c(w.value.src)), k = i(() => e(S, "fallback")), A = i(() => !l(w.value.fallback) && !c(w.value.fallback)), j = i(() => w.value.icon ?? p), M = i(() => !O.value && !D.value), N = i(() => s(d(_, T.value?.tokens?.size), w.value.size)), P = i(() => s(d(m, T.value?.tokens?.color), w.value.color)), F = i(() => s(d(g, T.value?.tokens?.rounded), w.value.rounded)), I = i(() => s(d(h, T.value?.tokens?.iconSize), w.value.size)), L = i(() => w.value.customProps), R = i(() => t(L.value?.root, C.value.inheritedAttrs, u({
29
+ props: () => S.value.componentProps
30
+ }), T = r({
31
+ entry: w,
32
+ props: () => S.value.componentProps
33
+ }), E = i(() => e(x, "default")), D = i(() => !l(C.value.src) && !c(C.value.src)), O = i(() => e(x, "fallback")), k = i(() => !l(C.value.fallback) && !c(C.value.fallback)), A = i(() => C.value.icon ?? "user"), j = i(() => !D.value && !E.value), M = i(() => s(d(g, w.value?.tokens?.size), C.value.size)), N = i(() => s(d(p, w.value?.tokens?.color), C.value.color)), P = i(() => s(d(h, w.value?.tokens?.rounded), C.value.rounded)), F = i(() => s(d(m, w.value?.tokens?.iconSize), C.value.size)), I = i(() => C.value.customProps), L = i(() => t(I.value?.root, S.value.inheritedAttrs, u({
35
34
  "inline-flex shrink-0 items-center justify-center overflow-hidden": !0,
36
- [E.value.root ?? ""]: !0,
37
- [F.value ?? ""]: !0,
38
- [N.value ?? ""]: M.value || D.value || O.value,
39
- [s(P.value, "background") ?? ""]: M.value,
40
- [s(P.value, "text") ?? ""]: M.value
41
- }))), z = i(() => t(L.value?.image, {
42
- alt: w.value.alt,
43
- src: w.value.src
35
+ [T.value.root ?? ""]: !0,
36
+ [P.value ?? ""]: !0,
37
+ [M.value ?? ""]: j.value || E.value || D.value,
38
+ [s(N.value, "background") ?? ""]: j.value,
39
+ [s(N.value, "text") ?? ""]: j.value
40
+ }))), R = i(() => t(I.value?.image, {
41
+ alt: C.value.alt,
42
+ src: C.value.src
44
43
  }, u({
45
44
  "shrink-0 object-cover object-center": !0,
46
- [N.value ?? ""]: !0,
47
- [F.value ?? ""]: !0,
48
- [E.value.image ?? ""]: !0
49
- }))), B = i(() => t(L.value?.fallback, {}, u({
45
+ [M.value ?? ""]: !0,
46
+ [P.value ?? ""]: !0,
47
+ [T.value.image ?? ""]: !0
48
+ }))), z = i(() => t(I.value?.fallback, {}, u({
50
49
  "font-medium": !0,
51
- [s(I.value, "label") ?? ""]: !0,
52
- [s(P.value, "text") ?? ""]: !0,
53
- [E.value.fallback ?? ""]: !0
50
+ [s(F.value, "label") ?? ""]: !0,
51
+ [s(N.value, "text") ?? ""]: !0,
52
+ [T.value.fallback ?? ""]: !0
54
53
  })));
55
54
  return {
56
- slots: S,
57
- merged: w,
58
- rootBind: R,
59
- iconBind: i(() => t(L.value?.icon, {}, u({
55
+ slots: x,
56
+ merged: C,
57
+ rootBind: L,
58
+ iconBind: i(() => t(I.value?.icon, {}, u({
60
59
  "shrink-0": !0,
61
- [s(I.value, "icon") ?? ""]: !0,
62
- [s(P.value, "text") ?? ""]: !0
60
+ [s(F.value, "icon") ?? ""]: !0,
61
+ [s(N.value, "text") ?? ""]: !0
63
62
  }))),
64
- hasImage: O,
65
- imageBind: z,
66
- fallbackBind: B,
67
- resolvedIcon: j,
68
- hasFallbackSlot: k,
69
- hasFallbackText: A,
70
- hasCustomContent: D
63
+ hasImage: D,
64
+ imageBind: R,
65
+ fallbackBind: z,
66
+ resolvedIcon: A,
67
+ hasFallbackSlot: O,
68
+ hasFallbackText: k,
69
+ hasCustomContent: E
71
70
  };
72
71
  }
73
72
  //#endregion
74
- export { y as useAvatar };
73
+ export { v as useAvatar };
@@ -2,9 +2,8 @@ import { hasNamedSlot as e, isPropPresent as t, resolveNamedSlot as n } from "..
2
2
  import r from "../Icon/Icon.js";
3
3
  import { useButton as i } from "./composables/useButton.js";
4
4
  import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createTextVNode as l, defineComponent as u, mergeProps as d, normalizeProps as f, openBlock as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
5
- import { Loader2 as y } from "@lucide/vue";
6
5
  //#region src/Components/Button/Button.vue?vue&type=script&setup=true&lang.ts
7
- var b = /* @__PURE__ */ u({
6
+ var y = /* @__PURE__ */ u({
8
7
  inheritAttrs: !1,
9
8
  __name: "Button",
10
9
  props: {
@@ -14,19 +13,19 @@ var b = /* @__PURE__ */ u({
14
13
  customProps: {},
15
14
  density: {},
16
15
  disabled: { type: Boolean },
17
- endIcon: { type: [Function, Object] },
16
+ endIcon: {},
18
17
  full: { type: Boolean },
19
18
  href: {},
20
- icon: { type: [Function, Object] },
19
+ icon: {},
21
20
  loading: { type: Boolean },
22
21
  rounded: {},
23
22
  size: {},
24
- startIcon: { type: [Function, Object] },
23
+ startIcon: {},
25
24
  text: {},
26
25
  variant: {}
27
26
  },
28
27
  setup(u) {
29
- let b = u, x = _(), { tag: S, merged: C, isMini: w, iconBind: T, rootBind: E, rootHref: D, rootType: O, endIconBind: k, endSlotBind: A, rootAriaBusy: j, rootDisabled: M, startIconBind: N, startSlotBind: P, loadingIconBind: F, rootAriaDisabled: I } = i(b, {
28
+ let y = u, b = _(), { tag: x, merged: S, isMini: C, iconBind: w, rootBind: T, rootHref: E, rootType: D, endIconBind: O, endSlotBind: k, rootAriaBusy: A, rootDisabled: j, startIconBind: M, startSlotBind: N, loadingIconBind: P, rootAriaDisabled: F } = i(y, {
30
29
  size: "md",
31
30
  as: "button",
32
31
  rounded: "md",
@@ -34,29 +33,29 @@ var b = /* @__PURE__ */ u({
34
33
  variant: "solid",
35
34
  density: "default"
36
35
  });
37
- return (i, u) => (p(), o(m(g(S)), d({ href: g(D) }, g(E), {
38
- type: g(O),
39
- disabled: g(M),
40
- "aria-busy": g(j),
41
- "aria-disabled": g(I)
36
+ return (i, u) => (p(), o(m(g(x)), d({ href: g(E) }, g(T), {
37
+ type: g(D),
38
+ disabled: g(j),
39
+ "aria-busy": g(A),
40
+ "aria-disabled": g(F)
42
41
  }), {
43
- default: v(() => [g(C).loading ? (p(), o(g(r), d({
42
+ default: v(() => [g(S).loading ? (p(), o(g(r), d({
44
43
  key: 0,
45
- icon: g(y),
46
- size: g(C).size
47
- }, g(F)), null, 16, ["icon", "size"])) : g(w) ? (p(), c(a, { key: 1 }, [g(e)(g(x), "default") ? (p(), o(m(g(n)(g(x), "default")), { key: 0 })) : g(C).icon ? (p(), o(g(r), d({ key: 1 }, g(T), {
48
- icon: g(C).icon,
49
- size: g(C).size
44
+ icon: "loader",
45
+ size: g(S).size
46
+ }, g(P)), null, 16, ["size"])) : g(C) ? (p(), c(a, { key: 1 }, [g(e)(g(b), "default") ? (p(), o(m(g(n)(g(b), "default")), { key: 0 })) : g(S).icon ? (p(), o(g(r), d({ key: 1 }, g(w), {
47
+ icon: g(S).icon,
48
+ size: g(S).size
50
49
  }), null, 16, ["icon", "size"])) : s("", !0)], 64)) : (p(), c(a, { key: 2 }, [
51
- g(C).startIcon ? (p(), o(g(r), d({
50
+ g(S).startIcon ? (p(), o(g(r), d({
52
51
  key: 0,
53
- size: g(C).size
54
- }, g(N), { icon: g(C).startIcon }), null, 16, ["size", "icon"])) : g(e)(g(x), "start") ? (p(), c("div", f(d({ key: 1 }, g(P))), [(p(), o(m(g(n)(g(x), "start"))))], 16)) : s("", !0),
55
- g(t)(g(C).text) ? (p(), c(a, { key: 2 }, [l(h(g(C).text), 1)], 64)) : g(e)(g(x), "default") ? (p(), o(m(g(n)(g(x), "default")), { key: 3 })) : s("", !0),
56
- g(C).endIcon ? (p(), o(g(r), d({
52
+ size: g(S).size
53
+ }, g(M), { icon: g(S).startIcon }), null, 16, ["size", "icon"])) : g(e)(g(b), "start") ? (p(), c("div", f(d({ key: 1 }, g(N))), [(p(), o(m(g(n)(g(b), "start"))))], 16)) : s("", !0),
54
+ g(t)(g(S).text) ? (p(), c(a, { key: 2 }, [l(h(g(S).text), 1)], 64)) : g(e)(g(b), "default") ? (p(), o(m(g(n)(g(b), "default")), { key: 3 })) : s("", !0),
55
+ g(S).endIcon ? (p(), o(g(r), d({
57
56
  key: 4,
58
- size: g(C).size
59
- }, g(k), { icon: g(C).endIcon }), null, 16, ["size", "icon"])) : g(e)(g(x), "end") ? (p(), c("div", f(d({ key: 5 }, g(A))), [(p(), o(m(g(n)(g(x), "end"))))], 16)) : s("", !0)
57
+ size: g(S).size
58
+ }, g(O), { icon: g(S).endIcon }), null, 16, ["size", "icon"])) : g(e)(g(b), "end") ? (p(), c("div", f(d({ key: 5 }, g(k))), [(p(), o(m(g(n)(g(b), "end"))))], 16)) : s("", !0)
60
59
  ], 64))]),
61
60
  _: 1
62
61
  }, 16, [
@@ -69,4 +68,4 @@ var b = /* @__PURE__ */ u({
69
68
  }
70
69
  });
71
70
  //#endregion
72
- export { b as default };
71
+ export { y as default };
@@ -1,6 +1,6 @@
1
- import { LucideIcon } from '@lucide/vue';
2
1
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, Slot } from 'vue';
3
2
  import { ButtonColor, ButtonDensity, ButtonRounded, ButtonSize, ButtonVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
3
+ import { IconSource } from '../../Adapters/Icon';
4
4
  import { IconProps } from '../Icon';
5
5
  export interface ButtonSizeOverrides {}
6
6
  export interface ButtonColorOverrides {}
@@ -102,7 +102,7 @@ export interface ButtonOwnProps {
102
102
  *
103
103
  * @default undefined
104
104
  */
105
- endIcon?: LucideIcon;
105
+ endIcon?: IconSource;
106
106
  /**
107
107
  * Whether the button is full width.
108
108
  *
@@ -120,7 +120,7 @@ export interface ButtonOwnProps {
120
120
  *
121
121
  * @default undefined
122
122
  */
123
- icon?: LucideIcon;
123
+ icon?: IconSource;
124
124
  /**
125
125
  * Whether the button is loading.
126
126
  *
@@ -144,7 +144,7 @@ export interface ButtonOwnProps {
144
144
  *
145
145
  * @default undefined
146
146
  */
147
- startIcon?: LucideIcon;
147
+ startIcon?: IconSource;
148
148
  /**
149
149
  * Label text when the default slot is not used.
150
150
  *
@@ -7,7 +7,7 @@ export declare function useButton(props: ButtonOwnProps, libDefaults: ButtonLibD
7
7
  merged: import('vue').ComputedRef<ButtonMerged>;
8
8
  isMini: import('vue').ComputedRef<boolean>;
9
9
  iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
10
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonProps, "color" | "href" | "icon" | "size" | "classes" | "customProps" | "text" | "full" | "rounded" | "variant" | "loading" | "density" | "as" | "disabled" | "endIcon" | "startIcon">>>;
10
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonProps, "color" | "href" | "icon" | "size" | "classes" | "customProps" | "full" | "rounded" | "variant" | "text" | "loading" | "density" | "as" | "disabled" | "endIcon" | "startIcon">>>;
11
11
  rootHref: import('vue').ComputedRef<string | undefined>;
12
12
  rootType: import('vue').ComputedRef<"button" | undefined>;
13
13
  endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
@@ -1,16 +1,16 @@
1
- import e from "../FormControl/FormControl.js";
2
- import { useCheckbox as t } from "./composables/useCheckbox.js";
3
- import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, guardReactiveProps as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeProps as f, openBlock as p, ref as m, unref as h, useAttrs as g, useModel as _, withCtx as v } from "vue";
4
- import { cn as y } from "@bridge-ui/core";
5
- import { Check as b } from "@lucide/vue";
1
+ import { useIconAdapter as e } from "../../Adapters/Icon/useIconAdapter.js";
2
+ import t from "../FormControl/FormControl.js";
3
+ import { useCheckbox as n } from "./composables/useCheckbox.js";
4
+ import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, guardReactiveProps as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, ref as h, resolveDynamicComponent as g, unref as _, useAttrs as v, useModel as y, withCtx as b } from "vue";
5
+ import { cn as x, resolveIconSource as S } from "@bridge-ui/core";
6
6
  //#region src/Components/Checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
7
- var x = ["for"], S = ["checked"], C = {
7
+ var C = ["for"], w = ["checked"], T = {
8
8
  key: 1,
9
9
  class: "block h-0.5 w-[55%] rounded-full bg-white"
10
- }, w = /* @__PURE__ */ s({
10
+ }, E = /* @__PURE__ */ c({
11
11
  inheritAttrs: !1,
12
12
  __name: "Checkbox",
13
- props: /* @__PURE__ */ l({
13
+ props: /* @__PURE__ */ u({
14
14
  classes: {},
15
15
  color: {},
16
16
  customProps: {},
@@ -37,34 +37,34 @@ var x = ["for"], S = ["checked"], C = {
37
37
  modelModifiers: {}
38
38
  }),
39
39
  emits: ["update:modelValue"],
40
- setup(s) {
41
- let l = g(), w = s, T = m(!!w.defaultChecked), E = _(s, "modelValue"), { merged: D, iconBind: O, inputRef: k, fieldBind: A, inputBind: j, isChecked: M, formControl: N, controlBind: P } = t(() => ({
42
- ...l,
43
- ...w
40
+ setup(c) {
41
+ let u = v(), E = c, D = h(!!E.defaultChecked), O = y(c, "modelValue"), k = r(() => O.value ?? D.value), A = e(), j = r(() => S("check", A.value)), { merged: M, iconBind: N, inputRef: P, fieldBind: F, inputBind: I, isChecked: L, formControl: R, controlBind: z } = n(() => ({
42
+ ...u,
43
+ ...E
44
44
  }), {
45
45
  size: "md",
46
46
  rounded: "sm",
47
47
  color: "primary"
48
- }, n(() => E.value ?? T.value));
49
- function F(e) {
48
+ }, k);
49
+ function B(e) {
50
50
  let t = e.target;
51
- E.value = t.checked, T.value = t.checked;
51
+ O.value = t.checked, D.value = t.checked;
52
52
  }
53
- return (t, n) => (p(), r(h(e), { field: h(N) }, {
54
- default: v(() => [o("label", u(h(A), { for: h(N).controlId.value }), [o("input", u({
53
+ return (e, n) => (m(), i(_(t), { field: _(R) }, {
54
+ default: b(() => [s("label", d(_(F), { for: _(R).controlId.value }), [s("input", d({
55
55
  ref_key: "inputRef",
56
- ref: k
57
- }, h(j), {
58
- checked: h(M),
59
- onChange: F
60
- }), null, 16, S), o("span", f(c(h(P))), [h(M) && !h(D).indeterminate ? (p(), r(h(b), {
56
+ ref: P
57
+ }, _(I), {
58
+ checked: _(L),
59
+ onChange: B
60
+ }), null, 16, w), s("span", p(l(_(z))), [_(L) && !_(M).indeterminate ? (m(), i(g(j.value), {
61
61
  key: 0,
62
62
  "stroke-width": 3,
63
- class: d(h(y)("h-[65%] w-[65%]", h(O).class))
64
- }, null, 8, ["class"])) : h(D).indeterminate ? (p(), a("span", C)) : i("", !0)], 16)], 16, x)]),
63
+ class: f(_(x)("h-[65%] w-[65%]", _(N).class))
64
+ }, null, 8, ["class"])) : _(M).indeterminate ? (m(), o("span", T)) : a("", !0)], 16)], 16, C)]),
65
65
  _: 1
66
66
  }, 8, ["field"]));
67
67
  }
68
68
  });
69
69
  //#endregion
70
- export { w as default };
70
+ export { E as default };
@@ -235,13 +235,13 @@ export declare function useCheckbox(props: MaybeRefOrGetter<CheckboxOwnProps>, l
235
235
  slots: Readonly<{
236
236
  [name: string]: import('vue').Slot<any> | undefined;
237
237
  }>;
238
- merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "size" | "error" | "withoutErrorMessage"> & {
239
- size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
238
+ merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "error" | "size" | "withoutErrorMessage"> & {
240
239
  error: NonNullable<boolean | undefined>;
240
+ size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
241
241
  withoutErrorMessage: NonNullable<boolean | undefined>;
242
242
  }>;
243
243
  rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
244
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
244
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
245
245
  controlId: import('vue').ComputedRef<string>;
246
246
  isDisabled: import('vue').ComputedRef<boolean>;
247
247
  isReadonly: import('vue').ComputedRef<boolean>;
@@ -2,9 +2,8 @@ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp
2
2
  import n from "../Icon/Icon.js";
3
3
  import { useChip as r } from "./composables/useChip.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, normalizeProps as m, openBlock as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useSlots as y } from "vue";
5
- import { X as b } from "@lucide/vue";
6
5
  //#region src/Components/Chip/Chip.vue?vue&type=script&setup=true&lang.ts
7
- var x = /* @__PURE__ */ d({
6
+ var b = /* @__PURE__ */ d({
8
7
  inheritAttrs: !1,
9
8
  __name: "Chip",
10
9
  props: {
@@ -23,13 +22,13 @@ var x = /* @__PURE__ */ d({
23
22
  size: { default: "md" }
24
23
  },
25
24
  emits: ["dismiss"],
26
- setup(d, { emit: x }) {
27
- let S = y(), { merged: C, rootBind: w, labelBind: T, clearBind: E, clearIconSize: D, handleDismiss: O, handleClearKeyDown: k } = r(d, { size: "md" }, x), A = a(() => C.value.customProps?.clearIcon), j = a(() => D.value), M = a(() => e(S, "default") || !!C.value.label);
28
- return (r, a) => (h(), c("span", m(f(v(w))), [M.value ? (h(), c("span", m(p({ key: 0 }, v(T))), [v(e)(v(S), "default") ? (h(), o(g(v(t)(v(S), "default")), { key: 0 })) : (h(), c(i, { key: 1 }, [l(_(d.label), 1)], 64))], 16)) : s("", !0), d.dismissible ? (h(), c("span", p({ key: 1 }, v(E), {
29
- onClick: a[0] ||= (...e) => v(O) && v(O)(...e),
30
- onKeydown: a[1] ||= (...e) => v(k) && v(k)(...e)
31
- }), [u(v(n), p({ icon: v(b) }, A.value, { size: j.value }), null, 16, ["icon", "size"])], 16)) : s("", !0)], 16));
25
+ setup(d, { emit: b }) {
26
+ let x = y(), { merged: S, rootBind: C, labelBind: w, clearBind: T, clearIconSize: E, handleDismiss: D, handleClearKeyDown: O } = r(d, { size: "md" }, b), k = a(() => S.value.customProps?.clearIcon), A = a(() => E.value), j = a(() => e(x, "default") || !!S.value.label);
27
+ return (r, a) => (h(), c("span", m(f(v(C))), [j.value ? (h(), c("span", m(p({ key: 0 }, v(w))), [v(e)(v(x), "default") ? (h(), o(g(v(t)(v(x), "default")), { key: 0 })) : (h(), c(i, { key: 1 }, [l(_(d.label), 1)], 64))], 16)) : s("", !0), d.dismissible ? (h(), c("span", p({ key: 1 }, v(T), {
28
+ onClick: a[0] ||= (...e) => v(D) && v(D)(...e),
29
+ onKeydown: a[1] ||= (...e) => v(O) && v(O)(...e)
30
+ }), [u(v(n), p({ icon: "clear" }, k.value, { size: A.value }), null, 16, ["size"])], 16)) : s("", !0)], 16));
32
31
  }
33
32
  });
34
33
  //#endregion
35
- export { x as default };
34
+ export { b as default };
@@ -11,7 +11,7 @@ export declare function useFormControl(props: MaybeRefOrGetter<Omit<FormControlO
11
11
  }>;
12
12
  merged: import('vue').ComputedRef<FormControlMerged>;
13
13
  rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
14
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
14
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
15
15
  controlId: import('vue').ComputedRef<string>;
16
16
  isDisabled: import('vue').ComputedRef<boolean>;
17
17
  isReadonly: import('vue').ComputedRef<boolean>;