@oicl/openbridge-webcomponents-svelte 2.0.0-next.152 → 2.0.0-next.153
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-button/ObcAlertButton.svelte +52 -48
- package/dist/components/alert-button/ObcAlertButton.svelte.d.ts +39 -34
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte +83 -0
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte.d.ts +73 -0
- package/dist/components/alert-counter-item/ObcAlertCounterItem.svelte +39 -0
- package/dist/components/alert-counter-item/ObcAlertCounterItem.svelte.d.ts +26 -0
- package/dist/components/alert-frame/ObcAlertFrame.svelte +1 -1
- package/dist/components/alert-frame/ObcAlertFrame.svelte.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
|
@@ -1,64 +1,68 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {AlertType, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
-
export type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
3
|
+
export type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
+
export type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
5
5
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
6
6
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
|
-
import type {AlertType, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
8
|
-
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
7
|
+
import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
8
|
+
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
9
9
|
import type { Snippet } from 'svelte';
|
|
10
10
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
class?: string;
|
|
13
13
|
style?: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- `flat`: Minimal, icon-only button for compact layouts.
|
|
25
|
-
- `normal`: Standard button with icon and optional counter (default).
|
|
26
|
-
- `enhanced`: Emphasized button for high-priority alerts. */
|
|
27
|
-
type?: ObcAlertButtonType;
|
|
28
|
-
/** Increases button size for touch-friendly or prominent use.
|
|
29
|
-
|
|
30
|
-
Adds extra height and padding. */
|
|
31
|
-
large?: boolean;
|
|
32
|
-
/** Whether to display the silence button.
|
|
33
|
-
|
|
34
|
-
The silence button is only shown if this is true, the width is above `silenceButtonMinBreakpointPx`, and the button is not in flat mode. */
|
|
35
|
-
showSilenceButton?: boolean;
|
|
14
|
+
/** Number of active alerts shown in the counter; 0 shows the idle state. */
|
|
15
|
+
nAlerts?: number;
|
|
16
|
+
/** Alert type that selects the icon and colours: `alarm`, `warning`, `caution`, a `level-*` severity, or unset for the idle state. */
|
|
17
|
+
alertType?: AlertType | undefined;
|
|
18
|
+
/** Visual variant: `flat` (icon only), `normal` (default, icon and optional counter) or `enhanced` (emphasized for high-priority alerts). */
|
|
19
|
+
type?: ObcAlertButtonType;
|
|
20
|
+
/** Increases the button height and padding for touch-friendly or prominent use. */
|
|
21
|
+
large?: boolean;
|
|
22
|
+
/** Shows the silence button when the width is at least `silenceButtonMinBreakpointPx` and the button is not flat. */
|
|
23
|
+
showSilenceButton?: boolean;
|
|
36
24
|
/**
|
|
37
25
|
* Disables the silence button when true.
|
|
38
26
|
*
|
|
39
27
|
* Available when `showSilenceButton==true`.
|
|
40
28
|
*/
|
|
41
29
|
silenceButtonDisabled?: boolean;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
/** Shows the alert counter when there are active alerts and the button is not flat. */
|
|
31
|
+
counter?: boolean;
|
|
32
|
+
/** Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell. */
|
|
33
|
+
globalCounter?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
36
|
+
*
|
|
37
|
+
* Available when `globalCounter==true`.
|
|
38
|
+
*/
|
|
39
|
+
counts?: AlertCounts;
|
|
40
|
+
/**
|
|
41
|
+
* Number of shelved alerts, shown after the global counter badges; hidden at zero.
|
|
42
|
+
*
|
|
43
|
+
* Available when `globalCounter==true`.
|
|
44
|
+
*/
|
|
45
|
+
shelvedCount?: number;
|
|
46
|
+
/** Flashes the bell for active alerts of a flashing alert type (never for caution). */
|
|
47
|
+
blinking?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.
|
|
50
|
+
*
|
|
51
|
+
* Available when `blinking==true`.
|
|
52
|
+
*/
|
|
51
53
|
flashingSpeed?: FlashingSpeed;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Window width in px below which a `normal` or `enhanced` button switches to flat mode.
|
|
56
|
+
*
|
|
57
|
+
* Available when `type!=flat`.
|
|
58
|
+
*/
|
|
59
|
+
flatMaxBreakpointPx?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Minimum window width in px for showing the silence button.
|
|
62
|
+
*
|
|
63
|
+
* Available when `showSilenceButton==true`.
|
|
64
|
+
*/
|
|
65
|
+
silenceButtonMinBreakpointPx?: number
|
|
62
66
|
}
|
|
63
67
|
export interface Events {
|
|
64
68
|
onClickAlert?: (event: CustomEvent<void>) => void;
|
|
@@ -76,7 +80,7 @@ silenceButtonMinBreakpointPx?: number
|
|
|
76
80
|
style={style}
|
|
77
81
|
use:forwardEvents={{'click-alert': onClickAlert, 'click-silence': onClickSilence}} >
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
{#if children}
|
|
84
|
+
{@render children()}
|
|
85
|
+
{/if}
|
|
82
86
|
</obc-alert-button>
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
2
|
-
import type { AlertType, FlashingSpeed } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
3
|
-
import type { ObcAlertButtonType } from '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
2
|
+
import type { AlertType, AlertCounts, FlashingSpeed } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
3
|
+
import type { ObcAlertButtonType } from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
export interface Props {
|
|
6
6
|
class?: string;
|
|
7
7
|
style?: string;
|
|
8
|
-
/** Number of active alerts
|
|
9
|
-
|
|
10
|
-
If set to 0, the button appears in the idle state. */
|
|
8
|
+
/** Number of active alerts shown in the counter; 0 shows the idle state. */
|
|
11
9
|
nAlerts?: number;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
Determines the icon and color scheme. Can be `alarm`, `warning`, `caution`, or undefined for idle state. */
|
|
10
|
+
/** Alert type that selects the icon and colours: `alarm`, `warning`, `caution`, a `level-*` severity, or unset for the idle state. */
|
|
15
11
|
alertType?: AlertType | undefined;
|
|
16
|
-
/** Visual variant
|
|
17
|
-
|
|
18
|
-
- `flat`: Minimal, icon-only button for compact layouts.
|
|
19
|
-
- `normal`: Standard button with icon and optional counter (default).
|
|
20
|
-
- `enhanced`: Emphasized button for high-priority alerts. */
|
|
12
|
+
/** Visual variant: `flat` (icon only), `normal` (default, icon and optional counter) or `enhanced` (emphasized for high-priority alerts). */
|
|
21
13
|
type?: ObcAlertButtonType;
|
|
22
|
-
/** Increases button
|
|
23
|
-
|
|
24
|
-
Adds extra height and padding. */
|
|
14
|
+
/** Increases the button height and padding for touch-friendly or prominent use. */
|
|
25
15
|
large?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
The silence button is only shown if this is true, the width is above `silenceButtonMinBreakpointPx`, and the button is not in flat mode. */
|
|
16
|
+
/** Shows the silence button when the width is at least `silenceButtonMinBreakpointPx` and the button is not flat. */
|
|
29
17
|
showSilenceButton?: boolean;
|
|
30
18
|
/**
|
|
31
19
|
* Disables the silence button when true.
|
|
@@ -33,25 +21,41 @@ The silence button is only shown if this is true, the width is above `silenceBut
|
|
|
33
21
|
* Available when `showSilenceButton==true`.
|
|
34
22
|
*/
|
|
35
23
|
silenceButtonDisabled?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
Only shown when there are active alerts and the button is not in flat mode. */
|
|
24
|
+
/** Shows the alert counter when there are active alerts and the button is not flat. */
|
|
39
25
|
counter?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
/** Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell. */
|
|
27
|
+
globalCounter?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
30
|
+
*
|
|
31
|
+
* Available when `globalCounter==true`.
|
|
32
|
+
*/
|
|
33
|
+
counts?: AlertCounts;
|
|
34
|
+
/**
|
|
35
|
+
* Number of shelved alerts, shown after the global counter badges; hidden at zero.
|
|
36
|
+
*
|
|
37
|
+
* Available when `globalCounter==true`.
|
|
38
|
+
*/
|
|
39
|
+
shelvedCount?: number;
|
|
40
|
+
/** Flashes the bell for active alerts of a flashing alert type (never for caution). */
|
|
43
41
|
blinking?: boolean;
|
|
44
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.
|
|
44
|
+
*
|
|
45
|
+
* Available when `blinking==true`.
|
|
46
|
+
*/
|
|
45
47
|
flashingSpeed?: FlashingSpeed;
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Window width in px below which a `normal` or `enhanced` button switches to flat mode.
|
|
50
|
+
*
|
|
51
|
+
* Available when `type!=flat`.
|
|
52
|
+
*/
|
|
50
53
|
flatMaxBreakpointPx?: number;
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Minimum window width in px for showing the silence button.
|
|
56
|
+
*
|
|
57
|
+
* Available when `showSilenceButton==true`.
|
|
58
|
+
*/
|
|
55
59
|
silenceButtonMinBreakpointPx?: number;
|
|
56
60
|
}
|
|
57
61
|
export interface Events {
|
|
@@ -64,6 +68,7 @@ export interface Slots {
|
|
|
64
68
|
type $$ComponentProps = Props & Events & Slots;
|
|
65
69
|
declare const ObcAlertButton: import("svelte").Component<$$ComponentProps, {
|
|
66
70
|
AlertType: typeof AlertType;
|
|
71
|
+
AlertCounts: typeof AlertCounts;
|
|
67
72
|
FlashingSpeed: typeof FlashingSpeed;
|
|
68
73
|
ObcAlertButtonType: typeof ObcAlertButtonType;
|
|
69
74
|
}, "">;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
4
|
+
export type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
5
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
6
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
|
+
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
8
|
+
import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
10
|
+
|
|
11
|
+
export interface Props {
|
|
12
|
+
class?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Visual variant: `flat` (icon only), `normal` (default, bordered with the counter) or `enhanced` (filled in the severity colour).
|
|
16
|
+
*
|
|
17
|
+
* Available when `globalCounter==false`.
|
|
18
|
+
*/
|
|
19
|
+
type?: ObcAlertButtonType;
|
|
20
|
+
/**
|
|
21
|
+
* Alert type that selects the icon and colours: `alarm`, `warning`, `caution` or a `level-*` severity.
|
|
22
|
+
*
|
|
23
|
+
* Available when `globalCounter==false`.
|
|
24
|
+
*/
|
|
25
|
+
alertType?: AlertType | undefined;
|
|
26
|
+
/** Number of active alerts; 0 shows the idle bell and hides the counter. */
|
|
27
|
+
nAlerts?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Shows `nAlerts` next to the bell (not in `flat`).
|
|
30
|
+
*
|
|
31
|
+
* Available when `globalCounter==false`.
|
|
32
|
+
*/
|
|
33
|
+
counter?: boolean;
|
|
34
|
+
/** Shows the per-severity counts, the bell and the total instead of a single alert status. */
|
|
35
|
+
globalCounter?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Alert count per severity for the global counter badges.
|
|
38
|
+
*
|
|
39
|
+
* Available when `globalCounter==true`.
|
|
40
|
+
*/
|
|
41
|
+
counts?: AlertCounts;
|
|
42
|
+
/**
|
|
43
|
+
* Number of shelved alerts, shown after the global counter badges.
|
|
44
|
+
*
|
|
45
|
+
* Available when `globalCounter==true`.
|
|
46
|
+
*/
|
|
47
|
+
shelvedCount?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Flashes the bell while there are active alerts of a flashing alert type.
|
|
50
|
+
*
|
|
51
|
+
* Available when `globalCounter==false`.
|
|
52
|
+
*/
|
|
53
|
+
blinking?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.
|
|
56
|
+
*
|
|
57
|
+
* Available when `blinking==true`.
|
|
58
|
+
*/
|
|
59
|
+
flashingSpeed?: FlashingSpeed;
|
|
60
|
+
/** Stretches the visible button to the host height instead of the 32 px visual target. */
|
|
61
|
+
fillHeight?: boolean;
|
|
62
|
+
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
63
|
+
ariaLabel?: string | null
|
|
64
|
+
}
|
|
65
|
+
export interface Events {
|
|
66
|
+
onClick?: (event: CustomEvent<unknown>) => void
|
|
67
|
+
}
|
|
68
|
+
export interface Slots {
|
|
69
|
+
children?: Snippet
|
|
70
|
+
}
|
|
71
|
+
const {onClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
|
|
72
|
+
|
|
73
|
+
</script>
|
|
74
|
+
<obc-alert-button-item
|
|
75
|
+
use:setProperties={props}
|
|
76
|
+
class={className}
|
|
77
|
+
style={style}
|
|
78
|
+
use:forwardEvents={{'click': onClick}} >
|
|
79
|
+
|
|
80
|
+
{#if children}
|
|
81
|
+
{@render children()}
|
|
82
|
+
{/if}
|
|
83
|
+
</obc-alert-button-item>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
2
|
+
import type { ObcAlertButtonType } from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
3
|
+
import type { AlertType, AlertCounts, FlashingSpeed } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
export interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Visual variant: `flat` (icon only), `normal` (default, bordered with the counter) or `enhanced` (filled in the severity colour).
|
|
10
|
+
*
|
|
11
|
+
* Available when `globalCounter==false`.
|
|
12
|
+
*/
|
|
13
|
+
type?: ObcAlertButtonType;
|
|
14
|
+
/**
|
|
15
|
+
* Alert type that selects the icon and colours: `alarm`, `warning`, `caution` or a `level-*` severity.
|
|
16
|
+
*
|
|
17
|
+
* Available when `globalCounter==false`.
|
|
18
|
+
*/
|
|
19
|
+
alertType?: AlertType | undefined;
|
|
20
|
+
/** Number of active alerts; 0 shows the idle bell and hides the counter. */
|
|
21
|
+
nAlerts?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Shows `nAlerts` next to the bell (not in `flat`).
|
|
24
|
+
*
|
|
25
|
+
* Available when `globalCounter==false`.
|
|
26
|
+
*/
|
|
27
|
+
counter?: boolean;
|
|
28
|
+
/** Shows the per-severity counts, the bell and the total instead of a single alert status. */
|
|
29
|
+
globalCounter?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Alert count per severity for the global counter badges.
|
|
32
|
+
*
|
|
33
|
+
* Available when `globalCounter==true`.
|
|
34
|
+
*/
|
|
35
|
+
counts?: AlertCounts;
|
|
36
|
+
/**
|
|
37
|
+
* Number of shelved alerts, shown after the global counter badges.
|
|
38
|
+
*
|
|
39
|
+
* Available when `globalCounter==true`.
|
|
40
|
+
*/
|
|
41
|
+
shelvedCount?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Flashes the bell while there are active alerts of a flashing alert type.
|
|
44
|
+
*
|
|
45
|
+
* Available when `globalCounter==false`.
|
|
46
|
+
*/
|
|
47
|
+
blinking?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.
|
|
50
|
+
*
|
|
51
|
+
* Available when `blinking==true`.
|
|
52
|
+
*/
|
|
53
|
+
flashingSpeed?: FlashingSpeed;
|
|
54
|
+
/** Stretches the visible button to the host height instead of the 32 px visual target. */
|
|
55
|
+
fillHeight?: boolean;
|
|
56
|
+
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
57
|
+
ariaLabel?: string | null;
|
|
58
|
+
}
|
|
59
|
+
export interface Events {
|
|
60
|
+
onClick?: (event: CustomEvent<unknown>) => void;
|
|
61
|
+
}
|
|
62
|
+
export interface Slots {
|
|
63
|
+
children?: Snippet;
|
|
64
|
+
}
|
|
65
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
66
|
+
declare const ObcAlertButtonItem: import("svelte").Component<$$ComponentProps, {
|
|
67
|
+
ObcAlertButtonType: typeof ObcAlertButtonType;
|
|
68
|
+
AlertType: typeof AlertType;
|
|
69
|
+
AlertCounts: typeof AlertCounts;
|
|
70
|
+
FlashingSpeed: typeof FlashingSpeed;
|
|
71
|
+
}, "">;
|
|
72
|
+
type ObcAlertButtonItem = ReturnType<typeof ObcAlertButtonItem>;
|
|
73
|
+
export default ObcAlertButtonItem;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
4
|
+
export type {AlertCounts} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
5
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
6
|
+
import { setProperties } from "../../util.js";
|
|
7
|
+
import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
8
|
+
import type {AlertCounts} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
10
|
+
|
|
11
|
+
export interface Props {
|
|
12
|
+
class?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
/** How each count is drawn: `badges` (filled severity badges, default) or `alert-level` (flat badges with the severity glyph). */
|
|
15
|
+
type?: ObcAlertCounterItemType;
|
|
16
|
+
/** Alert count per severity (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts); counts of zero or less are not shown. */
|
|
17
|
+
counts?: AlertCounts;
|
|
18
|
+
/** Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero. */
|
|
19
|
+
shelvedCount?: number
|
|
20
|
+
}
|
|
21
|
+
export interface Events {
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
export interface Slots {
|
|
25
|
+
children?: Snippet
|
|
26
|
+
}
|
|
27
|
+
const { class: className, style, children, ...props} = $props<Props & Events & Slots>();
|
|
28
|
+
|
|
29
|
+
</script>
|
|
30
|
+
<obc-alert-counter-item
|
|
31
|
+
use:setProperties={props}
|
|
32
|
+
class={className}
|
|
33
|
+
style={style}
|
|
34
|
+
>
|
|
35
|
+
|
|
36
|
+
{#if children}
|
|
37
|
+
{@render children()}
|
|
38
|
+
{/if}
|
|
39
|
+
</obc-alert-counter-item>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
2
|
+
import type { ObcAlertCounterItemType } from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
3
|
+
import type { AlertCounts } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
export interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
/** How each count is drawn: `badges` (filled severity badges, default) or `alert-level` (flat badges with the severity glyph). */
|
|
9
|
+
type?: ObcAlertCounterItemType;
|
|
10
|
+
/** Alert count per severity (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts); counts of zero or less are not shown. */
|
|
11
|
+
counts?: AlertCounts;
|
|
12
|
+
/** Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero. */
|
|
13
|
+
shelvedCount?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Events {
|
|
16
|
+
}
|
|
17
|
+
export interface Slots {
|
|
18
|
+
children?: Snippet;
|
|
19
|
+
}
|
|
20
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
21
|
+
declare const ObcAlertCounterItem: import("svelte").Component<$$ComponentProps, {
|
|
22
|
+
ObcAlertCounterItemType: typeof ObcAlertCounterItemType;
|
|
23
|
+
AlertCounts: typeof AlertCounts;
|
|
24
|
+
}, "">;
|
|
25
|
+
type ObcAlertCounterItem = ReturnType<typeof ObcAlertCounterItem>;
|
|
26
|
+
export default ObcAlertCounterItem;
|
|
@@ -37,7 +37,7 @@ status?: AlertType;
|
|
|
37
37
|
mode?: ObcAlertFrameMode;
|
|
38
38
|
/** Flash tempo: `default` resolves from the alert type and mode (critical/alarm/high fast, warning/medium slow, low very slow, every rectified alert very slow, caution and diagnostic fixed), `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes. Acknowledged frames are always steady. */
|
|
39
39
|
flashingSpeed?: FlashingSpeed;
|
|
40
|
-
/** `outline` (default) grows the outline by 2 px while on in one step; `outline-eased` grows it over a 50 ms transition, a design-evaluation option. */
|
|
40
|
+
/** `outline` (default) grows the outline by 2 px, 1 px each side, while on in one step; `outline-eased` grows it over a 50 ms transition, a design-evaluation option. */
|
|
41
41
|
flashEffect?: ObcAlertFrameFlashEffect;
|
|
42
42
|
/** When true, the frame wraps and sizes itself to its slotted content instead of overlaying a fixed region. Reflected to an attribute for CSS styling. */
|
|
43
43
|
wrapContent?: boolean;
|
|
@@ -30,7 +30,7 @@ Default: `small-side-flip` */
|
|
|
30
30
|
mode?: ObcAlertFrameMode;
|
|
31
31
|
/** Flash tempo: `default` resolves from the alert type and mode (critical/alarm/high fast, warning/medium slow, low very slow, every rectified alert very slow, caution and diagnostic fixed), `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes. Acknowledged frames are always steady. */
|
|
32
32
|
flashingSpeed?: FlashingSpeed;
|
|
33
|
-
/** `outline` (default) grows the outline by 2 px while on in one step; `outline-eased` grows it over a 50 ms transition, a design-evaluation option. */
|
|
33
|
+
/** `outline` (default) grows the outline by 2 px, 1 px each side, while on in one step; `outline-eased` grows it over a 50 ms transition, a design-evaluation option. */
|
|
34
34
|
flashEffect?: ObcAlertFrameFlashEffect;
|
|
35
35
|
/** When true, the frame wraps and sizes itself to its slotted content instead of overlaying a fixed region. Reflected to an attribute for CSS styling. */
|
|
36
36
|
wrapContent?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export { default as ObcAdviceFloatingItem } from './components/advice-floating-i
|
|
|
101
101
|
export { default as ObcAdviceMenuItem } from './components/advice-menu-item/ObcAdviceMenuItem.svelte';
|
|
102
102
|
export { default as ObcAdviceMessageItem } from './components/advice-message-item/ObcAdviceMessageItem.svelte';
|
|
103
103
|
export { default as ObcAlertButton } from './components/alert-button/ObcAlertButton.svelte';
|
|
104
|
+
export { default as ObcAlertButtonItem } from './components/alert-button-item/ObcAlertButtonItem.svelte';
|
|
105
|
+
export { default as ObcAlertCounterItem } from './components/alert-counter-item/ObcAlertCounterItem.svelte';
|
|
104
106
|
export { default as ObcAlertFloatingItem } from './components/alert-floating-item/ObcAlertFloatingItem.svelte';
|
|
105
107
|
export { default as ObcAlertFrame } from './components/alert-frame/ObcAlertFrame.svelte';
|
|
106
108
|
export { default as ObiDiagnosticBadge } from './components/alert-frame/ObiDiagnosticBadge.svelte';
|
package/dist/index.js
CHANGED
|
@@ -101,6 +101,8 @@ export { default as ObcAdviceFloatingItem } from './components/advice-floating-i
|
|
|
101
101
|
export { default as ObcAdviceMenuItem } from './components/advice-menu-item/ObcAdviceMenuItem.svelte';
|
|
102
102
|
export { default as ObcAdviceMessageItem } from './components/advice-message-item/ObcAdviceMessageItem.svelte';
|
|
103
103
|
export { default as ObcAlertButton } from './components/alert-button/ObcAlertButton.svelte';
|
|
104
|
+
export { default as ObcAlertButtonItem } from './components/alert-button-item/ObcAlertButtonItem.svelte';
|
|
105
|
+
export { default as ObcAlertCounterItem } from './components/alert-counter-item/ObcAlertCounterItem.svelte';
|
|
104
106
|
export { default as ObcAlertFloatingItem } from './components/alert-floating-item/ObcAlertFloatingItem.svelte';
|
|
105
107
|
export { default as ObcAlertFrame } from './components/alert-frame/ObcAlertFrame.svelte';
|
|
106
108
|
export { default as ObiDiagnosticBadge } from './components/alert-frame/ObiDiagnosticBadge.svelte';
|
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.153",
|
|
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.153"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|