@oicl/openbridge-webcomponents-svelte 2.1.0-next.9 → 2.2.0-next.1
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/components/alert-menu/ObcAlertMenu.svelte +2 -2
- package/dist/components/alert-menu/ObcAlertMenu.svelte.d.ts +2 -2
- package/dist/components/app-menu/ObcAppMenu.svelte +2 -2
- package/dist/components/app-menu/ObcAppMenu.svelte.d.ts +2 -2
- package/dist/components/brilliance-menu/ObcBrillianceMenu.svelte +2 -2
- package/dist/components/brilliance-menu/ObcBrillianceMenu.svelte.d.ts +2 -2
- package/dist/components/command-menu/ObcCommandMenu.svelte +2 -2
- package/dist/components/command-menu/ObcCommandMenu.svelte.d.ts +2 -2
- package/dist/components/context-menu-input/ObcContextMenuInput.svelte +2 -2
- package/dist/components/context-menu-input/ObcContextMenuInput.svelte.d.ts +2 -2
- package/dist/components/navigation-menu/ObcNavigationMenu.svelte +2 -2
- package/dist/components/navigation-menu/ObcNavigationMenu.svelte.d.ts +2 -2
- package/dist/components/split-button/ObcSplitButton.svelte +21 -2
- package/dist/components/split-button/ObcSplitButton.svelte.d.ts +15 -0
- package/dist/components/system-menu/ObcSystemMenu.svelte +2 -2
- package/dist/components/system-menu/ObcSystemMenu.svelte.d.ts +2 -2
- package/dist/components/user-menu/ObcUserMenu.svelte +2 -2
- package/dist/components/user-menu/ObcUserMenu.svelte.d.ts +2 -2
- package/package.json +2 -2
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
class?: string;
|
|
12
12
|
style?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
14
14
|
softDismiss?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the menu is showing.
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
17
|
*
|
|
18
18
|
* Available when `softDismiss==true`.
|
|
19
19
|
*/
|
|
@@ -4,10 +4,10 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
8
8
|
softDismiss?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the menu is showing.
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
11
|
*
|
|
12
12
|
* Available when `softDismiss==true`.
|
|
13
13
|
*/
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
class?: string;
|
|
11
11
|
style?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
13
13
|
softDismiss?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* Whether the menu is showing.
|
|
15
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
16
16
|
*
|
|
17
17
|
* Available when `softDismiss==true`.
|
|
18
18
|
*/
|
|
@@ -3,10 +3,10 @@ import type { Snippet } from 'svelte';
|
|
|
3
3
|
export interface Props {
|
|
4
4
|
class?: string;
|
|
5
5
|
style?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
7
7
|
softDismiss?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* Whether the menu is showing.
|
|
9
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
10
10
|
*
|
|
11
11
|
* Available when `softDismiss==true`.
|
|
12
12
|
*/
|
|
@@ -12,10 +12,10 @@ import type {ObcPalette} from '@oicl/openbridge-webcomponents/dist/charthelpers/
|
|
|
12
12
|
export interface Props {
|
|
13
13
|
class?: string;
|
|
14
14
|
style?: string;
|
|
15
|
-
/**
|
|
15
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
16
16
|
softDismiss?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
* Whether the menu is showing.
|
|
18
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
19
19
|
*
|
|
20
20
|
* Available when `softDismiss==true`.
|
|
21
21
|
*/
|
|
@@ -5,10 +5,10 @@ import type { Snippet } from 'svelte';
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
class?: string;
|
|
7
7
|
style?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
9
9
|
softDismiss?: boolean;
|
|
10
10
|
/**
|
|
11
|
-
* Whether the menu is showing.
|
|
11
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
12
12
|
*
|
|
13
13
|
* Available when `softDismiss==true`.
|
|
14
14
|
*/
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
class?: string;
|
|
12
12
|
style?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
14
14
|
softDismiss?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the menu is showing.
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
17
|
*
|
|
18
18
|
* Available when `softDismiss==true`.
|
|
19
19
|
*/
|
|
@@ -3,10 +3,10 @@ import type { Snippet } from 'svelte';
|
|
|
3
3
|
export interface Props {
|
|
4
4
|
class?: string;
|
|
5
5
|
style?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
7
7
|
softDismiss?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* Whether the menu is showing.
|
|
9
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
10
10
|
*
|
|
11
11
|
* Available when `softDismiss==true`.
|
|
12
12
|
*/
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
class?: string;
|
|
11
11
|
style?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
13
13
|
softDismiss?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* Whether the menu is showing.
|
|
15
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
16
16
|
*
|
|
17
17
|
* Available when `softDismiss==true`.
|
|
18
18
|
*/
|
|
@@ -4,10 +4,10 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
8
8
|
softDismiss?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the menu is showing.
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
11
|
*
|
|
12
12
|
* Available when `softDismiss==true`.
|
|
13
13
|
*/
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
class?: string;
|
|
12
12
|
style?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
14
14
|
softDismiss?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the menu is showing.
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
17
|
*
|
|
18
18
|
* Available when `softDismiss==true`.
|
|
19
19
|
*/
|
|
@@ -4,10 +4,10 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
8
8
|
softDismiss?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the menu is showing.
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
11
|
*
|
|
12
12
|
* Available when `softDismiss==true`.
|
|
13
13
|
*/
|
|
@@ -46,8 +46,22 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
|
|
|
46
46
|
fullWidth?: boolean;
|
|
47
47
|
/** Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons. */
|
|
48
48
|
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Disables the primary button alone, for an action the user cannot take right now while the menu stays in use, for example to ask for the access the action needs.
|
|
51
|
+
*
|
|
52
|
+
* Available when `disabled==false`.
|
|
53
|
+
*/
|
|
54
|
+
primaryDisabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Disables the dropdown button alone, leaving the primary action.
|
|
57
|
+
*
|
|
58
|
+
* Available when `disabled==false`.
|
|
59
|
+
*/
|
|
60
|
+
dropdownDisabled?: boolean;
|
|
49
61
|
/** Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport. */
|
|
50
62
|
openTop?: boolean;
|
|
63
|
+
/** Extend the menu to the left of the dropdown button (`true`), its right edge on the button's right edge, instead of to the right. For a button near the right edge of its container; combines with `openTop`. */
|
|
64
|
+
openLeft?: boolean;
|
|
51
65
|
/**
|
|
52
66
|
* Array of column group definitions for multi-column/grouped menus. Use instead of `options` for grouped or subtitle layouts.
|
|
53
67
|
*
|
|
@@ -60,9 +74,10 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
|
|
|
60
74
|
onChange?: (event: ObcSplitButtonChangeEvent) => void
|
|
61
75
|
}
|
|
62
76
|
export interface Slots {
|
|
63
|
-
icon?: Snippet
|
|
77
|
+
icon?: Snippet;
|
|
78
|
+
dropdownIcon?: Snippet
|
|
64
79
|
}
|
|
65
|
-
const {onClick, onChange, class: className, style, icon, ...props} = $props<Props & Events & Slots>();
|
|
80
|
+
const {onClick, onChange, class: className, style, icon, dropdownIcon, ...props} = $props<Props & Events & Slots>();
|
|
66
81
|
|
|
67
82
|
|
|
68
83
|
</script>
|
|
@@ -76,4 +91,8 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
|
|
|
76
91
|
{#if icon}
|
|
77
92
|
<NamedSlot name="icon" content={icon} />
|
|
78
93
|
{/if}
|
|
94
|
+
|
|
95
|
+
{#if dropdownIcon}
|
|
96
|
+
<NamedSlot name="dropdown-icon" content={dropdownIcon} />
|
|
97
|
+
{/if}
|
|
79
98
|
</obc-split-button>
|
|
@@ -39,8 +39,22 @@ export interface Props {
|
|
|
39
39
|
fullWidth?: boolean;
|
|
40
40
|
/** Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons. */
|
|
41
41
|
disabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Disables the primary button alone, for an action the user cannot take right now while the menu stays in use, for example to ask for the access the action needs.
|
|
44
|
+
*
|
|
45
|
+
* Available when `disabled==false`.
|
|
46
|
+
*/
|
|
47
|
+
primaryDisabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Disables the dropdown button alone, leaving the primary action.
|
|
50
|
+
*
|
|
51
|
+
* Available when `disabled==false`.
|
|
52
|
+
*/
|
|
53
|
+
dropdownDisabled?: boolean;
|
|
42
54
|
/** Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport. */
|
|
43
55
|
openTop?: boolean;
|
|
56
|
+
/** Extend the menu to the left of the dropdown button (`true`), its right edge on the button's right edge, instead of to the right. For a button near the right edge of its container; combines with `openTop`. */
|
|
57
|
+
openLeft?: boolean;
|
|
44
58
|
/**
|
|
45
59
|
* Array of column group definitions for multi-column/grouped menus. Use instead of `options` for grouped or subtitle layouts.
|
|
46
60
|
*
|
|
@@ -54,6 +68,7 @@ export interface Events {
|
|
|
54
68
|
}
|
|
55
69
|
export interface Slots {
|
|
56
70
|
icon?: Snippet;
|
|
71
|
+
dropdownIcon?: Snippet;
|
|
57
72
|
}
|
|
58
73
|
type $$ComponentProps = Props & Events & Slots;
|
|
59
74
|
declare const ObcSplitButton: import("svelte").Component<$$ComponentProps, {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
class?: string;
|
|
12
12
|
style?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
14
14
|
softDismiss?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the menu is showing.
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
17
|
*
|
|
18
18
|
* Available when `softDismiss==true`.
|
|
19
19
|
*/
|
|
@@ -4,10 +4,10 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
8
8
|
softDismiss?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the menu is showing.
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
11
|
*
|
|
12
12
|
* Available when `softDismiss==true`.
|
|
13
13
|
*/
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
class?: string;
|
|
12
12
|
style?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
14
14
|
softDismiss?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the menu is showing.
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
17
|
*
|
|
18
18
|
* Available when `softDismiss==true`.
|
|
19
19
|
*/
|
|
@@ -4,10 +4,10 @@ import type { Snippet } from 'svelte';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
6
6
|
style?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click, or from the button event of `obc-top-bar` or `obc-integration-bar`. The user menu's *Soft Dismiss From A Bar Button* story shows that wiring, the brilliance menu's *Soft Dismiss* story the one for a button you hold yourself (`bindPopoverTrigger`), and the vue demo runs its top bar this way. Leave it off to show and hide the menu yourself. */
|
|
8
8
|
softDismiss?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
* Whether the menu is showing.
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
11
|
*
|
|
12
12
|
* Available when `softDismiss==true`.
|
|
13
13
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-next.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@oicl/openbridge-webcomponents": "^2.
|
|
37
|
+
"@oicl/openbridge-webcomponents": "^2.2.0-next.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"svelte": "^5.0.0"
|