@oicl/openbridge-webcomponents-svelte 2.0.0-next.71 → 2.0.0-next.72
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-item/ObcAlertMenuItem.svelte +16 -4
- package/dist/components/alert-menu-item/ObcAlertMenuItem.svelte.d.ts +13 -1
- package/dist/components/message-menu-item/ObcMessageMenuItem.svelte +2 -0
- package/dist/components/message-menu-item/ObcMessageMenuItem.svelte.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ObcAlertMenuItemStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
3
|
+
export type {ObcAlertMenuItemStatus, ObcAlertMenuItemActionState} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
4
4
|
export type {ObcMessageMenuItemSize} from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
|
|
5
5
|
import '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
6
6
|
import { setProperties } from "../../util.js";
|
|
7
|
-
import type {ObcAlertMenuItemStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
7
|
+
import type {ObcAlertMenuItemStatus, ObcAlertMenuItemActionState} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
8
8
|
import type {ObcMessageMenuItemSize} from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
|
|
9
9
|
import type { Snippet } from 'svelte';
|
|
10
10
|
|
|
@@ -39,17 +39,28 @@ Possible values: 'single-line', 'multi-line'.
|
|
|
39
39
|
Default is 'single-line'. */
|
|
40
40
|
size?: ObcMessageMenuItemSize;
|
|
41
41
|
/** Whether to animate the item's appearance (intro animation). */
|
|
42
|
-
animateIntro?: boolean
|
|
42
|
+
animateIntro?: boolean;
|
|
43
|
+
/** The label for the secondary action button.
|
|
44
|
+
Unlike the primary (ACK) action, the secondary label is not derived from
|
|
45
|
+
`status`; it must be provided explicitly. The secondary action is only
|
|
46
|
+
shown when a non-empty label is set and `secondaryActionState` is not
|
|
47
|
+
`none`. */
|
|
48
|
+
secondaryActionLabel?: string;
|
|
49
|
+
/** [object Object],[object Object],[object Object] */
|
|
50
|
+
primaryActionState?: ObcAlertMenuItemActionState;
|
|
51
|
+
/** [object Object],[object Object],[object Object] */
|
|
52
|
+
secondaryActionState?: ObcAlertMenuItemActionState
|
|
43
53
|
}
|
|
44
54
|
export interface Events {
|
|
45
55
|
onAckClick?: (event: CustomEvent<void>) => void;
|
|
56
|
+
onAckSecondaryClick?: (event: CustomEvent<void>) => void;
|
|
46
57
|
onItemClick?: (event: CustomEvent<void>) => void
|
|
47
58
|
}
|
|
48
59
|
export interface Slots {
|
|
49
60
|
alertIcon?: Snippet;
|
|
50
61
|
icon?: Snippet
|
|
51
62
|
}
|
|
52
|
-
const {onAckClick, onItemClick, class: className, style, alertIcon, icon, ...props} = $props<Props & Events & Slots>();
|
|
63
|
+
const {onAckClick, onAckSecondaryClick, onItemClick, class: className, style, alertIcon, icon, ...props} = $props<Props & Events & Slots>();
|
|
53
64
|
|
|
54
65
|
</script>
|
|
55
66
|
<obc-alert-menu-item
|
|
@@ -57,6 +68,7 @@ animateIntro?: boolean
|
|
|
57
68
|
class={className}
|
|
58
69
|
style={style}
|
|
59
70
|
onack-click={onAckClick}
|
|
71
|
+
onack-secondary-click={onAckSecondaryClick}
|
|
60
72
|
onitem-click={onItemClick} >
|
|
61
73
|
|
|
62
74
|
{#if alertIcon}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
2
|
-
import type { ObcAlertMenuItemStatus } from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
2
|
+
import type { ObcAlertMenuItemStatus, ObcAlertMenuItemActionState } from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
|
|
3
3
|
import type { ObcMessageMenuItemSize } from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
export interface Props {
|
|
@@ -34,9 +34,20 @@ Default is 'single-line'. */
|
|
|
34
34
|
size?: ObcMessageMenuItemSize;
|
|
35
35
|
/** Whether to animate the item's appearance (intro animation). */
|
|
36
36
|
animateIntro?: boolean;
|
|
37
|
+
/** The label for the secondary action button.
|
|
38
|
+
Unlike the primary (ACK) action, the secondary label is not derived from
|
|
39
|
+
`status`; it must be provided explicitly. The secondary action is only
|
|
40
|
+
shown when a non-empty label is set and `secondaryActionState` is not
|
|
41
|
+
`none`. */
|
|
42
|
+
secondaryActionLabel?: string;
|
|
43
|
+
/** [object Object],[object Object],[object Object] */
|
|
44
|
+
primaryActionState?: ObcAlertMenuItemActionState;
|
|
45
|
+
/** [object Object],[object Object],[object Object] */
|
|
46
|
+
secondaryActionState?: ObcAlertMenuItemActionState;
|
|
37
47
|
}
|
|
38
48
|
export interface Events {
|
|
39
49
|
onAckClick?: (event: CustomEvent<void>) => void;
|
|
50
|
+
onAckSecondaryClick?: (event: CustomEvent<void>) => void;
|
|
40
51
|
onItemClick?: (event: CustomEvent<void>) => void;
|
|
41
52
|
}
|
|
42
53
|
export interface Slots {
|
|
@@ -46,6 +57,7 @@ export interface Slots {
|
|
|
46
57
|
type $$ComponentProps = Props & Events & Slots;
|
|
47
58
|
declare const ObcAlertMenuItem: import("svelte").Component<$$ComponentProps, {
|
|
48
59
|
ObcAlertMenuItemStatus: typeof ObcAlertMenuItemStatus;
|
|
60
|
+
ObcAlertMenuItemActionState: typeof ObcAlertMenuItemActionState;
|
|
49
61
|
ObcMessageMenuItemSize: typeof ObcMessageMenuItemSize;
|
|
50
62
|
}, "">;
|
|
51
63
|
type ObcAlertMenuItem = ReturnType<typeof ObcAlertMenuItem>;
|
|
@@ -14,6 +14,8 @@ export interface Props {
|
|
|
14
14
|
time?: string;
|
|
15
15
|
primaryActionLabel?: string;
|
|
16
16
|
secondaryActionLabel?: string;
|
|
17
|
+
enablePrimaryAction?: boolean;
|
|
18
|
+
enableSecondaryAction?: boolean;
|
|
17
19
|
hasPrimaryIcon?: boolean;
|
|
18
20
|
hasSecondaryIcon?: boolean;
|
|
19
21
|
hasTrailingIcon?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.72",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oicl/openbridge-webcomponents": "^2.0.0-next.
|
|
34
|
+
"@oicl/openbridge-webcomponents": "^2.0.0-next.71"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|