@bridge-ui/vue 0.5.1 → 0.6.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 (60) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -2
  2. package/dist/Components/Alert/alertDefaultIcons.js +1 -0
  3. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +1 -1
  4. package/dist/Components/Autocomplete/composables/useAutocomplete.js +150 -145
  5. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +1 -0
  6. package/dist/Components/Button/button.types.d.ts +6 -0
  7. package/dist/Components/Button/composables/useButton.d.ts +4 -1
  8. package/dist/Components/Button/composables/useButton.js +88 -69
  9. package/dist/Components/ButtonGroup/ButtonGroup.js +5 -0
  10. package/dist/Components/ButtonGroup/ButtonGroup.vue.d.ts +14 -0
  11. package/dist/Components/ButtonGroup/ButtonGroup.vue_vue_type_script_setup_true_lang.js +37 -0
  12. package/dist/Components/ButtonGroup/buttonGroup.types.d.ts +93 -0
  13. package/dist/Components/ButtonGroup/buttonGroupInjectionKey.d.ts +7 -0
  14. package/dist/Components/ButtonGroup/buttonGroupInjectionKey.js +4 -0
  15. package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +16 -0
  16. package/dist/Components/ButtonGroup/composables/useButtonGroup.js +66 -0
  17. package/dist/Components/ButtonGroup/index.d.ts +4 -0
  18. package/dist/Components/ButtonGroup/index.js +4 -0
  19. package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +2 -2
  21. package/dist/Components/Checkbox/composables/useCheckbox.js +1 -1
  22. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +89 -90
  23. package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  24. package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  25. package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/Components/DataTable/DataTableSortButton.vue.d.ts +5 -11
  27. package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +22 -26
  28. package/dist/Components/DataTable/composables/useDataTable.d.ts +0 -3
  29. package/dist/Components/DataTable/composables/useDataTable.js +199 -213
  30. package/dist/Components/FieldOverlay/composables/useFieldOverlay.js +4 -1
  31. package/dist/Components/List/composables/useList.js +1 -1
  32. package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
  33. package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
  34. package/dist/Components/ListItem/composables/useListItem.js +101 -86
  35. package/dist/Components/ListSection/composables/useListSection.js +34 -31
  36. package/dist/Components/ListSection/listSection.types.d.ts +2 -1
  37. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -82
  38. package/dist/Components/Listbox/collectComposedListboxOptions.d.ts +5 -0
  39. package/dist/Components/Listbox/collectComposedListboxOptions.js +27 -0
  40. package/dist/Components/Radio/composables/useRadio.js +2 -1
  41. package/dist/Components/Select/composables/useSelect.d.ts +1 -1
  42. package/dist/Components/Select/composables/useSelect.js +104 -99
  43. package/dist/Components/Sidebar/composables/useSidebarListItem.js +29 -28
  44. package/dist/Components/Sidebar/composables/useSidebarTrigger.js +14 -14
  45. package/dist/Components/Slider/composables/useSlider.js +53 -53
  46. package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -0
  47. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +11 -10
  48. package/dist/Components/TimePanel/composables/useTimePanel.js +106 -106
  49. package/dist/augments.d.ts +5 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/index.js +150 -147
  52. package/docs/README.md +1 -0
  53. package/docs/components/Badge.md +2 -0
  54. package/docs/components/Button.md +5 -1
  55. package/docs/components/ButtonGroup.md +124 -0
  56. package/docs/components/DataTable.md +4 -0
  57. package/docs/components/Divider.md +1 -0
  58. package/docs/components/ToggleGroup.md +1 -1
  59. package/docs/examples/i18n-dictionary.ts +3 -0
  60. package/package.json +2 -2
@@ -1,10 +1,11 @@
1
1
  import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
- import { computed as r, useAttrs as i } from "vue";
3
- import { get as a, includes as o, isNil as s } from "es-toolkit/compat";
4
- import { buttonDensityProps as c, buttonRoundedProps as l, buttonVariantProps as u } from "@bridge-ui/core/Tokens";
5
- import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core/Utils";
2
+ import { BUTTON_GROUP_INJECTION_KEY as r } from "../../ButtonGroup/buttonGroupInjectionKey.js";
3
+ import { computed as i, inject as a, useAttrs as o } from "vue";
4
+ import { get as s, includes as c, isNil as l } from "es-toolkit/compat";
5
+ import { buttonDensityProps as u, buttonRoundedProps as d, buttonVariantProps as f } from "@bridge-ui/core/Tokens";
6
+ import { cn as p, mergeBridgeUILayeredClasses as m, splitComponentProps as h } from "@bridge-ui/core/Utils";
6
7
  //#region src/Components/Button/composables/useButton.ts
7
- var m = [
8
+ var g = [
8
9
  "as",
9
10
  "full",
10
11
  "href",
@@ -19,90 +20,108 @@ var m = [
19
20
  "rounded",
20
21
  "variant",
21
22
  "disabled",
23
+ "selected",
22
24
  "startIcon",
23
25
  "customProps"
24
26
  ];
25
- function h(h, g) {
26
- let _ = i(), v = r(() => p({
27
- bridgeKeys: m,
27
+ function _(_, v) {
28
+ let y = o(), b = a(r, null), x = i(() => h({
29
+ bridgeKeys: g,
28
30
  props: {
29
- ..._,
30
- ...h
31
+ ...y,
32
+ ..._
31
33
  }
32
- })), { merged: y, entry: b } = t({
33
- libDefaults: g,
34
+ })), S = i(() => {
35
+ let e = x.value.componentProps, t = b?.value;
36
+ return {
37
+ ...e,
38
+ size: e.size ?? t?.size,
39
+ color: e.color ?? t?.color,
40
+ density: e.density ?? t?.density,
41
+ rounded: e.rounded ?? t?.rounded,
42
+ variant: e.variant ?? t?.variant
43
+ };
44
+ }), { merged: C, entry: w } = t({
45
+ libDefaults: v,
34
46
  componentName: "Button",
35
- props: () => v.value.componentProps
36
- }), x = r(() => y.value.customProps), S = n({
37
- entry: b,
38
- props: () => v.value.componentProps
39
- }), C = r(() => y.value.as ?? "button"), w = r(() => C.value === "a"), T = r(() => C.value === "button"), E = r(() => y.value.density === "mini"), D = r(() => y.value.disabled || y.value.loading), O = r(() => T.value ? D.value : void 0), k = r(() => y.value.loading ? !0 : void 0), A = r(() => D.value && !T.value ? !0 : void 0), j = r(() => {
40
- if (!(!w.value || D.value || !y.value.href)) return y.value.href;
41
- }), M = r(() => {
42
- if (!T.value) return;
43
- let e = a(v.value.inheritedAttrs, "type");
44
- return o([
47
+ props: () => S.value
48
+ }), T = i(() => C.value.customProps), E = n({
49
+ entry: w,
50
+ props: () => x.value.componentProps
51
+ }), D = i(() => C.value.as ?? "button"), O = i(() => D.value === "a"), k = i(() => D.value === "button"), A = i(() => C.value.density === "mini"), j = i(() => C.value.disabled || C.value.loading), M = i(() => k.value ? j.value : void 0), N = i(() => C.value.loading ? !0 : void 0), P = i(() => j.value && !k.value ? !0 : void 0), F = i(() => {
52
+ if (!(!O.value || j.value || !C.value.href)) return C.value.href;
53
+ }), I = i(() => {
54
+ if (!k.value) return;
55
+ let e = s(x.value.inheritedAttrs, "type");
56
+ return c([
45
57
  "submit",
46
58
  "reset",
47
59
  "button"
48
60
  ], e) ? e : "button";
49
- }), N = r(() => {
50
- let e = f(c, b.value?.tokens?.density);
51
- return a(e, [y.value.density, y.value.size]);
52
- }), P = r(() => s(v.value.componentProps.variant) ? E.value ? "flat" : y.value.variant : v.value.componentProps.variant), F = r(() => {
53
- let e = f(u, b.value?.tokens?.variant);
54
- return a(e, [P.value, y.value.color]);
55
- }), I = r(() => {
56
- let e = f(l, b.value?.tokens?.rounded);
57
- return a(e, y.value.rounded);
61
+ }), L = i(() => {
62
+ let e = m(u, w.value?.tokens?.density);
63
+ return s(e, [C.value.density, C.value.size]);
64
+ }), R = i(() => l(S.value.variant) ? l(b) && A.value ? "flat" : C.value.variant : S.value.variant), z = i(() => {
65
+ let e = m(f, w.value?.tokens?.variant);
66
+ return s(e, [R.value, C.value.color]);
67
+ }), B = i(() => {
68
+ let e = m(d, w.value?.tokens?.rounded);
69
+ return s(e, C.value.rounded);
58
70
  });
59
71
  return {
60
- tag: C,
61
- merged: y,
62
- isMini: E,
63
- iconBind: r(() => e(x.value?.icon, {}, d({
72
+ tag: D,
73
+ merged: C,
74
+ isMini: A,
75
+ iconBind: i(() => e(T.value?.icon, {}, p({
64
76
  "shrink-0": !0,
65
- [S.value.icon ?? ""]: !0
77
+ [E.value.icon ?? ""]: !0
66
78
  }))),
67
- rootBind: r(() => e(x.value?.root, v.value.inheritedAttrs, d({
68
- "inline-flex items-center justify-center": !0,
69
- "cursor-pointer outline-none outline-hidden": !0,
70
- "shrink-0": E.value,
71
- [N.value ?? ""]: !0,
72
- [I.value ?? ""]: !0,
73
- "w-full": !E.value && y.value.full,
74
- "w-fit": !E.value && !y.value.full,
75
- "group hover:shadow-xs": !E.value,
76
- [a(F.value, "base") ?? ""]: !0,
77
- [a(F.value, "hover") ?? ""]: !0,
78
- [a(F.value, "focus") ?? ""]: !0,
79
- "transition-all ease-in-out duration-200": !0,
80
- "focus:ring-2": !0,
81
- "focus:ring-offset-background-white dark:focus:ring-offset-background-dark": !0,
82
- "disabled:opacity-80 disabled:cursor-not-allowed": !0,
83
- "aria-disabled:opacity-80 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none": !0,
84
- [S.value.root ?? ""]: !0
85
- }))),
86
- rootHref: j,
87
- rootType: M,
88
- endIconBind: r(() => e(x.value?.endIcon, {}, d({
79
+ rootBind: i(() => e(T.value?.root, x.value.inheritedAttrs, {
80
+ "aria-pressed": l(C.value.selected) ? void 0 : C.value.selected,
81
+ class: p({
82
+ "inline-flex items-center justify-center": !0,
83
+ "cursor-pointer outline-none outline-hidden": !0,
84
+ "shrink-0": A.value,
85
+ [L.value ?? ""]: !0,
86
+ [B.value ?? ""]: !0,
87
+ "h-auto": A.value && !l(b) && b.value?.density !== "mini",
88
+ "border border-transparent": !l(b) && R.value !== "outline",
89
+ "w-full": !A.value && C.value.full,
90
+ "w-fit": !A.value && !C.value.full,
91
+ "group hover:shadow-xs": !A.value,
92
+ [s(z.value, "base") ?? ""]: !0,
93
+ [s(z.value, "hover") ?? ""]: !0,
94
+ [s(z.value, "focus") ?? ""]: !0,
95
+ [s(z.value, "selected") ?? ""]: C.value.selected === !0,
96
+ "relative z-10": C.value.selected === !0,
97
+ "transition-all ease-in-out duration-200": !0,
98
+ "focus:ring-2": !0,
99
+ "focus:ring-offset-background-white dark:focus:ring-offset-background-dark": !0,
100
+ "disabled:opacity-80 disabled:cursor-not-allowed": !0,
101
+ "aria-disabled:opacity-80 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none": !0,
102
+ [E.value.root ?? ""]: !0
103
+ })
104
+ })),
105
+ rootHref: F,
106
+ rootType: I,
107
+ endIconBind: i(() => e(T.value?.endIcon, {}, p({
89
108
  "shrink-0": !0,
90
- [S.value.endIcon ?? ""]: !0
109
+ [E.value.endIcon ?? ""]: !0
91
110
  }))),
92
- endSlotBind: r(() => e(x.value?.end, {}, "inline-flex shrink-0 items-center")),
93
- rootAriaBusy: k,
94
- rootDisabled: O,
95
- startIconBind: r(() => e(x.value?.startIcon, {}, d({
111
+ endSlotBind: i(() => e(T.value?.end, {}, "inline-flex shrink-0 items-center")),
112
+ rootAriaBusy: N,
113
+ rootDisabled: M,
114
+ startIconBind: i(() => e(T.value?.startIcon, {}, p({
96
115
  "shrink-0": !0,
97
- [S.value.startIcon ?? ""]: !0
116
+ [E.value.startIcon ?? ""]: !0
98
117
  }))),
99
- startSlotBind: r(() => e(x.value?.start, {}, "inline-flex shrink-0 items-center")),
100
- loadingIconBind: r(() => e(x.value?.loading, {}, d({
118
+ startSlotBind: i(() => e(T.value?.start, {}, "inline-flex shrink-0 items-center")),
119
+ loadingIconBind: i(() => e(T.value?.loading, {}, p({
101
120
  "shrink-0 animate-spin": !0,
102
- [S.value.loading ?? ""]: !0
121
+ [E.value.loading ?? ""]: !0
103
122
  }))),
104
- rootAriaDisabled: A
123
+ rootAriaDisabled: P
105
124
  };
106
125
  }
107
126
  //#endregion
108
- export { h as useButton };
127
+ export { _ as useButton };
@@ -0,0 +1,5 @@
1
+ import e from "./ButtonGroup.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/ButtonGroup/ButtonGroup.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,14 @@
1
+ import { ButtonGroupOwnProps, ButtonGroupSlots } from './buttonGroup.types';
2
+ type __VLS_Slots = ButtonGroupSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<ButtonGroupOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupOwnProps> & Readonly<{}>, {
4
+ full: boolean;
5
+ separator: boolean;
6
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -0,0 +1,37 @@
1
+ import { useButtonGroup as e } from "./composables/useButtonGroup.js";
2
+ import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
3
+ //#region src/Components/ButtonGroup/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
4
+ var c = /*@__PURE__*/ n({
5
+ inheritAttrs: !1,
6
+ __name: "ButtonGroup",
7
+ props: {
8
+ classes: {},
9
+ color: {},
10
+ customProps: {},
11
+ density: {},
12
+ full: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ orientation: {},
17
+ rounded: {},
18
+ separator: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ size: {},
23
+ variant: {}
24
+ },
25
+ setup(n) {
26
+ let { rootBind: c } = e(n, {
27
+ full: !1,
28
+ separator: !0,
29
+ color: "primary",
30
+ variant: "solid",
31
+ orientation: "horizontal"
32
+ });
33
+ return (e, n) => (a(), t("div", i(r(s(c))), [o(e.$slots, "default")], 16));
34
+ }
35
+ });
36
+ //#endregion
37
+ export { c as default };
@@ -0,0 +1,93 @@
1
+ import { HTMLAttributes, Slot } from 'vue';
2
+ import { ButtonColor, ButtonDensity, ButtonGroupOrientation, ButtonRounded, ButtonSize, ButtonVariant } from '@bridge-ui/core/Tokens';
3
+ import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
4
+ import { ButtonColorOverrides, ButtonDensityOverrides, ButtonRoundedOverrides, ButtonSizeOverrides, ButtonVariantOverrides } from '../Button/button.types';
5
+ export interface ButtonGroupOrientationOverrides {}
6
+ export interface ButtonGroupClasses {
7
+ /**
8
+ * Classes merged onto the root.
9
+ */
10
+ root?: string;
11
+ }
12
+ export interface ButtonGroupCustomProps {
13
+ /**
14
+ * Props forwarded to the root element.
15
+ *
16
+ * @default undefined
17
+ */
18
+ root?: HTMLAttributes;
19
+ }
20
+ /**
21
+ * Groups related action buttons in a joined strip.
22
+ * Compose with `Button`. Size, color, density, rounded, and variant
23
+ * cascade to nested buttons unless they override them.
24
+ */
25
+ export interface ButtonGroupOwnProps {
26
+ /**
27
+ * Classes for button group parts.
28
+ *
29
+ * @default undefined
30
+ */
31
+ classes?: ButtonGroupClasses;
32
+ /**
33
+ * Color applied to nested `Button` children when set. The divider follows the button text color.
34
+ *
35
+ * @default "primary"
36
+ */
37
+ color?: MergeProps<ButtonColor, ButtonColorOverrides>;
38
+ /**
39
+ * Extra props for internal parts.
40
+ *
41
+ * @default undefined
42
+ */
43
+ customProps?: ButtonGroupCustomProps;
44
+ /**
45
+ * Density applied to nested `Button` children unless they set `density`.
46
+ *
47
+ * @default undefined
48
+ */
49
+ density?: MergeProps<ButtonDensity, ButtonDensityOverrides>;
50
+ /**
51
+ * Stretch the group to the container width.
52
+ *
53
+ * @default false
54
+ */
55
+ full?: boolean;
56
+ /**
57
+ * Layout orientation of the group.
58
+ *
59
+ * @default "horizontal"
60
+ */
61
+ orientation?: MergeProps<ButtonGroupOrientation, ButtonGroupOrientationOverrides>;
62
+ /**
63
+ * Roundness applied to nested `Button` children unless they set `rounded`.
64
+ *
65
+ * @default undefined
66
+ */
67
+ rounded?: MergeProps<ButtonRounded, ButtonRoundedOverrides>;
68
+ /**
69
+ * Draw a full-height divider between adjacent children. The fill matches the button text color.
70
+ *
71
+ * @default true
72
+ */
73
+ separator?: boolean;
74
+ /**
75
+ * Size applied to nested `Button` children unless they set `size`.
76
+ *
77
+ * @default undefined
78
+ */
79
+ size?: MergeProps<ButtonSize, ButtonSizeOverrides>;
80
+ /**
81
+ * Variant applied to nested `Button` children unless they set `variant`.
82
+ *
83
+ * @default undefined
84
+ */
85
+ variant?: MergeProps<ButtonVariant, ButtonVariantOverrides>;
86
+ }
87
+ export interface ButtonGroupSlots {
88
+ /**
89
+ * Grouped controls (`Button`, nested `ButtonGroup`).
90
+ */
91
+ default?: Slot<undefined>;
92
+ }
93
+ export type ButtonGroupProps = MergeHtmlProps<ButtonGroupOwnProps, HTMLAttributes>;
@@ -0,0 +1,7 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { ButtonGroupOwnProps } from './buttonGroup.types';
3
+ /**
4
+ * Button appearance cascaded to nested `Button` children.
5
+ */
6
+ export type ButtonGroupContextValue = Pick<ButtonGroupOwnProps, "size" | "color" | "density" | "rounded" | "variant">;
7
+ export declare const BUTTON_GROUP_INJECTION_KEY: InjectionKey<ComputedRef<ButtonGroupContextValue>>;
@@ -0,0 +1,4 @@
1
+ //#region src/Components/ButtonGroup/buttonGroupInjectionKey.ts
2
+ var e = Symbol("bridge-button-group");
3
+ //#endregion
4
+ export { e as BUTTON_GROUP_INJECTION_KEY };
@@ -0,0 +1,16 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
2
+ import { ButtonGroupOwnProps, ButtonGroupProps } from '../buttonGroup.types';
3
+ type ButtonGroupLibDefaults = LibDefaultsShape<ButtonGroupOwnProps, "full" | "color" | "variant" | "separator" | "orientation">;
4
+ type ButtonGroupMerged = MergeLibDefaults<ButtonGroupOwnProps, ButtonGroupLibDefaults>;
5
+ /**
6
+ * Builds bind props for a grouped set of action buttons.
7
+ */
8
+ export declare function useButtonGroup(props: ButtonGroupOwnProps, libDefaults: ButtonGroupLibDefaults): {
9
+ merged: import('vue').ComputedRef<ButtonGroupMerged>;
10
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
11
+ role: string;
12
+ "data-slot": string;
13
+ class: string;
14
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonGroupProps, "color" | "orientation" | "size" | "classes" | "customProps" | "full" | "rounded" | "variant" | "density" | "separator">>>;
15
+ };
16
+ export {};
@@ -0,0 +1,66 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { BUTTON_GROUP_INJECTION_KEY as r } from "../buttonGroupInjectionKey.js";
3
+ import { computed as i, inject as a, provide as o, useAttrs as s } from "vue";
4
+ import { get as c } from "es-toolkit/compat";
5
+ import { buttonGroupOrientationProps as l } from "@bridge-ui/core/Tokens";
6
+ import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core/Utils";
7
+ //#region src/Components/ButtonGroup/composables/useButtonGroup.ts
8
+ var p = [
9
+ "full",
10
+ "size",
11
+ "color",
12
+ "classes",
13
+ "density",
14
+ "rounded",
15
+ "variant",
16
+ "separator",
17
+ "customProps",
18
+ "orientation"
19
+ ];
20
+ function m(m, h) {
21
+ let g = s(), _ = a(r, null), v = i(() => f({
22
+ props: {
23
+ ...g,
24
+ ...m
25
+ },
26
+ bridgeKeys: p
27
+ })), { merged: y, entry: b } = t({
28
+ libDefaults: h,
29
+ componentName: "ButtonGroup",
30
+ props: () => v.value.componentProps
31
+ }), x = n({
32
+ entry: b,
33
+ props: () => v.value.componentProps
34
+ }), S = i(() => y.value.customProps), C = i(() => {
35
+ let e = d(l, b.value?.tokens?.orientation);
36
+ return c(e, y.value.orientation);
37
+ }), w = i(() => {
38
+ let e = v.value.componentProps, t = b.value?.defaultProps, n = _?.value;
39
+ return {
40
+ size: e.size ?? t?.size ?? n?.size,
41
+ color: e.color ?? t?.color ?? n?.color,
42
+ density: e.density ?? t?.density ?? n?.density,
43
+ rounded: e.rounded ?? t?.rounded ?? n?.rounded,
44
+ variant: e.variant ?? t?.variant ?? n?.variant
45
+ };
46
+ });
47
+ return o(r, w), {
48
+ merged: y,
49
+ rootBind: i(() => {
50
+ let t = y.value.separator === !0;
51
+ return e(S.value?.root, v.value.inheritedAttrs, {
52
+ role: "group",
53
+ "data-slot": "button-group",
54
+ class: u({
55
+ [c(C.value, "root") ?? ""]: !0,
56
+ [c(C.value, "join") ?? ""]: !t,
57
+ [c(C.value, "separator") ?? ""]: t,
58
+ [x.value.root ?? ""]: !0,
59
+ "w-full [&>*]:flex-1": y.value.full === !0
60
+ })
61
+ });
62
+ })
63
+ };
64
+ }
65
+ //#endregion
66
+ export { m as useButtonGroup };
@@ -0,0 +1,4 @@
1
+ export type { ButtonGroupClasses, ButtonGroupCustomProps, ButtonGroupOrientationOverrides, ButtonGroupOwnProps, ButtonGroupProps, ButtonGroupSlots, } from './buttonGroup.types';
2
+ export { default as ButtonGroup } from './ButtonGroup.vue';
3
+ export { BUTTON_GROUP_INJECTION_KEY, type ButtonGroupContextValue, } from './buttonGroupInjectionKey';
4
+ export { useButtonGroup } from './composables/useButtonGroup';
@@ -0,0 +1,4 @@
1
+ import { BUTTON_GROUP_INJECTION_KEY as e } from "./buttonGroupInjectionKey.js";
2
+ import { useButtonGroup as t } from "./composables/useButtonGroup.js";
3
+ import n from "./ButtonGroup.js";
4
+ export { e as BUTTON_GROUP_INJECTION_KEY, n as ButtonGroup, t as useButtonGroup };
@@ -74,7 +74,7 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, C = {
74
74
  size: "sm",
75
75
  icon: "chevronLeft"
76
76
  }, y(B)), null, 16)], 16),
77
- c("button", m(f(y(K))), [...d[1] ||= [c("span", { class: "size-2 rounded-full bg-slate-600 dark:bg-slate-300" }, null, -1)]], 16),
77
+ c("button", m(f(y(K))), [...d[1] ||= [c("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
78
78
  c("button", m(f(y(G))), [u(y(e), p({
79
79
  size: "sm",
80
80
  icon: "chevronRight"
@@ -74,7 +74,7 @@ var ie = {
74
74
  size: "sm",
75
75
  icon: "chevronLeft"
76
76
  }, v(R)), null, 16)], 16),
77
- o("button", p(u(v(G))), [...l[0] ||= [o("span", { class: "size-2 rounded-full bg-slate-600 dark:bg-slate-300" }, null, -1)]], 16),
77
+ o("button", p(u(v(G))), [...l[0] ||= [o("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
78
78
  o("button", p(u(v(W))), [c(v(e), d({
79
79
  size: "sm",
80
80
  icon: "chevronRight"
@@ -94,7 +94,7 @@ var ie = {
94
94
  size: "sm",
95
95
  icon: "chevronLeft"
96
96
  }, v(R)), null, 16)], 16),
97
- o("button", p(u(v(G))), [...l[1] ||= [o("span", { class: "size-2 rounded-full bg-slate-600 dark:bg-slate-300" }, null, -1)]], 16),
97
+ o("button", p(u(v(G))), [...l[1] ||= [o("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
98
98
  o("button", p(u(v(W))), [c(v(e), d({
99
99
  size: "sm",
100
100
  icon: "chevronRight"
@@ -71,7 +71,7 @@ function y(y, b, x) {
71
71
  return {
72
72
  merged: E,
73
73
  iconBind: i(() => e(O.value?.icon, {}, m({
74
- "text-white": !0,
74
+ [j.value?.icon ?? "text-white"]: !0,
75
75
  [k.value.icon ?? ""]: !0
76
76
  }))),
77
77
  inputRef: C,