@oicl/openbridge-webcomponents-svelte 2.0.0-next.83 → 2.0.0-next.85

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.
@@ -1,9 +1,9 @@
1
1
 
2
2
  <script lang="ts">
3
-
3
+ export type {TabItemBadge} from '@oicl/openbridge-webcomponents/dist/components/tab-item/tab-item.js';
4
4
  import '@oicl/openbridge-webcomponents/dist/components/tab-item/tab-item.js';
5
5
  import { setProperties } from "../../util.js";
6
-
6
+ import type {TabItemBadge} from '@oicl/openbridge-webcomponents/dist/components/tab-item/tab-item.js';
7
7
  import type { Snippet } from 'svelte';
8
8
 
9
9
  export interface Props {
@@ -44,11 +44,16 @@ Useful for visually separating tabs.
44
44
 
45
45
  Default: false */
46
46
  hasDivider?: boolean;
47
- /** Displays a badge (count/status) on the tab.
48
- Configure badge appearance via `badgeCount`, `badgeType`, `badgeSize`, etc.
47
+ /** One or more badges (count/status) to display on the tab.
49
48
 
50
- Default: false */
51
- hasBadge?: boolean;
49
+ When this array is non-empty it takes precedence over the deprecated
50
+ single-badge props (`hasBadge`, `badgeType`, `badgeSize`, `badgeCount`,
51
+ `badgeShowNumber`, `showLeadingBadgeIcon`). When empty, the deprecated
52
+ props are used instead (gated by `hasBadge`).
53
+
54
+ Default: [] */
55
+ badges?: TabItemBadge[];
56
+ hasBadge?: boolean;
52
57
  /** (Deprecated/Unused) Icon name for the tab.
53
58
  Icon content should be provided via the `leading-icon` slot.
54
59
 
@@ -71,29 +76,11 @@ subtitle?: string;
71
76
 
72
77
  Default: false */
73
78
  disabled?: boolean;
74
- /** Type of badge to display (e.g., 'regular', 'alarm', 'warning', etc.).
75
- See `BadgeType` enum for available options.
76
-
77
- Default: 'regular' */
78
- badgeType?: string;
79
- /** Size of the badge ('regular' or 'large').
80
- See `BadgeSize` enum for available options.
81
-
82
- Default: 'regular' */
83
- badgeSize?: string;
84
- /** Shows the badge's numeric value. When false, only the badge background is rendered (for status-only badges).
85
-
86
- Default: true */
87
- badgeShowNumber?: boolean;
88
- /** The numeric value to display in the badge (e.g., count of notifications).
89
-
90
- Default: 0 */
91
- badgeCount?: number;
92
- /** Shows an icon inside the badge.
93
- Supply icon content via the `badge-icon` slot.
94
-
95
- Default: false */
96
- showLeadingBadgeIcon?: boolean
79
+ badgeType?: string;
80
+ badgeSize?: string;
81
+ badgeShowNumber?: boolean;
82
+ badgeCount?: number;
83
+ showLeadingBadgeIcon?: boolean
97
84
  }
98
85
  export interface Events {
99
86
  onTabClick?: (event: CustomEvent<{title: string}>) => void;
@@ -1,4 +1,5 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/components/tab-item/tab-item.js';
2
+ import type { TabItemBadge } from '@oicl/openbridge-webcomponents/dist/components/tab-item/tab-item.js';
2
3
  import type { Snippet } from 'svelte';
3
4
  export interface Props {
4
5
  class?: string;
@@ -38,10 +39,15 @@ Useful for visually separating tabs.
38
39
 
39
40
  Default: false */
40
41
  hasDivider?: boolean;
41
- /** Displays a badge (count/status) on the tab.
42
- Configure badge appearance via `badgeCount`, `badgeType`, `badgeSize`, etc.
42
+ /** One or more badges (count/status) to display on the tab.
43
43
 
44
- Default: false */
44
+ When this array is non-empty it takes precedence over the deprecated
45
+ single-badge props (`hasBadge`, `badgeType`, `badgeSize`, `badgeCount`,
46
+ `badgeShowNumber`, `showLeadingBadgeIcon`). When empty, the deprecated
47
+ props are used instead (gated by `hasBadge`).
48
+
49
+ Default: [] */
50
+ badges?: TabItemBadge[];
45
51
  hasBadge?: boolean;
46
52
  /** (Deprecated/Unused) Icon name for the tab.
47
53
  Icon content should be provided via the `leading-icon` slot.
@@ -65,28 +71,10 @@ Default: '' */
65
71
 
66
72
  Default: false */
67
73
  disabled?: boolean;
68
- /** Type of badge to display (e.g., 'regular', 'alarm', 'warning', etc.).
69
- See `BadgeType` enum for available options.
70
-
71
- Default: 'regular' */
72
74
  badgeType?: string;
73
- /** Size of the badge ('regular' or 'large').
74
- See `BadgeSize` enum for available options.
75
-
76
- Default: 'regular' */
77
75
  badgeSize?: string;
78
- /** Shows the badge's numeric value. When false, only the badge background is rendered (for status-only badges).
79
-
80
- Default: true */
81
76
  badgeShowNumber?: boolean;
82
- /** The numeric value to display in the badge (e.g., count of notifications).
83
-
84
- Default: 0 */
85
77
  badgeCount?: number;
86
- /** Shows an icon inside the badge.
87
- Supply icon content via the `badge-icon` slot.
88
-
89
- Default: false */
90
78
  showLeadingBadgeIcon?: boolean;
91
79
  }
92
80
  export interface Events {
@@ -103,6 +91,8 @@ export interface Slots {
103
91
  badgeIcon?: Snippet;
104
92
  }
105
93
  type $$ComponentProps = Props & Events & Slots;
106
- declare const ObcTabItem: import("svelte").Component<$$ComponentProps, {}, "">;
94
+ declare const ObcTabItem: import("svelte").Component<$$ComponentProps, {
95
+ TabItemBadge: typeof TabItemBadge;
96
+ }, "">;
107
97
  type ObcTabItem = ReturnType<typeof ObcTabItem>;
108
98
  export default ObcTabItem;
@@ -16,12 +16,13 @@
16
16
  - `subtitle` (string): Contextual text shown below the title when subtitle display is enabled.
17
17
  - `showSubtitle` (boolean): Optional per-tab override for displaying the subtitle.
18
18
  - `hasLeadingIcon` (boolean): Whether to show a leading icon (default: true).
19
- - `hasBadge` (boolean): Whether to show a badge on the tab.
20
- - `badgeCount` (number): Number to display in the badge.
21
- - `badgeType` (BadgeType): Visual style of the badge (e.g., notification, alarm, enhance).
22
- - `badgeSize` (BadgeSize): Size of the badge (e.g., regular, large).
23
- - `badgeShowNumber` (boolean): If true, shows the badge number.
24
- - `showLeadingBadgeIcon` (boolean): If true, shows a badge icon.
19
+ - `badges` (TabItemBadge[]): One or more badges to display on the tab. Takes precedence over the deprecated single-badge fields below.
20
+ - `hasBadge` (boolean, deprecated): Whether to show a badge on the tab.
21
+ - `badgeCount` (number, deprecated): Number to display in the badge.
22
+ - `badgeType` (BadgeType, deprecated): Visual style of the badge (e.g., notification, alarm, enhance).
23
+ - `badgeSize` (BadgeSize, deprecated): Size of the badge (e.g., regular, large).
24
+ - `badgeShowNumber` (boolean, deprecated): If true, shows the badge number.
25
+ - `showLeadingBadgeIcon` (boolean, deprecated): If true, shows a badge icon.
25
26
  - `disabled` (boolean): If true, disables the tab. */
26
27
  tabs?: TabData[];
27
28
  /** The `id` of the currently selected tab. Only one tab can be selected at a time.
@@ -32,6 +33,7 @@ selectedTabId?: string;
32
33
 
33
34
  Default: `false`. */
34
35
  hasClose?: boolean;
36
+ centerContent?: boolean;
35
37
  /** Enables "hug" mode for a more compact tab layout with reduced padding.
36
38
 
37
39
  Default: `false`. */
@@ -52,9 +54,9 @@ hasAddNewTab?: boolean
52
54
  }
53
55
  export interface Slots {
54
56
  tabIcon?: Snippet<[any]>;
55
- tabBadgeIcon?: Snippet<[any]>
57
+ tab?: Snippet<[any]>
56
58
  }
57
- const {onTabSelected, onTabClosed, onAddNewTab, class: className, style, tabIcon, tabBadgeIcon, ...props} = $props<Props & Events & Slots>();
59
+ const {onTabSelected, onTabClosed, onAddNewTab, class: className, style, tabIcon, tab, ...props} = $props<Props & Events & Slots>();
58
60
 
59
61
  </script>
60
62
  <obc-tab-row
@@ -73,10 +75,10 @@ hasAddNewTab?: boolean
73
75
  {/each}
74
76
  {/if}
75
77
 
76
- {#if props.tabs && tabBadgeIcon}
78
+ {#if props.tabs && tab}
77
79
  {#each props.tabs as item}
78
- <div slot="tab-{item.id}-badge-icon">
79
- {@render tabBadgeIcon(item)}
80
+ <div slot="tab-{item.id}-<iconSlotName>">
81
+ {@render tab(item)}
80
82
  </div>
81
83
  {/each}
82
84
  {/if}
@@ -11,12 +11,13 @@ export interface Props {
11
11
  - `subtitle` (string): Contextual text shown below the title when subtitle display is enabled.
12
12
  - `showSubtitle` (boolean): Optional per-tab override for displaying the subtitle.
13
13
  - `hasLeadingIcon` (boolean): Whether to show a leading icon (default: true).
14
- - `hasBadge` (boolean): Whether to show a badge on the tab.
15
- - `badgeCount` (number): Number to display in the badge.
16
- - `badgeType` (BadgeType): Visual style of the badge (e.g., notification, alarm, enhance).
17
- - `badgeSize` (BadgeSize): Size of the badge (e.g., regular, large).
18
- - `badgeShowNumber` (boolean): If true, shows the badge number.
19
- - `showLeadingBadgeIcon` (boolean): If true, shows a badge icon.
14
+ - `badges` (TabItemBadge[]): One or more badges to display on the tab. Takes precedence over the deprecated single-badge fields below.
15
+ - `hasBadge` (boolean, deprecated): Whether to show a badge on the tab.
16
+ - `badgeCount` (number, deprecated): Number to display in the badge.
17
+ - `badgeType` (BadgeType, deprecated): Visual style of the badge (e.g., notification, alarm, enhance).
18
+ - `badgeSize` (BadgeSize, deprecated): Size of the badge (e.g., regular, large).
19
+ - `badgeShowNumber` (boolean, deprecated): If true, shows the badge number.
20
+ - `showLeadingBadgeIcon` (boolean, deprecated): If true, shows a badge icon.
20
21
  - `disabled` (boolean): If true, disables the tab. */
21
22
  tabs?: TabData[];
22
23
  /** The `id` of the currently selected tab. Only one tab can be selected at a time.
@@ -27,6 +28,7 @@ Changing this property updates the selected tab visually and emits the `tab-sele
27
28
 
28
29
  Default: `false`. */
29
30
  hasClose?: boolean;
31
+ centerContent?: boolean;
30
32
  /** Enables "hug" mode for a more compact tab layout with reduced padding.
31
33
 
32
34
  Default: `false`. */
@@ -55,7 +57,7 @@ export interface Events {
55
57
  }
56
58
  export interface Slots {
57
59
  tabIcon?: Snippet<[any]>;
58
- tabBadgeIcon?: Snippet<[any]>;
60
+ tab?: Snippet<[any]>;
59
61
  }
60
62
  type $$ComponentProps = Props & Events & Slots;
61
63
  declare const ObcTabRow: import("svelte").Component<$$ComponentProps, {
@@ -11,7 +11,8 @@
11
11
  style?: string;
12
12
  alignment?: ObcTextboxAlignment;
13
13
  size?: ObcTextboxSize;
14
- fontWeight?: ObcTextboxFontWeight
14
+ fontWeight?: ObcTextboxFontWeight;
15
+ tabularNums?: boolean
15
16
  }
16
17
  export interface Events {
17
18
 
@@ -7,6 +7,7 @@ export interface Props {
7
7
  alignment?: ObcTextboxAlignment;
8
8
  size?: ObcTextboxSize;
9
9
  fontWeight?: ObcTextboxFontWeight;
10
+ tabularNums?: boolean;
10
11
  }
11
12
  export interface Events {
12
13
  }
@@ -1,47 +1,54 @@
1
1
 
2
2
  <script lang="ts">
3
- export type {ReadoutListItemSize, ReadoutListItemStacking, ReadoutListItemPriority, ReadoutListItemDataState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
3
+ export type {ReadoutListItemSize, ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutListItemDataQuality, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
4
4
  export type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
5
5
  import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
6
6
  import { setProperties } from "../../util.js";
7
- import type {ReadoutListItemSize, ReadoutListItemStacking, ReadoutListItemPriority, ReadoutListItemDataState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
7
+ import type {ReadoutListItemSize, ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutListItemDataQuality, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
8
8
  import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
9
9
  import type { Snippet } from 'svelte';
10
10
 
11
11
  export interface Props {
12
12
  class?: string;
13
13
  style?: string;
14
- size?: ReadoutListItemSize;
15
- stacking?: ReadoutListItemStacking;
16
- priority?: ReadoutListItemPriority;
17
- dataState?: ReadoutListItemDataState;
18
- alert?: boolean | AlertFrameConfig;
19
- label?: string;
20
- unit?: string;
21
- src?: string;
22
- value?: number | undefined;
23
- setpointValue?: number | undefined;
14
+ label?: string | undefined;
15
+ unit?: string | undefined;
16
+ src?: string | undefined;
17
+ hasValue?: boolean;
18
+ value?: number | null;
19
+ /** Render the value as the literal "OFF" (e.g. equipment powered down). Affects the value only. */
20
+ off?: boolean;
24
21
  hasSetpoint?: boolean;
25
- hasDegree?: boolean;
26
- hasUnit?: boolean;
27
- hasLabel?: boolean;
28
- hasSource?: boolean;
22
+ setpoint?: number | undefined;
23
+ hasAdvice?: boolean;
24
+ advice?: number | undefined;
25
+ size?: ReadoutListItemSize | undefined;
26
+ priority?: ReadoutListItemPriority | undefined;
27
+ stacking?: ReadoutListItemStacking | undefined;
28
+ clickable?: boolean | ReadoutListItemClickable;
29
29
  hasLeadingIcon?: boolean;
30
- hasValueIcon?: boolean;
30
+ hasDegree?: boolean;
31
+ hasDegreeSpacer?: boolean;
31
32
  fractionDigits?: number;
32
- showZeroPadding?: boolean;
33
- minValueLength?: number;
34
- hasHintedZeros?: boolean;
35
- labelOnly?: boolean
33
+ maxDigits?: number;
34
+ dataQuality?: ReadoutListItemDataQuality | undefined;
35
+ alert?: boolean | AlertFrameConfig;
36
+ valueOptions?: ReadoutValueOptions | undefined;
37
+ setpointOptions?: ReadoutSetpointOptions | undefined;
38
+ adviceOptions?: ReadoutAdviceOptions | undefined;
39
+ unitOptions?: ReadoutReserverOptions | undefined;
40
+ srcOptions?: ReadoutSrcOptions | undefined
36
41
  }
37
42
  export interface Events {
38
43
 
39
44
  }
40
45
  export interface Slots {
41
46
  leadingIcon?: Snippet;
42
- valueIcon?: Snippet
47
+ valueIcon?: Snippet;
48
+ setpointIcon?: Snippet;
49
+ adviceIcon?: Snippet
43
50
  }
44
- const { class: className, style, leadingIcon, valueIcon, ...props} = $props<Props & Events & Slots>();
51
+ const { class: className, style, leadingIcon, valueIcon, setpointIcon, adviceIcon, ...props} = $props<Props & Events & Slots>();
45
52
 
46
53
  </script>
47
54
  <obc-readout-list-item
@@ -61,4 +68,16 @@ import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/compone
61
68
  {@render valueIcon()}
62
69
  </div>
63
70
  {/if}
71
+
72
+ {#if setpointIcon}
73
+ <div slot="setpoint-icon">
74
+ {@render setpointIcon()}
75
+ </div>
76
+ {/if}
77
+
78
+ {#if adviceIcon}
79
+ <div slot="advice-icon">
80
+ {@render adviceIcon()}
81
+ </div>
82
+ {/if}
64
83
  </obc-readout-list-item>
@@ -1,45 +1,58 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
2
- import type { ReadoutListItemSize, ReadoutListItemStacking, ReadoutListItemPriority, ReadoutListItemDataState } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
2
+ import type { ReadoutListItemSize, ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutListItemDataQuality, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
3
3
  import type { AlertFrameConfig } from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
4
4
  import type { Snippet } from 'svelte';
5
5
  export interface Props {
6
6
  class?: string;
7
7
  style?: string;
8
- size?: ReadoutListItemSize;
9
- stacking?: ReadoutListItemStacking;
10
- priority?: ReadoutListItemPriority;
11
- dataState?: ReadoutListItemDataState;
12
- alert?: boolean | AlertFrameConfig;
13
- label?: string;
14
- unit?: string;
15
- src?: string;
16
- value?: number | undefined;
17
- setpointValue?: number | undefined;
8
+ label?: string | undefined;
9
+ unit?: string | undefined;
10
+ src?: string | undefined;
11
+ hasValue?: boolean;
12
+ value?: number | null;
13
+ /** Render the value as the literal "OFF" (e.g. equipment powered down). Affects the value only. */
14
+ off?: boolean;
18
15
  hasSetpoint?: boolean;
19
- hasDegree?: boolean;
20
- hasUnit?: boolean;
21
- hasLabel?: boolean;
22
- hasSource?: boolean;
16
+ setpoint?: number | undefined;
17
+ hasAdvice?: boolean;
18
+ advice?: number | undefined;
19
+ size?: ReadoutListItemSize | undefined;
20
+ priority?: ReadoutListItemPriority | undefined;
21
+ stacking?: ReadoutListItemStacking | undefined;
22
+ clickable?: boolean | ReadoutListItemClickable;
23
23
  hasLeadingIcon?: boolean;
24
- hasValueIcon?: boolean;
24
+ hasDegree?: boolean;
25
+ hasDegreeSpacer?: boolean;
25
26
  fractionDigits?: number;
26
- showZeroPadding?: boolean;
27
- minValueLength?: number;
28
- hasHintedZeros?: boolean;
29
- labelOnly?: boolean;
27
+ maxDigits?: number;
28
+ dataQuality?: ReadoutListItemDataQuality | undefined;
29
+ alert?: boolean | AlertFrameConfig;
30
+ valueOptions?: ReadoutValueOptions | undefined;
31
+ setpointOptions?: ReadoutSetpointOptions | undefined;
32
+ adviceOptions?: ReadoutAdviceOptions | undefined;
33
+ unitOptions?: ReadoutReserverOptions | undefined;
34
+ srcOptions?: ReadoutSrcOptions | undefined;
30
35
  }
31
36
  export interface Events {
32
37
  }
33
38
  export interface Slots {
34
39
  leadingIcon?: Snippet;
35
40
  valueIcon?: Snippet;
41
+ setpointIcon?: Snippet;
42
+ adviceIcon?: Snippet;
36
43
  }
37
44
  type $$ComponentProps = Props & Events & Slots;
38
45
  declare const ObcReadoutListItem: import("svelte").Component<$$ComponentProps, {
39
46
  ReadoutListItemSize: typeof ReadoutListItemSize;
40
- ReadoutListItemStacking: typeof ReadoutListItemStacking;
41
47
  ReadoutListItemPriority: typeof ReadoutListItemPriority;
42
- ReadoutListItemDataState: typeof ReadoutListItemDataState;
48
+ ReadoutListItemStacking: typeof ReadoutListItemStacking;
49
+ ReadoutListItemClickable: typeof ReadoutListItemClickable;
50
+ ReadoutListItemDataQuality: typeof ReadoutListItemDataQuality;
51
+ ReadoutValueOptions: typeof ReadoutValueOptions;
52
+ ReadoutSetpointOptions: typeof ReadoutSetpointOptions;
53
+ ReadoutAdviceOptions: typeof ReadoutAdviceOptions;
54
+ ReadoutReserverOptions: typeof ReadoutReserverOptions;
55
+ ReadoutSrcOptions: typeof ReadoutSrcOptions;
43
56
  AlertFrameConfig: typeof AlertFrameConfig;
44
57
  }, "">;
45
58
  type ObcReadoutListItem = ReturnType<typeof ObcReadoutListItem>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.83",
3
+ "version": "2.0.0-next.85",
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.82"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.84"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"