@bridge-ui/vue 0.8.0 → 0.10.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 (152) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -1
  2. package/ai/skills/bridge-ui-forms/SKILL.md +1 -1
  3. package/dist/Actions/Dialog/BridgeDialogHost.vue_vue_type_script_setup_true_lang.js +16 -13
  4. package/dist/Actions/Dialog/useDialogAction.js +16 -15
  5. package/dist/Actions/Drawer/BridgeDrawerHost.vue_vue_type_script_setup_true_lang.js +19 -16
  6. package/dist/Actions/Drawer/useDrawerAction.js +16 -15
  7. package/dist/Actions/Modal/BridgeModalHost.vue_vue_type_script_setup_true_lang.js +19 -16
  8. package/dist/Actions/Modal/useModalAction.js +16 -15
  9. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +35 -32
  10. package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +1 -2
  11. package/dist/Actions/Snackbar/useSnackbarAction.js +17 -16
  12. package/dist/Actions/actionHostRegistry.d.ts +13 -0
  13. package/dist/Actions/actionHostRegistry.js +10 -0
  14. package/dist/Components/Accordion/composables/useAccordion.d.ts +1 -1
  15. package/dist/Components/ActionFooter/ActionFooter.js +5 -0
  16. package/dist/Components/ActionFooter/ActionFooter.vue.d.ts +10 -0
  17. package/dist/Components/ActionFooter/ActionFooter.vue_vue_type_script_setup_true_lang.js +35 -0
  18. package/dist/Components/ActionFooter/actionFooter.types.d.ts +107 -0
  19. package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +35 -0
  20. package/dist/Components/ActionFooter/composables/useActionFooter.js +53 -0
  21. package/dist/Components/ActionFooter/index.d.ts +3 -0
  22. package/dist/Components/ActionFooter/index.js +3 -0
  23. package/dist/Components/Alert/composables/useAlert.d.ts +1 -1
  24. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +2 -2
  25. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/Components/Autocomplete/autocomplete.types.d.ts +1 -1
  27. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +4 -3
  28. package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
  29. package/dist/Components/Badge/composables/useBadge.d.ts +1 -1
  30. package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +3 -3
  31. package/dist/Components/Button/composables/useButton.d.ts +2 -2
  32. package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +1 -1
  33. package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
  34. package/dist/Components/CalendarDate/composables/useCalendarDate.d.ts +1 -1
  35. package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
  36. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
  37. package/dist/Components/CalendarYear/composables/useCalendarYear.d.ts +1 -1
  38. package/dist/Components/Card/composables/useCard.d.ts +1 -1
  39. package/dist/Components/Chip/Chip.vue.d.ts +1 -1
  40. package/dist/Components/Chip/composables/useChip.d.ts +1 -1
  41. package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +1 -1
  42. package/dist/Components/ColorField/colorField.types.d.ts +1 -1
  43. package/dist/Components/ColorField/composables/useColorField.d.ts +2 -2
  44. package/dist/Components/ColorField/composables/useColorField.js +1 -1
  45. package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +41 -40
  46. package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +1 -3
  47. package/dist/Components/ColorPicker/composables/useColorPicker.js +0 -2
  48. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +10 -2
  49. package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  50. package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
  51. package/dist/Components/DataTable/composables/useDataTable.js +86 -86
  52. package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +1 -1
  53. package/dist/Components/DataTable/dataTable.types.d.ts +22 -4
  54. package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +1 -1
  55. package/dist/Components/DateField/composables/useDateField.d.ts +2 -2
  56. package/dist/Components/DateField/composables/useDateField.js +1 -1
  57. package/dist/Components/DateField/dateField.types.d.ts +1 -1
  58. package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +18 -17
  59. package/dist/Components/DatePicker/composables/useDatePicker.d.ts +1 -3
  60. package/dist/Components/DatePicker/composables/useDatePicker.js +45 -48
  61. package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
  62. package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -2
  63. package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
  64. package/dist/Components/DateRangeField/dateRangeField.types.d.ts +1 -1
  65. package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +18 -17
  66. package/dist/Components/DateRangePicker/composables/useDateRangePicker.d.ts +1 -3
  67. package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +45 -48
  68. package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +1 -1
  69. package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -2
  70. package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
  71. package/dist/Components/DateTimeField/dateTimeField.types.d.ts +1 -1
  72. package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +25 -24
  73. package/dist/Components/DateTimePicker/composables/useDateTimePicker.d.ts +1 -3
  74. package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +75 -78
  75. package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -2
  77. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
  78. package/dist/Components/DateTimeRangeField/dateTimeRangeField.types.d.ts +1 -1
  79. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +29 -28
  80. package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.d.ts +1 -3
  81. package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +84 -87
  82. package/dist/Components/Drawer/composables/useDrawer.js +75 -72
  83. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  84. package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
  85. package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
  86. package/dist/Components/ListItem/composables/useListItem.js +4 -5
  87. package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
  88. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +76 -76
  89. package/dist/Components/Listbox/composables/useListbox.d.ts +1 -3
  90. package/dist/Components/Listbox/composables/useListbox.js +64 -66
  91. package/dist/Components/Listbox/listbox.types.d.ts +7 -0
  92. package/dist/Components/Menu/composables/useMenu.js +125 -121
  93. package/dist/Components/Modal/composables/useModal.js +117 -114
  94. package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
  95. package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
  96. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
  97. package/dist/Components/Select/Select.vue.d.ts +2 -2
  98. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +1 -1
  99. package/dist/Components/Select/composables/useSelect.d.ts +4 -3
  100. package/dist/Components/Select/composables/useSelect.js +1 -1
  101. package/dist/Components/Select/select.types.d.ts +1 -1
  102. package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
  103. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +31 -28
  104. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +2 -1
  105. package/dist/Components/Snackbar/composables/useSnackbar.js +129 -121
  106. package/dist/Components/Step/composables/useStep.d.ts +1 -1
  107. package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
  108. package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
  109. package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +1 -1
  110. package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -2
  111. package/dist/Components/TimeField/composables/useTimeField.js +1 -1
  112. package/dist/Components/TimeField/timeField.types.d.ts +1 -1
  113. package/dist/Components/TimePanel/composables/useTimePanel.d.ts +1 -1
  114. package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +38 -37
  115. package/dist/Components/TimePicker/composables/useTimePicker.d.ts +1 -3
  116. package/dist/Components/TimePicker/composables/useTimePicker.js +54 -57
  117. package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
  118. package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -2
  119. package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
  120. package/dist/Components/TimeRangeField/timeRangeField.types.d.ts +1 -1
  121. package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +61 -60
  122. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +1 -3
  123. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +41 -43
  124. package/dist/Components/ToggleGroup/composables/useToggleGroup.d.ts +1 -1
  125. package/dist/Components/Tooltip/Tooltip.vue.d.ts +1 -1
  126. package/dist/Components/Tooltip/composables/useTooltip.d.ts +1 -1
  127. package/dist/Components/Tooltip/composables/useTooltip.js +6 -1
  128. package/dist/augments.d.ts +5 -0
  129. package/dist/index.d.ts +2 -0
  130. package/dist/index.js +162 -160
  131. package/docs/README.md +1 -0
  132. package/docs/components/ActionFooter.md +85 -0
  133. package/docs/components/Autocomplete.md +16 -2
  134. package/docs/components/BridgeUIProvider.md +29 -1
  135. package/docs/components/ColorField.md +1 -1
  136. package/docs/components/ColorPicker.md +1 -1
  137. package/docs/components/DataTable.md +16 -4
  138. package/docs/components/DateField.md +1 -1
  139. package/docs/components/DatePicker.md +1 -1
  140. package/docs/components/DateRangeField.md +1 -1
  141. package/docs/components/DateRangePicker.md +1 -1
  142. package/docs/components/DateTimeField.md +1 -1
  143. package/docs/components/DateTimePicker.md +1 -1
  144. package/docs/components/DateTimeRangeField.md +1 -1
  145. package/docs/components/DateTimeRangePicker.md +1 -1
  146. package/docs/components/Menu.md +1 -0
  147. package/docs/components/Select.md +16 -2
  148. package/docs/components/TimeField.md +1 -1
  149. package/docs/components/TimePicker.md +1 -1
  150. package/docs/components/TimeRangeField.md +1 -1
  151. package/docs/components/TimeRangePicker.md +1 -1
  152. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: bridge-ui-components
3
3
  description: >-
4
- Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, Badge, Icon,
4
+ Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon,
5
5
  Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Pagination, TextField, Select,
6
6
  Autocomplete, DateField, DatePicker, DateRangeField, DateRangePicker,
7
7
  TimeField, TimePicker, DateTimeField, DateTimePicker, ColorField, ColorPicker,
@@ -24,6 +24,7 @@ In templates, use kebab-case attrs (`start-icon`, `custom-props`, `error-message
24
24
  | Badge | `.ai/docs/components/Badge.md` |
25
25
  | Alert | `.ai/docs/components/Alert.md` |
26
26
  | Accordion | `.ai/docs/components/Accordion.md` |
27
+ | Action footer | `.ai/docs/components/ActionFooter.md` |
27
28
  | Stepper | `.ai/docs/components/Stepper.md` |
28
29
  | Icon | `.ai/docs/components/Icon.md` |
29
30
  | Lists | `.ai/docs/components/List.md` |
@@ -45,4 +45,4 @@ Controlled fields: **`v-model` / `modelValue`**. Never React `value`/`onChange`.
45
45
  1. Map validation to `error`, `error-message`, `description`, `disabled`, `readOnly`.
46
46
  2. Native input attrs often go through `:custom-props` → `input` — see TextField docs.
47
47
  3. Use only documented option shapes for Select/Autocomplete.
48
- 4. Prefer public fields/controls in apps. `FormField`, `FormControl`, and `BaseField` are exported building blocks for advanced composition. Theme shared chrome via `components.FormField` / `FormControl` / `BaseField` (a public entry such as `components.TextField` still overrides `defaultProps`). Chrome tokens live on those shared keys. Dropdown tokens live on `components.Listbox`. Time overlay chrome: `components.TimePanel` (`TimePicker` / `TimeRangePicker` override). Shared form density: `global.formDefaults: { size, rounded }` (Radio/Switch/BaseField/FormControl ignore `rounded`).
48
+ 4. Prefer public fields/controls in apps. `FormField`, `FormControl`, and `BaseField` are exported building blocks for advanced composition. Theme shared chrome via `components.FormField` / `FormControl` / `BaseField` (a public entry such as `components.TextField` still overrides `defaultProps`). Chrome tokens live on those shared keys. Dropdown tokens live on `components.Listbox` (`defaultProps.matchWidth` matches the field). Time overlay chrome: `components.TimePanel` (`TimePicker` / `TimeRangePicker` override). Shared form density: `global.formDefaults: { size, rounded }` (Radio/Switch/BaseField/FormControl ignore `rounded`).
@@ -1,20 +1,23 @@
1
- import { BRIDGE_DIALOG_INJECTION_KEY as e } from "./bridgeDialogInjectionKey.js";
2
- import t from "./BridgeDialogItem.js";
3
- import { createBridgeDialogApi as n } from "./createBridgeDialogApi.js";
4
- import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, defineComponent as s, inject as c, openBlock as l, provide as u, renderList as d, renderSlot as f, unref as p } from "vue";
1
+ import { dialogActionHosts as e, registerActionHost as t } from "../actionHostRegistry.js";
2
+ import { BRIDGE_DIALOG_INJECTION_KEY as n } from "./bridgeDialogInjectionKey.js";
3
+ import r from "./BridgeDialogItem.js";
4
+ import { createBridgeDialogApi as i } from "./createBridgeDialogApi.js";
5
+ import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, defineComponent as l, inject as u, openBlock as d, provide as f, renderList as p, renderSlot as m, unref as h } from "vue";
5
6
  //#region src/Actions/Dialog/BridgeDialogHost.vue?vue&type=script&setup=true&lang.ts
6
- var m = "[Bridge UI] Nested <BridgeDialogHost /> detected. useDialogAction() will target the nearest host only. Remove the extra host.", h = /*@__PURE__*/ s({
7
+ var g = "[Bridge UI] Nested <BridgeDialogHost /> detected. useDialogAction() will target the nearest host only. Remove the extra host.", _ = /*@__PURE__*/ l({
7
8
  __name: "BridgeDialogHost",
8
9
  props: { modal: {} },
9
- setup(s) {
10
- let h = s;
11
- c(e, null) && process.env.NODE_ENV !== "production" && console.warn(m);
12
- let g = n(), _ = i(() => g.entries.value);
13
- return u(e, g), (e, n) => (l(), o(r, null, [f(e.$slots, "default"), (l(!0), o(r, null, d(_.value, (e) => (l(), a(t, {
14
- api: p(g),
10
+ setup(l) {
11
+ let _ = l;
12
+ u(n, null) && process.env.NODE_ENV !== "production" && console.warn(g);
13
+ let v = i();
14
+ t(e, v);
15
+ let y = o(() => v.entries.value);
16
+ return f(n, v), (e, t) => (d(), c(a, null, [m(e.$slots, "default"), (d(!0), c(a, null, p(y.value, (e) => (d(), s(r, {
17
+ api: h(v),
15
18
  entry: e,
16
19
  key: e.id,
17
- "host-modal": h.modal
20
+ "host-modal": _.modal
18
21
  }, null, 8, [
19
22
  "api",
20
23
  "entry",
@@ -23,4 +26,4 @@ var m = "[Bridge UI] Nested <BridgeDialogHost /> detected. useDialogAction() wil
23
26
  }
24
27
  });
25
28
  //#endregion
26
- export { h as default };
29
+ export { _ as default };
@@ -1,26 +1,27 @@
1
- import { BRIDGE_DIALOG_INJECTION_KEY as e } from "./bridgeDialogInjectionKey.js";
2
- import { computed as t, inject as n } from "vue";
3
- import { getLayerCount as r } from "@bridge-ui/core/Layer";
1
+ import { dialogActionHosts as e } from "../actionHostRegistry.js";
2
+ import { BRIDGE_DIALOG_INJECTION_KEY as t } from "./bridgeDialogInjectionKey.js";
3
+ import { computed as n, inject as r } from "vue";
4
+ import { getLayerCount as i } from "@bridge-ui/core/Layer";
4
5
  //#region src/Actions/Dialog/useDialogAction.ts
5
- var i = class extends Error {
6
+ var a = class extends Error {
6
7
  constructor() {
7
8
  super("useDialogAction() requires <BridgeDialogHost /> in the app tree."), this.name = "BridgeDialogHostMissingError";
8
9
  }
9
10
  };
10
- function a() {
11
- let a = n(e, null);
12
- if (!a) throw new i();
13
- let o = t(() => r(a.entries.value));
11
+ function o() {
12
+ let o = e.resolve(r(t, null));
13
+ if (!o) throw new a();
14
+ let s = n(() => i(o.entries.value));
14
15
  return {
15
- open: a.open,
16
- close: a.close,
17
- isOpen: a.isOpen,
18
- update: a.update,
19
- closeTop: a.closeTop,
16
+ open: o.open,
17
+ close: o.close,
18
+ isOpen: o.isOpen,
19
+ update: o.update,
20
+ closeTop: o.closeTop,
20
21
  get stackSize() {
21
- return o.value;
22
+ return s.value;
22
23
  }
23
24
  };
24
25
  }
25
26
  //#endregion
26
- export { i as BridgeDialogHostMissingError, a as useDialogAction };
27
+ export { a as BridgeDialogHostMissingError, o as useDialogAction };
@@ -1,26 +1,29 @@
1
1
  import e from "../../Components/Drawer/Drawer.js";
2
- import { BRIDGE_DRAWER_INJECTION_KEY as t } from "./bridgeDrawerInjectionKey.js";
3
- import { createBridgeDrawerApi as n } from "./createBridgeDrawerApi.js";
4
- import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, defineComponent as s, inject as c, mergeProps as l, openBlock as u, provide as d, renderList as f, renderSlot as p, resolveDynamicComponent as m, unref as h, withCtx as g } from "vue";
5
- import { completeLayerHide as _, invokeLayerDismiss as v, mergeLayerShellProps as y } from "@bridge-ui/core/Layer";
2
+ import { drawerActionHosts as t, registerActionHost as n } from "../actionHostRegistry.js";
3
+ import { BRIDGE_DRAWER_INJECTION_KEY as r } from "./bridgeDrawerInjectionKey.js";
4
+ import { createBridgeDrawerApi as i } from "./createBridgeDrawerApi.js";
5
+ import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, defineComponent as l, inject as u, mergeProps as d, openBlock as f, provide as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, unref as _, withCtx as v } from "vue";
6
+ import { completeLayerHide as y, invokeLayerDismiss as b, mergeLayerShellProps as x } from "@bridge-ui/core/Layer";
6
7
  //#region src/Actions/Drawer/BridgeDrawerHost.vue?vue&type=script&setup=true&lang.ts
7
- var b = "[Bridge UI] Nested <BridgeDrawerHost /> detected. useDrawerAction() will target the nearest host only. Remove the extra host.", x = /*@__PURE__*/ s({
8
+ var S = "[Bridge UI] Nested <BridgeDrawerHost /> detected. useDrawerAction() will target the nearest host only. Remove the extra host.", C = /*@__PURE__*/ l({
8
9
  __name: "BridgeDrawerHost",
9
10
  props: { drawer: {} },
10
- setup(s) {
11
- let x = s;
12
- c(t, null) && process.env.NODE_ENV !== "production" && console.warn(b);
13
- let S = n(), C = i(() => S.entries.value);
14
- return d(t, S), (t, n) => (u(), o(r, null, [p(t.$slots, "default"), (u(!0), o(r, null, f(C.value, (t) => (u(), a(h(e), l({
11
+ setup(l) {
12
+ let C = l;
13
+ u(r, null) && process.env.NODE_ENV !== "production" && console.warn(S);
14
+ let w = i();
15
+ n(t, w);
16
+ let T = o(() => w.entries.value);
17
+ return p(r, w), (t, n) => (f(), c(a, null, [h(t.$slots, "default"), (f(!0), c(a, null, m(T.value, (t) => (f(), s(_(e), d({
15
18
  key: t.id,
16
19
  "stack-id": t.id,
17
20
  "model-value": t.show,
18
- "onUpdate:modelValue": (e) => h(S).syncShow(t.id, e)
19
- }, { ref_for: !0 }, h(y)(x.drawer, t.drawer), {
20
- onClose: (e) => h(v)(h(S).entries.value, t.id),
21
- onShowChange: (e) => h(_)(h(S).entries.value, t.id, e, h(S).removeEntry)
21
+ "onUpdate:modelValue": (e) => _(w).syncShow(t.id, e)
22
+ }, { ref_for: !0 }, _(x)(C.drawer, t.drawer), {
23
+ onClose: (e) => _(b)(_(w).entries.value, t.id),
24
+ onShowChange: (e) => _(y)(_(w).entries.value, t.id, e, _(w).removeEntry)
22
25
  }), {
23
- default: g(() => [(u(), a(m(t.component), l({ ref_for: !0 }, t.props), null, 16))]),
26
+ default: v(() => [(f(), s(g(t.component), d({ ref_for: !0 }, t.props), null, 16))]),
24
27
  _: 2
25
28
  }, 1040, [
26
29
  "stack-id",
@@ -32,4 +35,4 @@ var b = "[Bridge UI] Nested <BridgeDrawerHost /> detected. useDrawerAction() wil
32
35
  }
33
36
  });
34
37
  //#endregion
35
- export { x as default };
38
+ export { C as default };
@@ -1,26 +1,27 @@
1
- import { BRIDGE_DRAWER_INJECTION_KEY as e } from "./bridgeDrawerInjectionKey.js";
2
- import { computed as t, inject as n } from "vue";
3
- import { getLayerCount as r } from "@bridge-ui/core/Layer";
1
+ import { drawerActionHosts as e } from "../actionHostRegistry.js";
2
+ import { BRIDGE_DRAWER_INJECTION_KEY as t } from "./bridgeDrawerInjectionKey.js";
3
+ import { computed as n, inject as r } from "vue";
4
+ import { getLayerCount as i } from "@bridge-ui/core/Layer";
4
5
  //#region src/Actions/Drawer/useDrawerAction.ts
5
- var i = class extends Error {
6
+ var a = class extends Error {
6
7
  constructor() {
7
8
  super("useDrawerAction() requires <BridgeDrawerHost /> in the app tree."), this.name = "BridgeDrawerHostMissingError";
8
9
  }
9
10
  };
10
- function a() {
11
- let a = n(e, null);
12
- if (!a) throw new i();
13
- let o = t(() => r(a.entries.value));
11
+ function o() {
12
+ let o = e.resolve(r(t, null));
13
+ if (!o) throw new a();
14
+ let s = n(() => i(o.entries.value));
14
15
  return {
15
- open: a.open,
16
- close: a.close,
17
- isOpen: a.isOpen,
18
- update: a.update,
19
- closeTop: a.closeTop,
16
+ open: o.open,
17
+ close: o.close,
18
+ isOpen: o.isOpen,
19
+ update: o.update,
20
+ closeTop: o.closeTop,
20
21
  get stackSize() {
21
- return o.value;
22
+ return s.value;
22
23
  }
23
24
  };
24
25
  }
25
26
  //#endregion
26
- export { i as BridgeDrawerHostMissingError, a as useDrawerAction };
27
+ export { a as BridgeDrawerHostMissingError, o as useDrawerAction };
@@ -1,26 +1,29 @@
1
1
  import e from "../../Components/Modal/Modal.js";
2
- import { BRIDGE_MODAL_INJECTION_KEY as t } from "./bridgeModalInjectionKey.js";
3
- import { createBridgeModalApi as n } from "./createBridgeModalApi.js";
4
- import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, defineComponent as s, inject as c, mergeProps as l, openBlock as u, provide as d, renderList as f, renderSlot as p, resolveDynamicComponent as m, unref as h, withCtx as g } from "vue";
5
- import { completeLayerHide as _, invokeLayerDismiss as v, mergeLayerShellProps as y } from "@bridge-ui/core/Layer";
2
+ import { modalActionHosts as t, registerActionHost as n } from "../actionHostRegistry.js";
3
+ import { BRIDGE_MODAL_INJECTION_KEY as r } from "./bridgeModalInjectionKey.js";
4
+ import { createBridgeModalApi as i } from "./createBridgeModalApi.js";
5
+ import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, defineComponent as l, inject as u, mergeProps as d, openBlock as f, provide as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, unref as _, withCtx as v } from "vue";
6
+ import { completeLayerHide as y, invokeLayerDismiss as b, mergeLayerShellProps as x } from "@bridge-ui/core/Layer";
6
7
  //#region src/Actions/Modal/BridgeModalHost.vue?vue&type=script&setup=true&lang.ts
7
- var b = "[Bridge UI] Nested <BridgeModalHost /> detected. useModalAction() will target the nearest host only. Remove the extra host.", x = /*@__PURE__*/ s({
8
+ var S = "[Bridge UI] Nested <BridgeModalHost /> detected. useModalAction() will target the nearest host only. Remove the extra host.", C = /*@__PURE__*/ l({
8
9
  __name: "BridgeModalHost",
9
10
  props: { modal: {} },
10
- setup(s) {
11
- let x = s;
12
- c(t, null) && process.env.NODE_ENV !== "production" && console.warn(b);
13
- let S = n(), C = i(() => S.entries.value);
14
- return d(t, S), (t, n) => (u(), o(r, null, [p(t.$slots, "default"), (u(!0), o(r, null, f(C.value, (t) => (u(), a(h(e), l({
11
+ setup(l) {
12
+ let C = l;
13
+ u(r, null) && process.env.NODE_ENV !== "production" && console.warn(S);
14
+ let w = i();
15
+ n(t, w);
16
+ let T = o(() => w.entries.value);
17
+ return p(r, w), (t, n) => (f(), c(a, null, [h(t.$slots, "default"), (f(!0), c(a, null, m(T.value, (t) => (f(), s(_(e), d({
15
18
  key: t.id,
16
19
  "stack-id": t.id,
17
20
  "model-value": t.show
18
- }, { ref_for: !0 }, h(y)(x.modal, t.modal), {
19
- "onUpdate:modelValue": (e) => h(S).syncShow(t.id, e),
20
- onClose: (e) => h(v)(h(S).entries.value, t.id),
21
- onShowChange: (e) => h(_)(h(S).entries.value, t.id, e, h(S).removeEntry)
21
+ }, { ref_for: !0 }, _(x)(C.modal, t.modal), {
22
+ "onUpdate:modelValue": (e) => _(w).syncShow(t.id, e),
23
+ onClose: (e) => _(b)(_(w).entries.value, t.id),
24
+ onShowChange: (e) => _(y)(_(w).entries.value, t.id, e, _(w).removeEntry)
22
25
  }), {
23
- default: g(() => [(u(), a(m(t.component), l({ ref_for: !0 }, t.props), null, 16))]),
26
+ default: v(() => [(f(), s(g(t.component), d({ ref_for: !0 }, t.props), null, 16))]),
24
27
  _: 2
25
28
  }, 1040, [
26
29
  "stack-id",
@@ -32,4 +35,4 @@ var b = "[Bridge UI] Nested <BridgeModalHost /> detected. useModalAction() will
32
35
  }
33
36
  });
34
37
  //#endregion
35
- export { x as default };
38
+ export { C as default };
@@ -1,26 +1,27 @@
1
- import { BRIDGE_MODAL_INJECTION_KEY as e } from "./bridgeModalInjectionKey.js";
2
- import { computed as t, inject as n } from "vue";
3
- import { getLayerCount as r } from "@bridge-ui/core/Layer";
1
+ import { modalActionHosts as e } from "../actionHostRegistry.js";
2
+ import { BRIDGE_MODAL_INJECTION_KEY as t } from "./bridgeModalInjectionKey.js";
3
+ import { computed as n, inject as r } from "vue";
4
+ import { getLayerCount as i } from "@bridge-ui/core/Layer";
4
5
  //#region src/Actions/Modal/useModalAction.ts
5
- var i = class extends Error {
6
+ var a = class extends Error {
6
7
  constructor() {
7
8
  super("useModalAction() requires <BridgeModalHost /> in the app tree."), this.name = "BridgeModalHostMissingError";
8
9
  }
9
10
  };
10
- function a() {
11
- let a = n(e, null);
12
- if (!a) throw new i();
13
- let o = t(() => r(a.entries.value));
11
+ function o() {
12
+ let o = e.resolve(r(t, null));
13
+ if (!o) throw new a();
14
+ let s = n(() => i(o.entries.value));
14
15
  return {
15
- open: a.open,
16
- close: a.close,
17
- isOpen: a.isOpen,
18
- update: a.update,
19
- closeTop: a.closeTop,
16
+ open: o.open,
17
+ close: o.close,
18
+ isOpen: o.isOpen,
19
+ update: o.update,
20
+ closeTop: o.closeTop,
20
21
  get stackSize() {
21
- return o.value;
22
+ return s.value;
22
23
  }
23
24
  };
24
25
  }
25
26
  //#endregion
26
- export { i as BridgeModalHostMissingError, a as useModalAction };
27
+ export { a as BridgeModalHostMissingError, o as useModalAction };
@@ -1,13 +1,14 @@
1
1
  import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
2
- import { BRIDGE_SNACKBAR_INJECTION_KEY as t } from "./bridgeSnackbarInjectionKey.js";
3
- import n from "./BridgeSnackbarItem.js";
4
- import { createBridgeSnackbarApi as r } from "./createBridgeSnackbarApi.js";
5
- import { Fragment as i, Teleport as a, computed as o, createBlock as s, createElementBlock as c, createElementVNode as l, defineComponent as u, inject as d, normalizeClass as f, openBlock as p, provide as m, renderList as h, renderSlot as g, unref as _ } from "vue";
6
- import { get as v } from "es-toolkit/compat";
7
- import { snackbarPositionProps as y } from "@bridge-ui/core/Tokens";
8
- import { cn as b, mergeBridgeUILayeredClasses as x } from "@bridge-ui/core/Utils";
2
+ import { registerActionHost as t, snackbarActionHosts as n } from "../actionHostRegistry.js";
3
+ import { BRIDGE_SNACKBAR_INJECTION_KEY as r } from "./bridgeSnackbarInjectionKey.js";
4
+ import i from "./BridgeSnackbarItem.js";
5
+ import { createBridgeSnackbarApi as a } from "./createBridgeSnackbarApi.js";
6
+ import { Fragment as o, Teleport as s, computed as c, createBlock as l, createElementBlock as u, createElementVNode as d, defineComponent as f, inject as p, normalizeClass as m, openBlock as h, provide as g, renderList as _, renderSlot as v, unref as y } from "vue";
7
+ import { get as b } from "es-toolkit/compat";
8
+ import { snackbarPositionProps as x } from "@bridge-ui/core/Tokens";
9
+ import { cn as S, mergeBridgeUILayeredClasses as C } from "@bridge-ui/core/Utils";
9
10
  //#region src/Actions/Snackbar/BridgeSnackbarHost.vue?vue&type=script&setup=true&lang.ts
10
- var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction() will target the nearest host only. Remove the extra host.", C = /*@__PURE__*/ u({
11
+ var w = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction() will target the nearest host only. Remove the extra host.", T = /*@__PURE__*/ f({
11
12
  __name: "BridgeSnackbarHost",
12
13
  props: {
13
14
  max: {},
@@ -19,35 +20,37 @@ var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction()
19
20
  },
20
21
  timeout: { type: [Boolean, Number] }
21
22
  },
22
- setup(u) {
23
- let C = u;
24
- d(t, null) && process.env.NODE_ENV !== "production" && console.warn(S);
25
- let w = r({
26
- max: C.max,
27
- timeout: C.timeout
28
- }), T = e();
29
- m(t, w);
30
- let E = o(() => w.entries.value), D = o(() => T?.components.value.Snackbar), O = o(() => C.position ?? D.value?.defaultProps?.position ?? "bottom-center"), k = o(() => {
31
- let e = x(y, D.value?.tokens?.position);
32
- return v(e, O.value);
33
- }), A = o(() => C.teleportTo === !1), j = o(() => C.teleportTo === !1 ? "body" : C.teleportTo), M = o(() => O.value.startsWith("top") ? "flex-col" : "flex-col-reverse");
34
- return (e, t) => (p(), c(i, null, [g(e.$slots, "default"), (p(), s(a, {
35
- to: j.value,
36
- disabled: A.value
37
- }, [l("div", {
23
+ setup(f) {
24
+ let T = f;
25
+ p(r, null) && process.env.NODE_ENV !== "production" && console.warn(w);
26
+ let E = a({
27
+ max: T.max,
28
+ timeout: T.timeout
29
+ });
30
+ t(n, E);
31
+ let D = e();
32
+ g(r, E);
33
+ let O = c(() => E.entries.value), k = c(() => D?.components.value.Snackbar), A = c(() => T.position ?? k.value?.defaultProps?.position ?? "bottom-center"), j = c(() => {
34
+ let e = C(x, k.value?.tokens?.position);
35
+ return b(e, A.value);
36
+ }), M = c(() => T.teleportTo === !1), N = c(() => T.teleportTo === !1 ? "body" : T.teleportTo), P = c(() => A.value.startsWith("top") ? "flex-col" : "flex-col-reverse");
37
+ return (e, t) => (h(), u(o, null, [v(e.$slots, "default"), (h(), l(s, {
38
+ to: N.value,
39
+ disabled: M.value
40
+ }, [d("div", {
38
41
  "data-snackbar-host": "",
39
- class: f(_(b)({
42
+ class: m(y(S)({
40
43
  "fixed inset-0 z-40 flex pointer-events-none px-4 py-6 sm:p-5 sm:pt-4": !0,
41
- [k.value ?? ""]: !0
44
+ [j.value ?? ""]: !0
42
45
  }))
43
- }, [l("div", { class: f(_(b)({
46
+ }, [d("div", { class: m(y(S)({
44
47
  "flex w-full max-w-sm gap-y-2 pointer-events-auto": !0,
45
- [M.value]: !0
46
- })) }, [(p(!0), c(i, null, h(E.value, (e) => (p(), s(n, {
47
- api: _(w),
48
+ [P.value]: !0
49
+ })) }, [(h(!0), u(o, null, _(O.value, (e) => (h(), l(i, {
50
+ api: y(E),
48
51
  entry: e,
49
52
  key: e.id,
50
- "host-snackbar": C.snackbar
53
+ "host-snackbar": T.snackbar
51
54
  }, null, 8, [
52
55
  "api",
53
56
  "entry",
@@ -56,4 +59,4 @@ var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction()
56
59
  }
57
60
  });
58
61
  //#endregion
59
- export { C as default };
62
+ export { T as default };
@@ -28,8 +28,7 @@ var y = { class: "flex flex-col border-l border-dark-200 dark:border-dark-700" }
28
28
  "model-value": l.entry.show,
29
29
  onClose: O,
30
30
  "onUpdate:modelValue": g[5] ||= (e) => l.api.syncShow(l.entry.id, e),
31
- onLeaveComplete: g[6] ||= () => p(h)(l.api.entries.value, l.entry.id, !1, l.api.removeEntry),
32
- onShowChange: g[7] ||= (e) => p(h)(l.api.entries.value, l.entry.id, e, l.api.removeEntry)
31
+ onLeaveComplete: g[6] ||= () => p(h)(l.api.entries.value, l.entry.id, !1, l.api.removeEntry)
33
32
  }), s({ _: 2 }, [
34
33
  M.value ? {
35
34
  name: "actions",
@@ -1,27 +1,28 @@
1
- import { BRIDGE_SNACKBAR_INJECTION_KEY as e } from "./bridgeSnackbarInjectionKey.js";
2
- import { computed as t, inject as n } from "vue";
3
- import { getLayerCount as r } from "@bridge-ui/core/Layer";
1
+ import { snackbarActionHosts as e } from "../actionHostRegistry.js";
2
+ import { BRIDGE_SNACKBAR_INJECTION_KEY as t } from "./bridgeSnackbarInjectionKey.js";
3
+ import { computed as n, inject as r } from "vue";
4
+ import { getLayerCount as i } from "@bridge-ui/core/Layer";
4
5
  //#region src/Actions/Snackbar/useSnackbarAction.ts
5
- var i = class extends Error {
6
+ var a = class extends Error {
6
7
  constructor() {
7
8
  super("useSnackbarAction() requires <BridgeSnackbarHost /> in the app tree."), this.name = "BridgeSnackbarHostMissingError";
8
9
  }
9
10
  };
10
- function a() {
11
- let a = n(e, null);
12
- if (!a) throw new i();
13
- let o = t(() => r(a.entries.value));
11
+ function o() {
12
+ let o = e.resolve(r(t, null));
13
+ if (!o) throw new a();
14
+ let s = n(() => i(o.entries.value));
14
15
  return {
15
- open: a.open,
16
- close: a.close,
17
- isOpen: a.isOpen,
18
- update: a.update,
19
- closeTop: a.closeTop,
20
- closeAll: a.closeAll,
16
+ open: o.open,
17
+ close: o.close,
18
+ isOpen: o.isOpen,
19
+ update: o.update,
20
+ closeTop: o.closeTop,
21
+ closeAll: o.closeAll,
21
22
  get stackSize() {
22
- return o.value;
23
+ return s.value;
23
24
  }
24
25
  };
25
26
  }
26
27
  //#endregion
27
- export { i as BridgeSnackbarHostMissingError, a as useSnackbarAction };
28
+ export { a as BridgeSnackbarHostMissingError, o as useSnackbarAction };
@@ -0,0 +1,13 @@
1
+ import { ActionHostRegistry } from '@bridge-ui/core/Layer';
2
+ import { BridgeDialogController } from './Dialog/bridgeDialog.types';
3
+ import { BridgeDrawerController } from './Drawer/bridgeDrawer.types';
4
+ import { BridgeModalController } from './Modal/bridgeModal.types';
5
+ import { BridgeSnackbarController } from './Snackbar/bridgeSnackbar.types';
6
+ export declare const dialogActionHosts: ActionHostRegistry<BridgeDialogController>;
7
+ export declare const drawerActionHosts: ActionHostRegistry<BridgeDrawerController>;
8
+ export declare const modalActionHosts: ActionHostRegistry<BridgeModalController>;
9
+ export declare const snackbarActionHosts: ActionHostRegistry<BridgeSnackbarController>;
10
+ /**
11
+ * Registers `api` until the current component unmounts.
12
+ */
13
+ export declare function registerActionHost<T>(registry: ActionHostRegistry<T>, api: T): void;
@@ -0,0 +1,10 @@
1
+ import { onUnmounted as e } from "vue";
2
+ import { createActionHostRegistry as t } from "@bridge-ui/core/Layer";
3
+ //#region src/Actions/actionHostRegistry.ts
4
+ var n = t(), r = t(), i = t(), a = t();
5
+ function o(t, n) {
6
+ let r = t.register(n);
7
+ e(r);
8
+ }
9
+ //#endregion
10
+ export { n as dialogActionHosts, r as drawerActionHosts, i as modalActionHosts, o as registerActionHost, a as snackbarActionHosts };
@@ -9,7 +9,7 @@ export declare function useAccordion(props: AccordionOwnProps, libDefaults: Acco
9
9
  merged: import('vue').ComputedRef<AccordionMerged>;
10
10
  rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
11
11
  class: string;
12
- }, "class", import('vue').HTMLAttributes | undefined, Omit<AccordionProps, "color" | "size" | "classes" | "customProps" | "variant" | "disabled" | "multiple">>>;
12
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<AccordionProps, "color" | "size" | "classes" | "customProps" | "disabled" | "variant" | "multiple">>>;
13
13
  contextValue: import('vue').ComputedRef<AccordionContextValue>;
14
14
  };
15
15
  export {};
@@ -0,0 +1,5 @@
1
+ import e from "./ActionFooter.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/ActionFooter/ActionFooter.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,10 @@
1
+ import { ActionFooterOwnProps } from './actionFooter.types';
2
+ declare const __VLS_export: import('vue').DefineComponent<ActionFooterOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ apply: () => any;
4
+ cancel: () => any;
5
+ }, string, import('vue').PublicProps, Readonly<ActionFooterOwnProps> & Readonly<{
6
+ onApply?: (() => any) | undefined;
7
+ onCancel?: (() => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { useActionFooter as e } from "./composables/useActionFooter.js";
2
+ import t from "../Button/Button.js";
3
+ import { createElementBlock as n, createTextVNode as r, createVNode as i, defineComponent as a, guardReactiveProps as o, normalizeProps as s, openBlock as c, toDisplayString as l, unref as u, withCtx as d } from "vue";
4
+ //#region src/Components/ActionFooter/ActionFooter.vue?vue&type=script&setup=true&lang.ts
5
+ var f = /*@__PURE__*/ a({
6
+ inheritAttrs: !1,
7
+ __name: "ActionFooter",
8
+ props: {
9
+ applyColor: {},
10
+ applyLabel: {},
11
+ applyVariant: {},
12
+ cancelColor: {},
13
+ cancelLabel: {},
14
+ cancelVariant: {},
15
+ classes: {},
16
+ customProps: {}
17
+ },
18
+ emits: ["apply", "cancel"],
19
+ setup(a, { emit: f }) {
20
+ let { rootBind: p, applyLabel: m, cancelLabel: h, applyButtonBind: g, cancelButtonBind: _ } = e(a, {
21
+ applyColor: "primary",
22
+ cancelVariant: "flat",
23
+ cancelColor: "secondary"
24
+ }, f);
25
+ return (e, a) => (c(), n("div", s(o(u(p))), [i(u(t), s(o(u(_))), {
26
+ default: d(() => [r(l(u(h)), 1)]),
27
+ _: 1
28
+ }, 16), i(u(t), s(o(u(g))), {
29
+ default: d(() => [r(l(u(m)), 1)]),
30
+ _: 1
31
+ }, 16)], 16));
32
+ }
33
+ });
34
+ //#endregion
35
+ export { f as default };