@bridge-ui/vue 0.0.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/dist/Actions/BridgeUIHosts.js +5 -0
- package/dist/Actions/BridgeUIHosts.vue.d.ts +18 -0
- package/dist/Actions/BridgeUIHosts.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/Actions/Dialog/BridgeDialogAction.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogAction.vue.d.ts +8 -0
- package/dist/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Actions/Dialog/BridgeDialogHost.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogHost.vue.d.ts +14 -0
- package/dist/Actions/Dialog/BridgeDialogHost.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/Actions/Dialog/BridgeDialogItem.js +5 -0
- package/dist/Actions/Dialog/BridgeDialogItem.vue.d.ts +4 -0
- package/dist/Actions/Dialog/BridgeDialogItem.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.js +5 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue.d.ts +4 -0
- package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Actions/Dialog/bridgeDialog.types.d.ts +128 -0
- package/dist/Actions/Dialog/bridgeDialogInjectionKey.d.ts +3 -0
- package/dist/Actions/Dialog/bridgeDialogInjectionKey.js +4 -0
- package/dist/Actions/Dialog/createBridgeDialogApi.d.ts +2 -0
- package/dist/Actions/Dialog/createBridgeDialogApi.js +49 -0
- package/dist/Actions/Dialog/index.d.ts +3 -0
- package/dist/Actions/Dialog/index.js +3 -0
- package/dist/Actions/Dialog/useDialogAction.d.ts +5 -0
- package/dist/Actions/Dialog/useDialogAction.js +26 -0
- package/dist/Actions/Modal/BridgeModalHost.js +5 -0
- package/dist/Actions/Modal/BridgeModalHost.vue.d.ts +14 -0
- package/dist/Actions/Modal/BridgeModalHost.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Actions/Modal/bridgeModal.types.d.ts +44 -0
- package/dist/Actions/Modal/bridgeModalInjectionKey.d.ts +3 -0
- package/dist/Actions/Modal/bridgeModalInjectionKey.js +4 -0
- package/dist/Actions/Modal/createBridgeModalApi.d.ts +2 -0
- package/dist/Actions/Modal/createBridgeModalApi.js +49 -0
- package/dist/Actions/Modal/index.d.ts +3 -0
- package/dist/Actions/Modal/index.js +3 -0
- package/dist/Actions/Modal/useModalAction.d.ts +5 -0
- package/dist/Actions/Modal/useModalAction.js +26 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue.d.ts +8 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue.d.ts +16 -0
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.js +5 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue.d.ts +4 -0
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/Actions/Snackbar/bridgeSnackbar.types.d.ts +127 -0
- package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.d.ts +3 -0
- package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.js +4 -0
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.d.ts +14 -0
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +59 -0
- package/dist/Actions/Snackbar/index.d.ts +3 -0
- package/dist/Actions/Snackbar/index.js +3 -0
- package/dist/Actions/Snackbar/useSnackbarAction.d.ts +5 -0
- package/dist/Actions/Snackbar/useSnackbarAction.js +27 -0
- package/dist/Actions/bridgeUIHosts.types.d.ts +17 -0
- package/dist/Actions/index.d.ts +8 -0
- package/dist/Actions/index.js +8 -0
- package/dist/Components/Alert/Alert.js +5 -0
- package/dist/Components/Alert/Alert.vue.d.ts +11 -0
- package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/Components/Alert/alert.types.d.ts +134 -0
- package/dist/Components/Alert/alertDefaultIcons.d.ts +4 -0
- package/dist/Components/Alert/alertDefaultIcons.js +13 -0
- package/dist/Components/Alert/composables/useAlert.d.ts +18 -0
- package/dist/Components/Alert/composables/useAlert.js +71 -0
- package/dist/Components/Alert/index.d.ts +3 -0
- package/dist/Components/Alert/index.js +3 -0
- package/dist/Components/Avatar/Avatar.js +5 -0
- package/dist/Components/Avatar/Avatar.vue.d.ts +11 -0
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/Components/Avatar/avatar.types.d.ts +81 -0
- package/dist/Components/Avatar/composables/useAvatar.d.ts +23 -0
- package/dist/Components/Avatar/composables/useAvatar.js +73 -0
- package/dist/Components/Avatar/index.d.ts +3 -0
- package/dist/Components/Avatar/index.js +3 -0
- package/dist/Components/Badge/Badge.js +5 -0
- package/dist/Components/Badge/Badge.vue.d.ts +4 -0
- package/dist/Components/Badge/Badge.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Badge/badge.types.d.ts +64 -0
- package/dist/Components/Badge/composables/useBadge.d.ts +9 -0
- package/dist/Components/Badge/composables/useBadge.js +47 -0
- package/dist/Components/Badge/index.d.ts +3 -0
- package/dist/Components/Badge/index.js +3 -0
- package/dist/Components/Button/Button.js +5 -0
- package/dist/Components/Button/Button.vue.d.ts +11 -0
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/Components/Button/button.types.d.ts +181 -0
- package/dist/Components/Button/composables/useButton.d.ts +22 -0
- package/dist/Components/Button/composables/useButton.js +91 -0
- package/dist/Components/Button/index.d.ts +3 -0
- package/dist/Components/Button/index.js +3 -0
- package/dist/Components/Card/Card.js +5 -0
- package/dist/Components/Card/Card.vue.d.ts +11 -0
- package/dist/Components/Card/Card.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/Card/card.types.d.ts +124 -0
- package/dist/Components/Card/composables/useCard.d.ts +18 -0
- package/dist/Components/Card/composables/useCard.js +80 -0
- package/dist/Components/Card/index.d.ts +3 -0
- package/dist/Components/Card/index.js +3 -0
- package/dist/Components/Checkbox/Checkbox.js +5 -0
- package/dist/Components/Checkbox/Checkbox.vue.d.ts +20 -0
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/Components/Checkbox/checkbox.types.d.ts +98 -0
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +279 -0
- package/dist/Components/Checkbox/composables/useCheckbox.js +76 -0
- package/dist/Components/Checkbox/index.d.ts +3 -0
- package/dist/Components/Checkbox/index.js +3 -0
- package/dist/Components/FormControl/FormControl.js +5 -0
- package/dist/Components/FormControl/FormControl.vue.d.ts +17 -0
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/FormControl/composables/useFormControl.d.ts +45 -0
- package/dist/Components/FormControl/composables/useFormControl.js +110 -0
- package/dist/Components/FormControl/formControl.types.d.ts +198 -0
- package/dist/Components/FormControl/index.d.ts +4 -0
- package/dist/Components/FormControl/index.js +3 -0
- package/dist/Components/FormField/FilledFormField.js +5 -0
- package/dist/Components/FormField/FilledFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/FormField.js +5 -0
- package/dist/Components/FormField/FormField.vue.d.ts +15 -0
- package/dist/Components/FormField/FormField.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/Components/FormField/NotchedFormField.js +5 -0
- package/dist/Components/FormField/NotchedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/Components/FormField/OutlinedFormField.js +5 -0
- package/dist/Components/FormField/OutlinedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/StackedFormField.js +5 -0
- package/dist/Components/FormField/StackedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/Components/FormField/UnderlinedFormField.js +5 -0
- package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +17 -0
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +474 -0
- package/dist/Components/FormField/composables/useFormField.js +219 -0
- package/dist/Components/FormField/formField.types.d.ts +294 -0
- package/dist/Components/FormField/index.d.ts +4 -0
- package/dist/Components/FormField/index.js +3 -0
- package/dist/Components/Icon/Icon.js +5 -0
- package/dist/Components/Icon/Icon.vue.d.ts +4 -0
- package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Icon/composables/useIcon.d.ts +9 -0
- package/dist/Components/Icon/composables/useIcon.js +26 -0
- package/dist/Components/Icon/icon.types.d.ts +17 -0
- package/dist/Components/Icon/index.d.ts +3 -0
- package/dist/Components/Icon/index.js +3 -0
- package/dist/Components/Label/Label.js +5 -0
- package/dist/Components/Label/Label.vue.d.ts +4 -0
- package/dist/Components/Label/Label.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/Components/Label/composables/useLabel.d.ts +10 -0
- package/dist/Components/Label/composables/useLabel.js +44 -0
- package/dist/Components/Label/index.d.ts +3 -0
- package/dist/Components/Label/index.js +3 -0
- package/dist/Components/Label/label.types.d.ts +52 -0
- package/dist/Components/Link/Link.js +5 -0
- package/dist/Components/Link/Link.vue.d.ts +11 -0
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/Components/Link/composables/useLink.d.ts +18 -0
- package/dist/Components/Link/composables/useLink.js +66 -0
- package/dist/Components/Link/index.d.ts +3 -0
- package/dist/Components/Link/index.js +3 -0
- package/dist/Components/Link/link.types.d.ts +113 -0
- package/dist/Components/List/List.js +5 -0
- package/dist/Components/List/List.vue.d.ts +9 -0
- package/dist/Components/List/List.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/List/composables/useList.d.ts +11 -0
- package/dist/Components/List/composables/useList.js +44 -0
- package/dist/Components/List/index.d.ts +5 -0
- package/dist/Components/List/index.js +4 -0
- package/dist/Components/List/list.types.d.ts +57 -0
- package/dist/Components/List/listInjectionKey.d.ts +5 -0
- package/dist/Components/List/listInjectionKey.js +4 -0
- package/dist/Components/ListItem/ListItem.js +5 -0
- package/dist/Components/ListItem/ListItem.vue.d.ts +19 -0
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/ListItem/composables/useListItem.d.ts +40 -0
- package/dist/Components/ListItem/composables/useListItem.js +104 -0
- package/dist/Components/ListItem/index.d.ts +3 -0
- package/dist/Components/ListItem/index.js +3 -0
- package/dist/Components/ListItem/listItem.types.d.ts +164 -0
- package/dist/Components/ListSection/ListSection.js +5 -0
- package/dist/Components/ListSection/ListSection.vue.d.ts +15 -0
- package/dist/Components/ListSection/ListSection.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/ListSection/composables/useListSection.d.ts +13 -0
- package/dist/Components/ListSection/composables/useListSection.js +51 -0
- package/dist/Components/ListSection/index.d.ts +3 -0
- package/dist/Components/ListSection/index.js +3 -0
- package/dist/Components/ListSection/listSection.types.d.ts +71 -0
- package/dist/Components/Listbox/Listbox.js +5 -0
- package/dist/Components/Listbox/Listbox.vue.d.ts +34 -0
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/Components/Listbox/composables/useListbox.d.ts +13 -0
- package/dist/Components/Listbox/composables/useListbox.js +47 -0
- package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +16 -0
- package/dist/Components/Listbox/composables/useListboxNavigation.js +62 -0
- package/dist/Components/Listbox/index.d.ts +4 -0
- package/dist/Components/Listbox/index.js +4 -0
- package/dist/Components/Listbox/listbox.types.d.ts +170 -0
- package/dist/Components/Menu/Menu.js +5 -0
- package/dist/Components/Menu/Menu.vue.d.ts +36 -0
- package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/Components/Menu/composables/useMenu.d.ts +54 -0
- package/dist/Components/Menu/composables/useMenu.js +217 -0
- package/dist/Components/Menu/index.d.ts +4 -0
- package/dist/Components/Menu/index.js +3 -0
- package/dist/Components/Menu/menu.types.d.ts +172 -0
- package/dist/Components/Modal/Modal.js +5 -0
- package/dist/Components/Modal/Modal.vue.d.ts +38 -0
- package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/Components/Modal/composables/useModal.d.ts +61 -0
- package/dist/Components/Modal/composables/useModal.js +191 -0
- package/dist/Components/Modal/index.d.ts +4 -0
- package/dist/Components/Modal/index.js +3 -0
- package/dist/Components/Modal/modal.types.d.ts +177 -0
- package/dist/Components/NumberField/NumberField.js +5 -0
- package/dist/Components/NumberField/NumberField.vue.d.ts +24 -0
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/Components/NumberField/composables/useNumberField.d.ts +696 -0
- package/dist/Components/NumberField/composables/useNumberField.js +64 -0
- package/dist/Components/NumberField/index.d.ts +4 -0
- package/dist/Components/NumberField/index.js +3 -0
- package/dist/Components/NumberField/numberField.types.d.ts +52 -0
- package/dist/Components/PasswordField/PasswordField.js +5 -0
- package/dist/Components/PasswordField/PasswordField.vue.d.ts +24 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +691 -0
- package/dist/Components/PasswordField/composables/usePasswordField.js +40 -0
- package/dist/Components/PasswordField/index.d.ts +4 -0
- package/dist/Components/PasswordField/index.js +3 -0
- package/dist/Components/PasswordField/passwordField.types.d.ts +34 -0
- package/dist/Components/Radio/Radio.js +5 -0
- package/dist/Components/Radio/Radio.vue.d.ts +20 -0
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/Radio/composables/useRadio.d.ts +278 -0
- package/dist/Components/Radio/composables/useRadio.js +78 -0
- package/dist/Components/Radio/index.d.ts +3 -0
- package/dist/Components/Radio/index.js +3 -0
- package/dist/Components/Radio/radio.types.d.ts +104 -0
- package/dist/Components/Select/Select.js +5 -0
- package/dist/Components/Select/Select.vue.d.ts +40 -0
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +191 -0
- package/dist/Components/Select/SelectOption.js +5 -0
- package/dist/Components/Select/SelectOption.vue.d.ts +4 -0
- package/dist/Components/Select/SelectOption.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/Select/composables/useSelect.d.ts +733 -0
- package/dist/Components/Select/composables/useSelect.js +305 -0
- package/dist/Components/Select/index.d.ts +4 -0
- package/dist/Components/Select/index.js +4 -0
- package/dist/Components/Select/select.types.d.ts +231 -0
- package/dist/Components/Select/selectInjectionKey.d.ts +7 -0
- package/dist/Components/Select/selectInjectionKey.js +4 -0
- package/dist/Components/Snackbar/Snackbar.js +5 -0
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +32 -0
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +156 -0
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +248 -0
- package/dist/Components/Snackbar/composables/useSnackbar.js +210 -0
- package/dist/Components/Snackbar/index.d.ts +4 -0
- package/dist/Components/Snackbar/index.js +3 -0
- package/dist/Components/Snackbar/snackbar.types.d.ts +214 -0
- package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +4 -0
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +13 -0
- package/dist/Components/Switch/Switch.js +5 -0
- package/dist/Components/Switch/Switch.vue.d.ts +20 -0
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/Components/Switch/composables/useSwitch.d.ts +278 -0
- package/dist/Components/Switch/composables/useSwitch.js +73 -0
- package/dist/Components/Switch/index.d.ts +3 -0
- package/dist/Components/Switch/index.js +3 -0
- package/dist/Components/Switch/switch.types.d.ts +92 -0
- package/dist/Components/TextField/TextField.js +5 -0
- package/dist/Components/TextField/TextField.vue.d.ts +22 -0
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/TextField/composables/useTextField.d.ts +680 -0
- package/dist/Components/TextField/composables/useTextField.js +21 -0
- package/dist/Components/TextField/index.d.ts +3 -0
- package/dist/Components/TextField/index.js +3 -0
- package/dist/Components/TextField/textField.types.d.ts +15 -0
- package/dist/Components/Textarea/Textarea.js +5 -0
- package/dist/Components/Textarea/Textarea.vue.d.ts +22 -0
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/Components/Textarea/composables/useTextarea.d.ts +685 -0
- package/dist/Components/Textarea/composables/useTextarea.js +72 -0
- package/dist/Components/Textarea/index.d.ts +3 -0
- package/dist/Components/Textarea/index.js +3 -0
- package/dist/Components/Textarea/textarea.types.d.ts +34 -0
- package/dist/Provider/BridgeUIProvider.js +5 -0
- package/dist/Provider/BridgeUIProvider.vue.d.ts +18 -0
- package/dist/Provider/BridgeUIProvider.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/Provider/bridgeUITypes.d.ts +8 -0
- package/dist/Provider/createBridgeUI.d.ts +3 -0
- package/dist/Provider/createBridgeUI.js +15 -0
- package/dist/Provider/createBridgeUIApi.d.ts +7 -0
- package/dist/Provider/createBridgeUIApi.js +36 -0
- package/dist/Provider/index.d.ts +5 -0
- package/dist/Provider/index.js +4 -0
- package/dist/Provider/injectionKey.d.ts +3 -0
- package/dist/Provider/injectionKey.js +4 -0
- package/dist/Provider/useBridgeUI.d.ts +2 -0
- package/dist/Provider/useBridgeUI.js +8 -0
- package/dist/Utils/index.d.ts +47 -0
- package/dist/Utils/index.js +55 -0
- package/dist/Utils/slotOrProp.d.ts +28 -0
- package/dist/Utils/slotOrProp.js +23 -0
- package/dist/Utils/useHoldRepeat.d.ts +13 -0
- package/dist/Utils/useHoldRepeat.js +38 -0
- package/dist/augments.d.ts +113 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +53 -0
- package/dist/theme.css +205 -0
- package/package.json +90 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BridgeUIHostsProps } from './bridgeUIHosts.types';
|
|
2
|
+
declare var __VLS_20: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_20) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BridgeUIHostsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BridgeUIHostsProps> & Readonly<{}>, {
|
|
7
|
+
dialog: import('./Dialog').BridgeDialogHostProps;
|
|
8
|
+
modal: import('./Modal').BridgeModalHostProps;
|
|
9
|
+
snackbar: import('./Snackbar').BridgeSnackbarHostProps;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import e from "./Dialog/BridgeDialogHost.js";
|
|
2
|
+
import t from "./Modal/BridgeModalHost.js";
|
|
3
|
+
import n from "./Snackbar/BridgeSnackbarHost.js";
|
|
4
|
+
import { createBlock as r, createVNode as i, defineComponent as a, guardReactiveProps as o, normalizeProps as s, openBlock as c, renderSlot as l, unref as u, withCtx as d } from "vue";
|
|
5
|
+
//#region src/Actions/BridgeUIHosts.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = /* @__PURE__ */ a({
|
|
7
|
+
__name: "BridgeUIHosts",
|
|
8
|
+
props: {
|
|
9
|
+
dialog: { default: () => ({}) },
|
|
10
|
+
modal: { default: () => ({}) },
|
|
11
|
+
snackbar: { default: () => ({}) }
|
|
12
|
+
},
|
|
13
|
+
setup(a) {
|
|
14
|
+
return (f, p) => (c(), r(u(t), s(o(a.modal)), {
|
|
15
|
+
default: d(() => [i(u(e), s(o(a.dialog)), {
|
|
16
|
+
default: d(() => [i(u(n), s(o(a.snackbar)), {
|
|
17
|
+
default: d(() => [l(f.$slots, "default")]),
|
|
18
|
+
_: 3
|
|
19
|
+
}, 16)]),
|
|
20
|
+
_: 3
|
|
21
|
+
}, 16)]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 16));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { f as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BridgeDialogActionProps } from './bridgeDialog.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<BridgeDialogActionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
run: () => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<BridgeDialogActionProps> & Readonly<{
|
|
5
|
+
onRun?: (() => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import e from "../../Components/Button/Button.js";
|
|
2
|
+
import t from "../../Components/Link/Link.js";
|
|
3
|
+
import { computed as n, createBlock as r, createTextVNode as i, defineComponent as a, mergeProps as o, openBlock as s, toDisplayString as c, unref as l, withCtx as u } from "vue";
|
|
4
|
+
import { cn as d } from "@bridge-ui/core";
|
|
5
|
+
//#region src/Actions/Dialog/BridgeDialogAction.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = /* @__PURE__ */ a({
|
|
7
|
+
__name: "BridgeDialogAction",
|
|
8
|
+
props: {
|
|
9
|
+
acceptColor: {},
|
|
10
|
+
action: {},
|
|
11
|
+
role: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["run"],
|
|
14
|
+
setup(a, { emit: f }) {
|
|
15
|
+
let p = a, m = f, h = n(() => p.role === "accept" ? p.acceptColor : "secondary"), g = n(() => h.value), _ = n(() => {
|
|
16
|
+
if (!p.action.link) return {};
|
|
17
|
+
let { onClick: e, ...t } = p.action.link;
|
|
18
|
+
return t;
|
|
19
|
+
});
|
|
20
|
+
function v() {
|
|
21
|
+
m("run");
|
|
22
|
+
}
|
|
23
|
+
function y(e) {
|
|
24
|
+
e.preventDefault(), p.action.link?.onClick?.(e), v();
|
|
25
|
+
}
|
|
26
|
+
return (n, f) => a.action.link ? (s(), r(l(t), o({
|
|
27
|
+
key: 0,
|
|
28
|
+
size: "sm",
|
|
29
|
+
underline: "hover",
|
|
30
|
+
color: g.value
|
|
31
|
+
}, _.value, {
|
|
32
|
+
onClick: y,
|
|
33
|
+
classes: {
|
|
34
|
+
...a.action.link.classes,
|
|
35
|
+
root: l(d)(a.action.className, a.action.link.classes?.root)
|
|
36
|
+
}
|
|
37
|
+
}), {
|
|
38
|
+
default: u(() => [i(c(a.action.label), 1)]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 16, ["color", "classes"])) : (s(), r(l(e), o({
|
|
41
|
+
key: 1,
|
|
42
|
+
size: "sm",
|
|
43
|
+
onClick: v,
|
|
44
|
+
color: h.value
|
|
45
|
+
}, a.action.button, {
|
|
46
|
+
variant: a.action.solid ? "outline" : "flat",
|
|
47
|
+
classes: {
|
|
48
|
+
...a.action.button?.classes,
|
|
49
|
+
root: l(d)(a.action.className, a.action.button?.classes?.root)
|
|
50
|
+
}
|
|
51
|
+
}), {
|
|
52
|
+
default: u(() => [i(c(a.action.label), 1)]),
|
|
53
|
+
_: 1
|
|
54
|
+
}, 16, [
|
|
55
|
+
"color",
|
|
56
|
+
"variant",
|
|
57
|
+
"classes"
|
|
58
|
+
]));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
export { f as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BridgeDialogHostProps } from './bridgeDialog.types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BridgeDialogHostProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BridgeDialogHostProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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";
|
|
5
|
+
//#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
|
+
__name: "BridgeDialogHost",
|
|
8
|
+
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),
|
|
15
|
+
entry: e,
|
|
16
|
+
key: e.id,
|
|
17
|
+
"host-modal": h.modal
|
|
18
|
+
}, null, 8, [
|
|
19
|
+
"api",
|
|
20
|
+
"entry",
|
|
21
|
+
"host-modal"
|
|
22
|
+
]))), 128))], 64));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { h as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BridgeDialogItemProps } from './bridgeDialog.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<BridgeDialogItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BridgeDialogItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import e from "../../Components/Card/Card.js";
|
|
2
|
+
import t from "../../Components/Modal/Modal.js";
|
|
3
|
+
import n from "./ResolveBridgeDialogFooter.js";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createSlots as s, createVNode as c, defineComponent as l, mergeProps as u, openBlock as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
|
|
5
|
+
import { completeLayerHide as h, invokeLayerDismiss as g, mergeLayerShellProps as _ } from "@bridge-ui/core";
|
|
6
|
+
//#region src/Actions/Dialog/BridgeDialogItem.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var v = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "text-sm text-dark-500 dark:text-dark-400"
|
|
10
|
+
}, y = /* @__PURE__ */ l({
|
|
11
|
+
__name: "BridgeDialogItem",
|
|
12
|
+
props: {
|
|
13
|
+
api: {},
|
|
14
|
+
entry: {},
|
|
15
|
+
hostModal: {}
|
|
16
|
+
},
|
|
17
|
+
setup(l) {
|
|
18
|
+
let y = l, b = r(() => y.entry.props.color ?? "primary"), x = r(() => _(y.hostModal, y.entry.modal)), S = () => {
|
|
19
|
+
g(y.api.entries.value, y.entry.id);
|
|
20
|
+
}, C = () => {
|
|
21
|
+
y.api.close(y.entry.id);
|
|
22
|
+
};
|
|
23
|
+
return (r, g) => (d(), i(p(t), u(x.value, {
|
|
24
|
+
"stack-id": l.entry.id,
|
|
25
|
+
"model-value": l.entry.show,
|
|
26
|
+
onClose: S,
|
|
27
|
+
"onUpdate:modelValue": g[0] ||= (e) => l.api.syncShow(l.entry.id, e),
|
|
28
|
+
onShowChange: g[1] ||= (e) => p(h)(l.api.entries.value, l.entry.id, e, l.api.removeEntry)
|
|
29
|
+
}), {
|
|
30
|
+
default: m(() => [c(p(e), u({ title: l.entry.props.title }, l.entry.props.card), s({
|
|
31
|
+
default: m(() => [l.entry.props.description ? (d(), o("p", v, f(l.entry.props.description), 1)) : a("", !0)]),
|
|
32
|
+
_: 2
|
|
33
|
+
}, [l.entry.props.actions?.accept || l.entry.props.actions?.reject ? {
|
|
34
|
+
name: "footer",
|
|
35
|
+
fn: m(() => [c(n, {
|
|
36
|
+
"accept-color": b.value,
|
|
37
|
+
dismiss: C,
|
|
38
|
+
actions: l.entry.props.actions
|
|
39
|
+
}, null, 8, ["accept-color", "actions"])]),
|
|
40
|
+
key: "0"
|
|
41
|
+
} : void 0]), 1040, ["title"])]),
|
|
42
|
+
_: 1
|
|
43
|
+
}, 16, ["stack-id", "model-value"]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { y as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ResolveBridgeDialogFooterOptions } from './bridgeDialog.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<ResolveBridgeDialogFooterOptions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ResolveBridgeDialogFooterOptions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import e from "./BridgeDialogAction.js";
|
|
2
|
+
import { createBlock as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, openBlock as a } from "vue";
|
|
3
|
+
//#region src/Actions/Dialog/ResolveBridgeDialogFooter.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var o = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "flex justify-end gap-2"
|
|
7
|
+
}, s = /* @__PURE__ */ i({
|
|
8
|
+
__name: "ResolveBridgeDialogFooter",
|
|
9
|
+
props: {
|
|
10
|
+
acceptColor: {},
|
|
11
|
+
actions: {},
|
|
12
|
+
dismiss: { type: Function }
|
|
13
|
+
},
|
|
14
|
+
setup(i) {
|
|
15
|
+
let s = i;
|
|
16
|
+
function c(e) {
|
|
17
|
+
e?.(), s.dismiss();
|
|
18
|
+
}
|
|
19
|
+
return (i, l) => s.actions?.accept || s.actions?.reject ? (a(), r("div", o, [s.actions?.reject?.label ? (a(), t(e, {
|
|
20
|
+
key: 0,
|
|
21
|
+
role: "reject",
|
|
22
|
+
action: s.actions.reject,
|
|
23
|
+
"accept-color": s.acceptColor,
|
|
24
|
+
onRun: l[0] ||= () => c(s.actions?.reject?.onClick)
|
|
25
|
+
}, null, 8, ["action", "accept-color"])) : n("", !0), s.actions?.accept?.label ? (a(), t(e, {
|
|
26
|
+
key: 1,
|
|
27
|
+
role: "accept",
|
|
28
|
+
action: s.actions.accept,
|
|
29
|
+
"accept-color": s.acceptColor,
|
|
30
|
+
onRun: l[1] ||= () => c(s.actions?.accept?.onClick)
|
|
31
|
+
}, null, 8, ["action", "accept-color"])) : n("", !0)])) : n("", !0);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { s as default };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ButtonColor, LayerId } from '@bridge-ui/core';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { ButtonOwnProps } from '../../Components/Button/button.types';
|
|
4
|
+
import { CardOwnProps } from '../../Components/Card/card.types';
|
|
5
|
+
import { LinkProps } from '../../Components/Link/link.types';
|
|
6
|
+
import { ModalOwnProps } from '../../Components/Modal/modal.types';
|
|
7
|
+
export interface DialogAction {
|
|
8
|
+
/**
|
|
9
|
+
* Props merged into the default `Button` (ignored when `link` is set).
|
|
10
|
+
*/
|
|
11
|
+
button?: Partial<Omit<ButtonOwnProps, "children">>;
|
|
12
|
+
/**
|
|
13
|
+
* Extra Tailwind classes merged into the action root (`classes.root`).
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Footer button or link label.
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/**
|
|
21
|
+
* When set, renders a `Link` instead of a `Button`.
|
|
22
|
+
*/
|
|
23
|
+
link?: Partial<Omit<LinkProps, "children">>;
|
|
24
|
+
/**
|
|
25
|
+
* Called when the action is activated, before the dialog dismisses.
|
|
26
|
+
*/
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, renders the button with the `outline` variant instead of `flat`.
|
|
30
|
+
*/
|
|
31
|
+
solid?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface DialogActions {
|
|
34
|
+
/**
|
|
35
|
+
* Primary footer action (e.g. Confirm, Save). Uses the dialog `color` by default.
|
|
36
|
+
*/
|
|
37
|
+
accept?: DialogAction;
|
|
38
|
+
/**
|
|
39
|
+
* Secondary footer action (e.g. Cancel, Dismiss). Uses `secondary` by default.
|
|
40
|
+
*/
|
|
41
|
+
reject?: DialogAction;
|
|
42
|
+
}
|
|
43
|
+
export type ResolveBridgeDialogFooterOptions = {
|
|
44
|
+
acceptColor: keyof ButtonColor;
|
|
45
|
+
actions?: DialogActions;
|
|
46
|
+
dismiss: () => void;
|
|
47
|
+
};
|
|
48
|
+
export type BridgeDialogActionProps = {
|
|
49
|
+
/**
|
|
50
|
+
* Color for the accept action. Reject always uses `secondary`.
|
|
51
|
+
*/
|
|
52
|
+
acceptColor: keyof ButtonColor;
|
|
53
|
+
/**
|
|
54
|
+
* Footer action configuration (label, button/link, handlers).
|
|
55
|
+
*/
|
|
56
|
+
action: DialogAction;
|
|
57
|
+
/**
|
|
58
|
+
* Whether this control renders the primary or secondary footer action.
|
|
59
|
+
*/
|
|
60
|
+
role: "accept" | "reject";
|
|
61
|
+
};
|
|
62
|
+
export type BridgeDialogHostProps = {
|
|
63
|
+
/**
|
|
64
|
+
* Default Modal shell options merged into every dialog opened via `useDialogAction()`.
|
|
65
|
+
* Per-call `open({ modal })` overrides these.
|
|
66
|
+
*/
|
|
67
|
+
modal?: BridgeDialogShellProps;
|
|
68
|
+
};
|
|
69
|
+
export type BridgeDialogItemProps = {
|
|
70
|
+
api: BridgeDialogController;
|
|
71
|
+
entry: BridgeDialogEntry;
|
|
72
|
+
hostModal?: BridgeDialogShellProps;
|
|
73
|
+
};
|
|
74
|
+
export type BridgeDialogShellProps = Partial<Omit<ModalOwnProps, "stackId">>;
|
|
75
|
+
export type BridgeDialogContentProps = {
|
|
76
|
+
/**
|
|
77
|
+
* Footer actions (accept = primary, reject = secondary by default).
|
|
78
|
+
*/
|
|
79
|
+
actions?: DialogActions;
|
|
80
|
+
/**
|
|
81
|
+
* Extra Card shell options (padding, variant, classes, etc.).
|
|
82
|
+
*/
|
|
83
|
+
card?: Partial<Omit<CardOwnProps, "slots" | "title" | "children">>;
|
|
84
|
+
/**
|
|
85
|
+
* Color for the accept action button.
|
|
86
|
+
*
|
|
87
|
+
* @default "primary"
|
|
88
|
+
*/
|
|
89
|
+
color?: keyof ButtonColor;
|
|
90
|
+
/**
|
|
91
|
+
* Optional body text below the title.
|
|
92
|
+
*/
|
|
93
|
+
description?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Dialog title (rendered in the Card header).
|
|
96
|
+
*/
|
|
97
|
+
title: string;
|
|
98
|
+
};
|
|
99
|
+
export type BridgeDialogEntry = {
|
|
100
|
+
id: LayerId;
|
|
101
|
+
modal?: Partial<ModalOwnProps>;
|
|
102
|
+
onClose?: () => void;
|
|
103
|
+
onClosed?: () => void;
|
|
104
|
+
props: BridgeDialogContentProps;
|
|
105
|
+
show: boolean;
|
|
106
|
+
};
|
|
107
|
+
export type BridgeDialogOpenOptions = BridgeDialogContentProps & {
|
|
108
|
+
modal?: BridgeDialogShellProps;
|
|
109
|
+
onClose?: () => void;
|
|
110
|
+
onClosed?: () => void;
|
|
111
|
+
};
|
|
112
|
+
export type BridgeDialogUpdateOptions = {
|
|
113
|
+
modal?: Partial<ModalOwnProps>;
|
|
114
|
+
props?: Partial<BridgeDialogContentProps>;
|
|
115
|
+
};
|
|
116
|
+
export type BridgeDialogController = {
|
|
117
|
+
close: (id: LayerId) => void;
|
|
118
|
+
closeTop: () => void;
|
|
119
|
+
entries: Ref<BridgeDialogEntry[]>;
|
|
120
|
+
isOpen: (id: LayerId) => boolean;
|
|
121
|
+
open: (options: BridgeDialogOpenOptions) => LayerId;
|
|
122
|
+
removeEntry: (id: LayerId) => void;
|
|
123
|
+
syncShow: (id: LayerId, show: boolean) => void;
|
|
124
|
+
update: (id: LayerId, options: BridgeDialogUpdateOptions) => void;
|
|
125
|
+
};
|
|
126
|
+
export type BridgeDialogApi = Omit<BridgeDialogController, "entries" | "syncShow" | "removeEntry"> & {
|
|
127
|
+
stackSize: number;
|
|
128
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { shallowRef as e } from "vue";
|
|
2
|
+
import { closeLayer as t, closeTopLayer as n, createLayerId as r, createOpenLayerEntry as i, isLayerMounted as a, removeLayer as o, syncLayerShow as s, updateLayerMerged as c } from "@bridge-ui/core";
|
|
3
|
+
//#region src/Actions/Dialog/createBridgeDialogApi.ts
|
|
4
|
+
function l(e, t) {
|
|
5
|
+
let { modal: n, onClose: r, onClosed: a, ...o } = t;
|
|
6
|
+
return i(e, {
|
|
7
|
+
modal: n,
|
|
8
|
+
props: o,
|
|
9
|
+
onClose: r,
|
|
10
|
+
onClosed: a
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function u() {
|
|
14
|
+
let i = e([]);
|
|
15
|
+
function u(e) {
|
|
16
|
+
let t = r();
|
|
17
|
+
return i.value = [...i.value, l(t, e)], t;
|
|
18
|
+
}
|
|
19
|
+
function d(e) {
|
|
20
|
+
i.value = t(i.value, e);
|
|
21
|
+
}
|
|
22
|
+
function f() {
|
|
23
|
+
i.value = n(i.value);
|
|
24
|
+
}
|
|
25
|
+
function p(e) {
|
|
26
|
+
return a(i.value, e);
|
|
27
|
+
}
|
|
28
|
+
function m(e) {
|
|
29
|
+
i.value = o(i.value, e);
|
|
30
|
+
}
|
|
31
|
+
function h(e, t) {
|
|
32
|
+
i.value = c(i.value, e, t, ["props", "modal"]);
|
|
33
|
+
}
|
|
34
|
+
function g(e, t) {
|
|
35
|
+
i.value = s(i.value, e, t);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
open: u,
|
|
39
|
+
close: d,
|
|
40
|
+
isOpen: p,
|
|
41
|
+
update: h,
|
|
42
|
+
entries: i,
|
|
43
|
+
closeTop: f,
|
|
44
|
+
syncShow: g,
|
|
45
|
+
removeEntry: m
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { u as createBridgeDialogApi };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { BridgeDialogActionProps, BridgeDialogApi, BridgeDialogContentProps, BridgeDialogEntry, BridgeDialogHostProps, BridgeDialogItemProps, BridgeDialogOpenOptions, BridgeDialogShellProps, BridgeDialogUpdateOptions, DialogAction, DialogActions, } from './bridgeDialog.types';
|
|
2
|
+
export { default as BridgeDialogHost } from './BridgeDialogHost.vue';
|
|
3
|
+
export { BridgeDialogHostMissingError, useDialogAction, } from './useDialogAction';
|
|
@@ -0,0 +1,26 @@
|
|
|
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";
|
|
4
|
+
//#region src/Actions/Dialog/useDialogAction.ts
|
|
5
|
+
var i = class extends Error {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("useDialogAction() requires <BridgeDialogHost /> in the app tree."), this.name = "BridgeDialogHostMissingError";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function a() {
|
|
11
|
+
let a = n(e, null);
|
|
12
|
+
if (!a) throw new i();
|
|
13
|
+
let o = t(() => r(a.entries.value));
|
|
14
|
+
return {
|
|
15
|
+
open: a.open,
|
|
16
|
+
close: a.close,
|
|
17
|
+
isOpen: a.isOpen,
|
|
18
|
+
update: a.update,
|
|
19
|
+
closeTop: a.closeTop,
|
|
20
|
+
get stackSize() {
|
|
21
|
+
return o.value;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as BridgeDialogHostMissingError, a as useDialogAction };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BridgeModalHostProps } from './bridgeModal.types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<BridgeModalHostProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BridgeModalHostProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
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";
|
|
6
|
+
//#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
|
+
__name: "BridgeModalHost",
|
|
9
|
+
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({
|
|
15
|
+
key: t.id,
|
|
16
|
+
"stack-id": t.id,
|
|
17
|
+
"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)
|
|
22
|
+
}), {
|
|
23
|
+
default: g(() => [(u(), a(m(t.component), l({ ref_for: !0 }, t.props), null, 16))]),
|
|
24
|
+
_: 2
|
|
25
|
+
}, 1040, [
|
|
26
|
+
"stack-id",
|
|
27
|
+
"model-value",
|
|
28
|
+
"onUpdate:modelValue",
|
|
29
|
+
"onClose",
|
|
30
|
+
"onShowChange"
|
|
31
|
+
]))), 128))], 64));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { x as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LayerId } from '@bridge-ui/core';
|
|
2
|
+
import { Component, Ref } from 'vue';
|
|
3
|
+
import { ModalOwnProps } from '../../Components/Modal/modal.types';
|
|
4
|
+
export type BridgeModalShellProps = Partial<Omit<ModalOwnProps, "stackId">>;
|
|
5
|
+
export type BridgeModalHostProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Default shell options merged into every modal opened via `useModalAction()`.
|
|
8
|
+
* Per-call `open({ modal })` overrides these.
|
|
9
|
+
*/
|
|
10
|
+
modal?: BridgeModalShellProps;
|
|
11
|
+
};
|
|
12
|
+
export type BridgeModalEntry = {
|
|
13
|
+
component: Component;
|
|
14
|
+
id: LayerId;
|
|
15
|
+
modal?: Partial<ModalOwnProps>;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
onClosed?: () => void;
|
|
18
|
+
props?: Record<string, unknown>;
|
|
19
|
+
show: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type BridgeModalOpenOptions<TProps = Record<string, unknown>> = {
|
|
22
|
+
component: Component;
|
|
23
|
+
modal?: Partial<ModalOwnProps>;
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
onClosed?: () => void;
|
|
26
|
+
props?: TProps;
|
|
27
|
+
};
|
|
28
|
+
export type BridgeModalUpdateOptions = {
|
|
29
|
+
modal?: Partial<ModalOwnProps>;
|
|
30
|
+
props?: Record<string, unknown>;
|
|
31
|
+
};
|
|
32
|
+
export type BridgeModalController = {
|
|
33
|
+
close: (id: LayerId) => void;
|
|
34
|
+
closeTop: () => void;
|
|
35
|
+
entries: Ref<BridgeModalEntry[]>;
|
|
36
|
+
isOpen: (id: LayerId) => boolean;
|
|
37
|
+
open: <TProps = Record<string, unknown>>(options: BridgeModalOpenOptions<TProps>) => LayerId;
|
|
38
|
+
removeEntry: (id: LayerId) => void;
|
|
39
|
+
syncShow: (id: LayerId, show: boolean) => void;
|
|
40
|
+
update: (id: LayerId, options: BridgeModalUpdateOptions) => void;
|
|
41
|
+
};
|
|
42
|
+
export type BridgeModalApi = Omit<BridgeModalController, "entries" | "syncShow" | "removeEntry"> & {
|
|
43
|
+
stackSize: number;
|
|
44
|
+
};
|