@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.
- package/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/ai/skills/bridge-ui-forms/SKILL.md +1 -1
- package/dist/Actions/Dialog/BridgeDialogHost.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/Actions/Dialog/useDialogAction.js +16 -15
- package/dist/Actions/Drawer/BridgeDrawerHost.vue_vue_type_script_setup_true_lang.js +19 -16
- package/dist/Actions/Drawer/useDrawerAction.js +16 -15
- package/dist/Actions/Modal/BridgeModalHost.vue_vue_type_script_setup_true_lang.js +19 -16
- package/dist/Actions/Modal/useModalAction.js +16 -15
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +35 -32
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/Actions/Snackbar/useSnackbarAction.js +17 -16
- package/dist/Actions/actionHostRegistry.d.ts +13 -0
- package/dist/Actions/actionHostRegistry.js +10 -0
- package/dist/Components/Accordion/composables/useAccordion.d.ts +1 -1
- package/dist/Components/ActionFooter/ActionFooter.js +5 -0
- package/dist/Components/ActionFooter/ActionFooter.vue.d.ts +10 -0
- package/dist/Components/ActionFooter/ActionFooter.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Components/ActionFooter/actionFooter.types.d.ts +107 -0
- package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +35 -0
- package/dist/Components/ActionFooter/composables/useActionFooter.js +53 -0
- package/dist/Components/ActionFooter/index.d.ts +3 -0
- package/dist/Components/ActionFooter/index.js +3 -0
- package/dist/Components/Alert/composables/useAlert.d.ts +1 -1
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +2 -2
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +1 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +4 -3
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
- package/dist/Components/Badge/composables/useBadge.d.ts +1 -1
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +3 -3
- package/dist/Components/Button/composables/useButton.d.ts +2 -2
- package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +1 -1
- package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
- package/dist/Components/CalendarDate/composables/useCalendarDate.d.ts +1 -1
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
- package/dist/Components/CalendarYear/composables/useCalendarYear.d.ts +1 -1
- package/dist/Components/Card/composables/useCard.d.ts +1 -1
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/ColorField/colorField.types.d.ts +1 -1
- package/dist/Components/ColorField/composables/useColorField.d.ts +2 -2
- package/dist/Components/ColorField/composables/useColorField.js +1 -1
- package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +1 -3
- package/dist/Components/ColorPicker/composables/useColorPicker.js +0 -2
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +10 -2
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.js +86 -86
- package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +1 -1
- package/dist/Components/DataTable/dataTable.types.d.ts +22 -4
- package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateField/composables/useDateField.d.ts +2 -2
- package/dist/Components/DateField/composables/useDateField.js +1 -1
- package/dist/Components/DateField/dateField.types.d.ts +1 -1
- package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/Components/DatePicker/composables/useDatePicker.d.ts +1 -3
- package/dist/Components/DatePicker/composables/useDatePicker.js +45 -48
- package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -2
- package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
- package/dist/Components/DateRangeField/dateRangeField.types.d.ts +1 -1
- package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.d.ts +1 -3
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +45 -48
- package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -2
- package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
- package/dist/Components/DateTimeField/dateTimeField.types.d.ts +1 -1
- package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +25 -24
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.d.ts +1 -3
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +75 -78
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -2
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
- package/dist/Components/DateTimeRangeField/dateTimeRangeField.types.d.ts +1 -1
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.d.ts +1 -3
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +84 -87
- package/dist/Components/Drawer/composables/useDrawer.js +75 -72
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.js +4 -5
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/Components/Listbox/composables/useListbox.d.ts +1 -3
- package/dist/Components/Listbox/composables/useListbox.js +64 -66
- package/dist/Components/Listbox/listbox.types.d.ts +7 -0
- package/dist/Components/Menu/composables/useMenu.js +125 -121
- package/dist/Components/Modal/composables/useModal.js +117 -114
- package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
- package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
- package/dist/Components/Select/Select.vue.d.ts +2 -2
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Select/composables/useSelect.d.ts +4 -3
- package/dist/Components/Select/composables/useSelect.js +1 -1
- package/dist/Components/Select/select.types.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +31 -28
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +2 -1
- package/dist/Components/Snackbar/composables/useSnackbar.js +129 -121
- package/dist/Components/Step/composables/useStep.d.ts +1 -1
- package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
- package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
- package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -2
- package/dist/Components/TimeField/composables/useTimeField.js +1 -1
- package/dist/Components/TimeField/timeField.types.d.ts +1 -1
- package/dist/Components/TimePanel/composables/useTimePanel.d.ts +1 -1
- package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +38 -37
- package/dist/Components/TimePicker/composables/useTimePicker.d.ts +1 -3
- package/dist/Components/TimePicker/composables/useTimePicker.js +54 -57
- package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -2
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
- package/dist/Components/TimeRangeField/timeRangeField.types.d.ts +1 -1
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +61 -60
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +1 -3
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +41 -43
- package/dist/Components/ToggleGroup/composables/useToggleGroup.d.ts +1 -1
- package/dist/Components/Tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.d.ts +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.js +6 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +162 -160
- package/docs/README.md +1 -0
- package/docs/components/ActionFooter.md +85 -0
- package/docs/components/Autocomplete.md +16 -2
- package/docs/components/BridgeUIProvider.md +29 -1
- package/docs/components/ColorField.md +1 -1
- package/docs/components/ColorPicker.md +1 -1
- package/docs/components/DataTable.md +16 -4
- package/docs/components/DateField.md +1 -1
- package/docs/components/DatePicker.md +1 -1
- package/docs/components/DateRangeField.md +1 -1
- package/docs/components/DateRangePicker.md +1 -1
- package/docs/components/DateTimeField.md +1 -1
- package/docs/components/DateTimePicker.md +1 -1
- package/docs/components/DateTimeRangeField.md +1 -1
- package/docs/components/DateTimeRangePicker.md +1 -1
- package/docs/components/Menu.md +1 -0
- package/docs/components/Select.md +16 -2
- package/docs/components/TimeField.md +1 -1
- package/docs/components/TimePicker.md +1 -1
- package/docs/components/TimeRangeField.md +1 -1
- package/docs/components/TimeRangePicker.md +1 -1
- 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
|
|
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 {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
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
|
|
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(
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
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":
|
|
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 {
|
|
29
|
+
export { _ as default };
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
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
|
|
11
|
-
let
|
|
12
|
-
if (!
|
|
13
|
-
let
|
|
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:
|
|
16
|
-
close:
|
|
17
|
-
isOpen:
|
|
18
|
-
update:
|
|
19
|
-
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
|
|
22
|
+
return s.value;
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { a as BridgeDialogHostMissingError, o as useDialogAction };
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import e from "../../Components/Drawer/Drawer.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
|
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(
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
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) =>
|
|
19
|
-
}, { ref_for: !0 },
|
|
20
|
-
onClose: (e) =>
|
|
21
|
-
onShowChange: (e) =>
|
|
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:
|
|
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 {
|
|
38
|
+
export { C as default };
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
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
|
|
11
|
-
let
|
|
12
|
-
if (!
|
|
13
|
-
let
|
|
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:
|
|
16
|
-
close:
|
|
17
|
-
isOpen:
|
|
18
|
-
update:
|
|
19
|
-
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
|
|
22
|
+
return s.value;
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { a as BridgeDrawerHostMissingError, o as useDrawerAction };
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import e from "../../Components/Modal/Modal.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
|
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(
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
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 },
|
|
19
|
-
"onUpdate:modelValue": (e) =>
|
|
20
|
-
onClose: (e) =>
|
|
21
|
-
onShowChange: (e) =>
|
|
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:
|
|
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 {
|
|
38
|
+
export { C as default };
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
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
|
|
11
|
-
let
|
|
12
|
-
if (!
|
|
13
|
-
let
|
|
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:
|
|
16
|
-
close:
|
|
17
|
-
isOpen:
|
|
18
|
-
update:
|
|
19
|
-
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
|
|
22
|
+
return s.value;
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { a as BridgeModalHostMissingError, o as useModalAction };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
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(
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
max:
|
|
27
|
-
timeout:
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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:
|
|
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
|
-
[
|
|
44
|
+
[j.value ?? ""]: !0
|
|
42
45
|
}))
|
|
43
|
-
}, [
|
|
46
|
+
}, [d("div", { class: m(y(S)({
|
|
44
47
|
"flex w-full max-w-sm gap-y-2 pointer-events-auto": !0,
|
|
45
|
-
[
|
|
46
|
-
})) }, [(
|
|
47
|
-
api:
|
|
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":
|
|
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 {
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
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
|
|
11
|
-
let
|
|
12
|
-
if (!
|
|
13
|
-
let
|
|
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:
|
|
16
|
-
close:
|
|
17
|
-
isOpen:
|
|
18
|
-
update:
|
|
19
|
-
closeTop:
|
|
20
|
-
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
|
|
23
|
+
return s.value;
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
//#endregion
|
|
27
|
-
export {
|
|
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" | "
|
|
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,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 };
|