@bridge-ui/vue 0.5.0 → 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 (67) 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 +90 -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/SidebarTrigger.vue_vue_type_script_setup_true_lang.js +16 -15
  44. package/dist/Components/Sidebar/composables/useSidebarListItem.js +29 -28
  45. package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +2 -0
  46. package/dist/Components/Sidebar/composables/useSidebarTrigger.js +16 -13
  47. package/dist/Components/Slider/composables/useSlider.js +53 -53
  48. package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -0
  49. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +11 -10
  50. package/dist/Components/TimePanel/composables/useTimePanel.js +106 -106
  51. package/dist/augments.d.ts +5 -0
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.js +150 -147
  54. package/docs/README.md +1 -0
  55. package/docs/components/Badge.md +2 -0
  56. package/docs/components/Button.md +5 -1
  57. package/docs/components/ButtonGroup.md +124 -0
  58. package/docs/components/DataTable.md +5 -1
  59. package/docs/components/Divider.md +1 -0
  60. package/docs/components/ToggleGroup.md +1 -1
  61. package/docs/examples/i18n-dictionary.ts +3 -0
  62. package/docs/examples/icon-fontawesome.ts +2 -0
  63. package/docs/examples/icon-heroicons.ts +2 -0
  64. package/docs/examples/icon-lucide.ts +2 -0
  65. package/docs/examples/icon-phosphor.ts +2 -0
  66. package/docs/examples/icon-tabler.ts +2 -0
  67. package/package.json +2 -2
@@ -23,7 +23,10 @@ function s(a) {
23
23
  ...e,
24
24
  classes: {
25
25
  ...e?.classes,
26
- content: i(e?.classes?.content, "overflow-visible rounded-none bg-transparent shadow-none ring-0 dark:bg-transparent")
26
+ content: i({
27
+ [e?.classes?.content ?? ""]: !0,
28
+ "overflow-visible rounded-none bg-transparent shadow-none ring-0 dark:bg-transparent": !0
29
+ })
27
30
  }
28
31
  };
29
32
  }),
@@ -30,7 +30,7 @@ function f(f) {
30
30
  return {
31
31
  merged: h,
32
32
  rootBind: i(() => e(_.value?.root, b.value, { class: l({
33
- "m-0 list-none py-2 text-dark-900 dark:text-dark-100": !0,
33
+ "m-0 flex list-none flex-col gap-0.5 p-1 text-dark-900 dark:text-dark-100": !0,
34
34
  "pl-4": h.value.nested,
35
35
  [s(v.value, "root") ?? ""]: !0
36
36
  }) }))
@@ -4,9 +4,9 @@ declare const __VLS_base: import('vue').DefineComponent<ListItemOwnProps, {}, {}
4
4
  role: "button" | "option" | "menuitem";
5
5
  disabled: boolean;
6
6
  as: "li" | "div";
7
+ selected: boolean;
7
8
  divider: boolean;
8
9
  interactive: boolean;
9
- selected: boolean;
10
10
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
12
  declare const _default: typeof __VLS_export;
@@ -11,7 +11,7 @@ export declare function useListItem(props: ListItemOwnProps, libDefaults: ListIt
11
11
  rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
12
12
  class: string;
13
13
  id: string | undefined;
14
- }, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<ListItemProps, "role" | "value" | "classes" | "customProps" | "primary" | "secondary" | "disabled" | "as" | "dense" | "divider" | "interactive" | "selected" | "selectedIcon">, never>>>;
14
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<ListItemProps, "role" | "value" | "classes" | "customProps" | "primary" | "secondary" | "disabled" | "as" | "selected" | "dense" | "divider" | "interactive" | "selectedIcon">, never>>>;
15
15
  rowClass: import('vue').ComputedRef<string>;
16
16
  startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
17
17
  hasPrimary: import('vue').ComputedRef<boolean>;
@@ -30,8 +30,8 @@ export declare function useListItem(props: ListItemOwnProps, libDefaults: ListIt
30
30
  class: string;
31
31
  } & object & Record<"class", string>) | null>;
32
32
  selectedIconBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
33
- size: "sm";
34
33
  class: string;
34
+ size?: "sm" | undefined;
35
35
  }, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
36
36
  resolvedSelectedIcon: import('vue').ComputedRef<IconSource | null>;
37
37
  };
@@ -4,10 +4,11 @@ import { getListboxOptionId as i } from "../../Listbox/composables/useListboxNav
4
4
  import { LIST_INJECTION_KEY as a } from "../../List/listInjectionKey.js";
5
5
  import { LISTBOX_INJECTION_KEY as o } from "../../Listbox/listboxInjectionKey.js";
6
6
  import { computed as s, getCurrentInstance as c, inject as l, onBeforeUnmount as u, toValue as d, useAttrs as f, watch as p } from "vue";
7
- import { get as m, isNull as h, omit as g } from "es-toolkit/compat";
8
- import { cn as _, splitComponentProps as v } from "@bridge-ui/core/Utils";
7
+ import { get as m, isNil as h, isNull as g, omit as _ } from "es-toolkit/compat";
8
+ import { listboxOptionFromComposedItem as v } from "@bridge-ui/core/Domain";
9
+ import { cn as y, splitComponentProps as b } from "@bridge-ui/core/Utils";
9
10
  //#region src/Components/ListItem/composables/useListItem.ts
10
- var y = [
11
+ var x = [
11
12
  "as",
12
13
  "role",
13
14
  "dense",
@@ -22,108 +23,122 @@ var y = [
22
23
  "interactive",
23
24
  "selectedIcon"
24
25
  ];
25
- function b(b, x, S) {
26
- let C = f(), w = l(a, null), T = l(o, null), E = T != null, D = s(() => v({
26
+ function S(S, C, w) {
27
+ let T = f(), E = l(a, null), D = l(o, null), O = !h(D), k = s(() => b({
27
28
  props: {
28
- ...C,
29
- ...b
29
+ ...T,
30
+ ...S
30
31
  },
31
- bridgeKeys: y
32
- })), { merged: O, entry: k } = n({
33
- libDefaults: x,
32
+ bridgeKeys: x
33
+ })), { merged: A, entry: j } = n({
34
+ libDefaults: C,
34
35
  componentName: "ListItem",
35
- props: () => D.value.componentProps
36
- }), A = s(() => T ? d(T) : null), j = s(() => O.value.value == null || !E ? null : {
37
- value: O.value.value,
38
- description: O.value.secondary,
39
- disabled: !!O.value.disabled,
40
- label: O.value.primary ?? String(O.value.value)
41
- }), M;
36
+ props: () => k.value.componentProps
37
+ }), M = s(() => D ? d(D) : null), N = s(() => O ? v({
38
+ value: A.value.value,
39
+ primary: A.value.primary,
40
+ disabled: A.value.disabled,
41
+ secondary: A.value.secondary
42
+ }) : null), P;
42
43
  p(() => {
43
- let e = j.value;
44
+ let e = N.value;
44
45
  return e ? `${String(e.value)}:${e.label}:${e.disabled}:${e.description ?? ""}` : null;
45
46
  }, () => {
46
- M?.(), M = void 0;
47
- let e = j.value;
48
- !e || !T || (M = d(T).registerOption(e));
47
+ P?.(), P = void 0;
48
+ let e = N.value;
49
+ !e || !D || (P = d(D).registerOption(e));
49
50
  }, { immediate: !0 }), u(() => {
50
- M?.();
51
+ P?.();
51
52
  });
52
- let N = s(() => j.value != null), P = s(() => !j.value || !A.value ? !1 : A.value.isSelected(j.value.value)), F = s(() => !j.value || !A.value ? -1 : A.value.getOptionIndex(j.value.value)), I = s(() => !A.value || F.value < 0 ? !1 : A.value.highlightedIndex === F.value), L = s(() => O.value.customProps), R = r({
53
- entry: k,
54
- props: () => D.value.componentProps
55
- }), z = s(() => "dense" in (c()?.vnode.props ?? {}) ? b.dense === !0 : b.dense === !0 ? !0 : w ? d(w).dense : !1), B = s(() => e(S, "primary") || e(S, "default") || !!O.value.primary), V = s(() => e(S, "secondary") || !!O.value.secondary), H = s(() => N.value ? !P.value || !A.value?.showCheckmark ? null : "check" : !O.value.selected || h(O.value.selectedIcon) ? null : O.value.selectedIcon ?? "check"), U = s(() => e(S, "end") || H.value != null), W = s(() => g(D.value.inheritedAttrs, [])), G = s(() => t(L.value?.root, W.value, {
56
- class: _({
53
+ let F = s(() => !h(N.value)), I = s(() => !N.value || !M.value ? !1 : M.value.isSelected(N.value.value)), L = s(() => !N.value || !M.value ? -1 : M.value.getOptionIndex(N.value.value)), R = s(() => !M.value || L.value < 0 ? !1 : M.value.highlightedIndex === L.value), z = s(() => A.value.customProps), B = r({
54
+ entry: j,
55
+ props: () => k.value.componentProps
56
+ }), V = s(() => "dense" in (c()?.vnode.props ?? {}) ? S.dense === !0 : S.dense === !0 ? !0 : E ? d(E).dense : !1), H = s(() => e(w, "primary") || e(w, "default") || !!A.value.primary), U = s(() => e(w, "secondary") || !!A.value.secondary), W = s(() => F.value ? !I.value || !M.value?.showCheckmark ? null : "check" : !A.value.selected || g(A.value.selectedIcon) ? null : A.value.selectedIcon ?? "check"), G = s(() => e(w, "end") || W.value != null), K = s(() => _(k.value.inheritedAttrs, [])), q = s(() => t(z.value?.root, K.value, {
57
+ class: y({
57
58
  "list-none": !0,
58
- "border-b border-black/10 last:border-b-0 dark:border-white/10": O.value.divider,
59
- [m(R.value, "root") ?? ""]: !0
59
+ "border-b border-black/10 last:border-b-0 dark:border-white/10": A.value.divider,
60
+ [m(B.value, "root") ?? ""]: !0
60
61
  }),
61
- id: N.value && A.value?.listboxId && F.value >= 0 ? i(A.value.listboxId, F.value) : void 0
62
- })), K = s(() => O.value.interactive || N.value ? t(L.value?.interactive, {}, {
63
- "aria-disabled": O.value.disabled ? !0 : void 0,
64
- role: N.value ? "option" : O.value.role,
65
- tabindex: O.value.disabled || N.value ? -1 : 0,
66
- "data-selected": O.value.selected || P.value ? !0 : void 0,
67
- "aria-selected": N.value ? P.value : void 0,
68
- onMousedown: N.value ? (e) => {
62
+ id: F.value && M.value?.listboxId && L.value >= 0 ? i(M.value.listboxId, L.value) : void 0
63
+ })), J = s(() => !!(A.value.interactive || F.value)), Y = s(() => J.value ? t(z.value?.interactive, {}, {
64
+ "aria-disabled": A.value.disabled ? !0 : void 0,
65
+ role: F.value ? "option" : A.value.role,
66
+ tabindex: A.value.disabled || F.value ? -1 : 0,
67
+ "data-selected": A.value.selected || I.value ? !0 : void 0,
68
+ "aria-selected": F.value ? I.value : void 0,
69
+ onMousedown: F.value ? (e) => {
69
70
  e.preventDefault();
70
71
  } : void 0,
71
- onClick: N.value ? () => {
72
- j.value && A.value?.onSelect(j.value);
72
+ onClick: F.value ? () => {
73
+ N.value && M.value?.onSelect(N.value);
73
74
  } : void 0,
74
- class: _({
75
- "flex w-full min-w-0 items-center gap-x-3 text-left text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
76
- "cursor-pointer select-none": !O.value.disabled,
77
- "px-4": !0,
78
- "py-2": !z.value,
79
- "py-1.5": z.value,
80
- "hover:bg-black/5 focus-visible:bg-black/5 dark:hover:bg-white/10 dark:focus-visible:bg-white/10": !O.value.disabled && !N.value,
81
- "bg-dark-100 font-medium text-dark-900 dark:bg-white/15 dark:text-white": O.value.selected && !N.value,
82
- [A.value?.optionHoverClass ?? ""]: N.value && !O.value.disabled && !P.value,
83
- [A.value?.mergedClasses.optionHover ?? ""]: N.value && !O.value.disabled && !P.value,
84
- [A.value?.optionSelectedClass ?? ""]: N.value && P.value,
85
- [A.value?.mergedClasses.optionSelected ?? ""]: N.value && P.value,
86
- [A.value?.optionHighlightedClass ?? ""]: N.value && I.value && !P.value,
87
- [A.value?.mergedClasses.optionHighlighted ?? ""]: N.value && I.value && !P.value,
88
- "opacity-50 pointer-events-none": O.value.disabled,
89
- [m(R.value, "interactive") ?? ""]: !0,
90
- [A.value?.sizeClasses?.option ?? ""]: !0
75
+ class: y({
76
+ "flex w-full min-w-0 items-center gap-x-2 rounded-md text-left text-sm text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
77
+ "cursor-pointer select-none": !A.value.disabled,
78
+ "px-2": !F.value,
79
+ "py-1.5": !F.value && !V.value,
80
+ "py-1": !F.value && V.value,
81
+ "hover:bg-black/5 focus-visible:bg-black/5 dark:hover:bg-white/10 dark:focus-visible:bg-white/10": !A.value.disabled && !F.value,
82
+ "bg-dark-100 font-medium text-dark-900 dark:bg-white/15 dark:text-white": A.value.selected && !F.value,
83
+ [M.value?.optionHoverClass ?? ""]: F.value && !A.value.disabled && !I.value,
84
+ [M.value?.mergedClasses.optionHover ?? ""]: F.value && !A.value.disabled && !I.value,
85
+ [M.value?.optionSelectedClass ?? ""]: F.value && I.value,
86
+ [M.value?.mergedClasses.optionSelected ?? ""]: F.value && I.value,
87
+ [M.value?.optionHighlightedClass ?? ""]: F.value && R.value && !I.value,
88
+ [M.value?.mergedClasses.optionHighlighted ?? ""]: F.value && R.value && !I.value,
89
+ "opacity-50 pointer-events-none": A.value.disabled,
90
+ [m(B.value, "interactive") ?? ""]: !0,
91
+ [M.value?.sizeClasses?.option ?? ""]: F.value,
92
+ "leading-none": !0
91
93
  })
92
- }) : null), q = s(() => _({
93
- "flex w-full min-w-0 gap-x-3": !0,
94
- "items-center text-dark-900 dark:text-dark-100": !O.value.interactive,
95
- "px-4": !O.value.interactive,
96
- "py-2": !O.value.interactive && !z.value,
97
- "py-1.5": !O.value.interactive && z.value
98
- })), J = s(() => t(L.value?.start, {}, _({
99
- "flex shrink-0 text-dark-600 dark:text-dark-300": !0,
100
- [m(R.value, "start") ?? ""]: !0
101
- }))), Y = s(() => t(L.value?.content, {}, _({
94
+ }) : null), X = s(() => y({
95
+ "flex w-full min-w-0 items-center gap-x-2 leading-none": !0,
96
+ "rounded-md text-dark-900 dark:text-dark-100": !J.value,
97
+ "px-2": !J.value,
98
+ "py-1.5": !J.value && !V.value,
99
+ "py-1": !J.value && V.value
100
+ })), Z = s(() => t(z.value?.start, {}, y({
101
+ "flex shrink-0 items-center text-dark-600 dark:text-dark-300": !0,
102
+ [m(B.value, "start") ?? ""]: !0
103
+ }))), Q = s(() => t(z.value?.content, {}, y({
102
104
  "min-w-0 flex-1": !0,
103
- [m(R.value, "content") ?? ""]: !0
104
- }))), X = s(() => t(L.value?.primary, {}, _("block truncate text-sm font-medium", A.value?.sizeClasses?.primary, m(R.value, "primary")))), Z = s(() => t(L.value?.secondary, {}, _("mt-0.5 block truncate text-xs text-dark-500 dark:text-dark-400", A.value?.sizeClasses?.secondary, m(R.value, "secondary"))));
105
+ [m(B.value, "content") ?? ""]: !0
106
+ }))), $ = s(() => t(z.value?.primary, {}, y({
107
+ "block truncate text-sm font-medium": !0,
108
+ [M.value?.sizeClasses?.primary ?? ""]: F.value,
109
+ [m(B.value, "primary") ?? ""]: !0,
110
+ "leading-none": !0
111
+ }))), ee = s(() => t(z.value?.secondary, {}, y({
112
+ "mt-0.5 block truncate text-xs text-dark-500 dark:text-dark-400": !0,
113
+ [M.value?.sizeClasses?.secondary ?? ""]: F.value,
114
+ [m(B.value, "secondary") ?? ""]: !0
115
+ })));
105
116
  return {
106
- merged: O,
107
- hasEnd: U,
108
- endBind: s(() => t(L.value?.end, {}, _({
117
+ merged: A,
118
+ hasEnd: G,
119
+ endBind: s(() => t(z.value?.end, {}, y({
109
120
  "ml-auto flex shrink-0 items-center": !0,
110
- [m(R.value, "end") ?? ""]: !0
121
+ [m(B.value, "end") ?? ""]: !0
111
122
  }))),
112
- rootBind: G,
113
- rowClass: q,
114
- startBind: J,
115
- hasPrimary: B,
116
- contentBind: Y,
117
- primaryBind: X,
118
- hasSecondary: V,
119
- secondaryBind: Z,
120
- interactiveBind: K,
121
- selectedIconBind: s(() => t(L.value?.selectedIcon, {}, {
122
- size: "sm",
123
- class: _("shrink-0", A.value?.checkClass, m(R.value, "selectedIcon"))
123
+ rootBind: q,
124
+ rowClass: X,
125
+ startBind: Z,
126
+ hasPrimary: H,
127
+ contentBind: Q,
128
+ primaryBind: $,
129
+ hasSecondary: U,
130
+ secondaryBind: ee,
131
+ interactiveBind: Y,
132
+ selectedIconBind: s(() => t(z.value?.selectedIcon, {}, {
133
+ ...F.value ? {} : { size: "sm" },
134
+ class: y({
135
+ "block shrink-0": !0,
136
+ [M.value?.checkClass ?? ""]: F.value,
137
+ [m(B.value, "selectedIcon") ?? ""]: !0
138
+ })
124
139
  })),
125
- resolvedSelectedIcon: H
140
+ resolvedSelectedIcon: W
126
141
  };
127
142
  }
128
143
  //#endregion
129
- export { b as useListItem };
144
+ export { S as useListItem };
@@ -1,11 +1,12 @@
1
1
  import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
2
  import { LIST_INJECTION_KEY as r } from "../../List/listInjectionKey.js";
3
- import { LIST_SECTION_INJECTION_KEY as i } from "../listSectionInjectionKey.js";
4
- import { computed as a, inject as o, toValue as s, useAttrs as c } from "vue";
5
- import { get as l, omit as u } from "es-toolkit/compat";
6
- import { cn as d, splitComponentProps as f } from "@bridge-ui/core/Utils";
3
+ import { LISTBOX_INJECTION_KEY as i } from "../../Listbox/listboxInjectionKey.js";
4
+ import { LIST_SECTION_INJECTION_KEY as a } from "../listSectionInjectionKey.js";
5
+ import { computed as o, inject as s, toValue as c, useAttrs as l } from "vue";
6
+ import { get as u, isNil as d, omit as f } from "es-toolkit/compat";
7
+ import { cn as p, splitComponentProps as m } from "@bridge-ui/core/Utils";
7
8
  //#region src/Components/ListSection/composables/useListSection.ts
8
- var p = [
9
+ var h = [
9
10
  "as",
10
11
  "inset",
11
12
  "title",
@@ -13,40 +14,42 @@ var p = [
13
14
  "classes",
14
15
  "customProps"
15
16
  ];
16
- function m(m) {
17
- let h = c(), g = o(r, null), _ = o(i, null), v = a(() => f({
17
+ function g(g) {
18
+ let _ = l(), v = s(r, null), y = s(a, null), b = s(i, null), x = o(() => b ? c(b) : null), S = o(() => m({
18
19
  props: {
19
- ...h,
20
- ...m
20
+ ..._,
21
+ ...g
21
22
  },
22
- bridgeKeys: p
23
- })), { merged: y, entry: b } = t({
23
+ bridgeKeys: h
24
+ })), { merged: C, entry: w } = t({
24
25
  componentName: "ListSection",
25
- props: () => v.value.componentProps
26
- }), x = a(() => y.value.customProps), S = n({
27
- entry: b,
28
- props: () => v.value.componentProps
29
- }), C = a(() => g ? s(g).dense : !1), w = a(() => _ ? s(_).hidden : !1), T = a(() => u(v.value.inheritedAttrs, [])), E = a(() => y.value.as === "div");
26
+ props: () => S.value.componentProps
27
+ }), T = o(() => C.value.customProps), E = n({
28
+ entry: w,
29
+ props: () => S.value.componentProps
30
+ }), D = o(() => v ? c(v).dense : !1), O = o(() => y ? c(y).hidden : !1), k = o(() => f(S.value.inheritedAttrs, [])), A = o(() => C.value.as === "div");
30
31
  return {
31
- merged: y,
32
- rootBind: a(() => e(x.value?.root, T.value, d({
33
- "list-none": !0,
34
- "sticky top-0 z-10 bg-white dark:bg-dark-800": y.value.sticky && !E.value,
35
- [l(S.value, "root") ?? ""]: !0
32
+ merged: C,
33
+ rootBind: o(() => e(T.value?.root, k.value, p({
34
+ "mt-1 list-none first:mt-0": !0,
35
+ "sticky top-0 z-10 bg-white dark:bg-dark-800": C.value.sticky && !A.value,
36
+ [u(E.value, "root") ?? ""]: !0
36
37
  }))),
37
- isHidden: w,
38
- titleBind: a(() => e(x.value?.title, {}, {
38
+ isHidden: O,
39
+ titleBind: o(() => e(T.value?.title, {}, {
39
40
  role: "presentation",
40
- class: d({
41
- "bg-white px-2 text-xs font-semibold tracking-wide text-dark-500 uppercase dark:bg-dark-800 dark:text-dark-300": !0,
42
- "sticky top-0 z-10": y.value.sticky && E.value,
43
- "py-2": !C.value,
44
- "py-1.5": C.value,
45
- "pl-14": y.value.inset,
46
- [l(S.value, "title") ?? ""]: !0
41
+ class: p({
42
+ "sticky top-0 z-10 bg-white dark:bg-dark-800": C.value.sticky && A.value,
43
+ "px-2": d(b),
44
+ "py-1": d(b) && D.value,
45
+ "py-1.5": d(b) && !D.value,
46
+ [x.value?.sizeClasses?.option ?? ""]: !d(b),
47
+ "text-xs font-medium text-dark-500 dark:text-dark-400": !0,
48
+ "pl-14": C.value.inset,
49
+ [u(E.value, "title") ?? ""]: !0
47
50
  })
48
51
  }))
49
52
  };
50
53
  }
51
54
  //#endregion
52
- export { m as useListSection };
55
+ export { g as useListSection };
@@ -64,7 +64,8 @@ export interface ListSectionOwnProps {
64
64
  }
65
65
  export interface ListSectionSlots {
66
66
  /**
67
- * Section label content. Overrides `title` when provided.
67
+ * Section label content. Overrides `title` when provided. Nested items
68
+ * belong as siblings of `ListSection`, not inside this slot.
68
69
  */
69
70
  default?: Slot<undefined>;
70
71
  }