@oicl/openbridge-webcomponents-svelte 2.1.0 → 2.2.0-next.2
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.
|
@@ -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, {
|
|
@@ -41,11 +41,12 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
41
41
|
*/
|
|
42
42
|
appsButtonActivated?: boolean;
|
|
43
43
|
/**
|
|
44
|
-
* Highlights the
|
|
44
|
+
* Highlights the more button as active.
|
|
45
45
|
*
|
|
46
46
|
* Available when `inactive==false`.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
moreButtonActivated?: boolean;
|
|
49
|
+
leftMoreButtonActivated?: boolean | undefined;
|
|
49
50
|
/**
|
|
50
51
|
* Highlights the user/profile button as active.
|
|
51
52
|
*
|
|
@@ -103,6 +104,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
103
104
|
onMenuButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
104
105
|
onDimmingButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
105
106
|
onAppsButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
107
|
+
onMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
106
108
|
onLeftMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
107
109
|
onUserButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
108
110
|
onClose?: (event: CustomEvent<unknown>) => void;
|
|
@@ -117,7 +119,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
117
119
|
alerts?: Snippet;
|
|
118
120
|
clock?: Snippet
|
|
119
121
|
}
|
|
120
|
-
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, alerts, clock, ...props} = $props<Props & Events & Slots>();
|
|
122
|
+
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onMoreButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, alerts, clock, ...props} = $props<Props & Events & Slots>();
|
|
121
123
|
|
|
122
124
|
|
|
123
125
|
</script>
|
|
@@ -126,7 +128,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
126
128
|
|
|
127
129
|
class={className}
|
|
128
130
|
style={style}
|
|
129
|
-
use:forwardEvents={{'menu-button-clicked': onMenuButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'apps-button-clicked': onAppsButtonClicked, 'left-more-button-clicked': onLeftMoreButtonClicked, 'user-button-clicked': onUserButtonClicked, 'close': onClose, 'back': onBack, 'emergency-brightness-start': onEmergencyBrightnessStart, 'emergency-brightness-stop': onEmergencyBrightnessStop, 'breadcrumb-click': onBreadcrumbClick}} >
|
|
131
|
+
use:forwardEvents={{'menu-button-clicked': onMenuButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'apps-button-clicked': onAppsButtonClicked, 'more-button-clicked': onMoreButtonClicked, 'left-more-button-clicked': onLeftMoreButtonClicked, 'user-button-clicked': onUserButtonClicked, 'close': onClose, 'back': onBack, 'emergency-brightness-start': onEmergencyBrightnessStart, 'emergency-brightness-stop': onEmergencyBrightnessStop, 'breadcrumb-click': onBreadcrumbClick}} >
|
|
130
132
|
|
|
131
133
|
{#if appIcon}
|
|
132
134
|
<NamedSlot name="app-icon" content={appIcon} />
|
|
@@ -34,11 +34,12 @@ export interface Props {
|
|
|
34
34
|
*/
|
|
35
35
|
appsButtonActivated?: boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Highlights the
|
|
37
|
+
* Highlights the more button as active.
|
|
38
38
|
*
|
|
39
39
|
* Available when `inactive==false`.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
moreButtonActivated?: boolean;
|
|
42
|
+
leftMoreButtonActivated?: boolean | undefined;
|
|
42
43
|
/**
|
|
43
44
|
* Highlights the user/profile button as active.
|
|
44
45
|
*
|
|
@@ -96,6 +97,7 @@ export interface Events {
|
|
|
96
97
|
onMenuButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
97
98
|
onDimmingButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
98
99
|
onAppsButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
100
|
+
onMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
99
101
|
onLeftMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
100
102
|
onUserButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
101
103
|
onClose?: (event: CustomEvent<unknown>) => void;
|
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.2",
|
|
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.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"svelte": "^5.0.0"
|