@oicl/openbridge-webcomponents-svelte 2.0.0-next.167 → 2.0.0-next.169

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.
Files changed (35) hide show
  1. package/dist/ar/poi-card/ObcPoiCard.svelte +4 -3
  2. package/dist/ar/poi-card/ObcPoiCard.svelte.d.ts +1 -0
  3. package/dist/components/alert-list-details-experimental/ObcAlertListDetailsExperimental.svelte +2 -0
  4. package/dist/components/alert-list-details-experimental/ObcAlertListDetailsExperimental.svelte.d.ts +2 -0
  5. package/dist/components/alert-menu/ObcAlertMenu.svelte +12 -3
  6. package/dist/components/alert-menu/ObcAlertMenu.svelte.d.ts +9 -0
  7. package/dist/components/app-menu/ObcAppMenu.svelte +12 -4
  8. package/dist/components/app-menu/ObcAppMenu.svelte.d.ts +9 -0
  9. package/dist/components/brilliance-menu/ObcBrillianceMenu.svelte +12 -3
  10. package/dist/components/brilliance-menu/ObcBrillianceMenu.svelte.d.ts +9 -0
  11. package/dist/components/calendar/ObcCalendar.svelte +4 -3
  12. package/dist/components/calendar/ObcCalendar.svelte.d.ts +5 -0
  13. package/dist/components/command-menu/ObcCommandMenu.svelte +12 -3
  14. package/dist/components/command-menu/ObcCommandMenu.svelte.d.ts +9 -0
  15. package/dist/components/context-menu-input/ObcContextMenuInput.svelte +8 -0
  16. package/dist/components/context-menu-input/ObcContextMenuInput.svelte.d.ts +8 -0
  17. package/dist/components/date-item/ObcDateItem.svelte +4 -3
  18. package/dist/components/date-item/ObcDateItem.svelte.d.ts +5 -0
  19. package/dist/components/event-list/ObcEventList.svelte +4 -4
  20. package/dist/components/event-list/ObcEventList.svelte.d.ts +5 -0
  21. package/dist/components/icon-button/ObcIconButton.svelte +2 -0
  22. package/dist/components/icon-button/ObcIconButton.svelte.d.ts +2 -0
  23. package/dist/components/navigation-menu/ObcNavigationMenu.svelte +12 -4
  24. package/dist/components/navigation-menu/ObcNavigationMenu.svelte.d.ts +9 -0
  25. package/dist/components/system-menu/ObcSystemMenu.svelte +12 -3
  26. package/dist/components/system-menu/ObcSystemMenu.svelte.d.ts +9 -0
  27. package/dist/components/tab-item/ObcTabItem.svelte +2 -0
  28. package/dist/components/tab-item/ObcTabItem.svelte.d.ts +2 -0
  29. package/dist/components/tab-row/ObcTabRow.svelte +14 -3
  30. package/dist/components/tab-row/ObcTabRow.svelte.d.ts +5 -0
  31. package/dist/components/table/ObcTable.svelte +2 -0
  32. package/dist/components/table/ObcTable.svelte.d.ts +2 -0
  33. package/dist/components/user-menu/ObcUserMenu.svelte +12 -3
  34. package/dist/components/user-menu/ObcUserMenu.svelte.d.ts +9 -0
  35. package/package.json +2 -2
@@ -61,14 +61,15 @@ import type {ObcPoiCardHeaderVariant} from '@oicl/openbridge-webcomponents/dist/
61
61
  hasAlert?: boolean
62
62
  }
63
63
  export interface Events {
64
- onCardClick?: (event: CustomEvent<PoiCardClickDetail>) => void
64
+ onCardClick?: (event: CustomEvent<PoiCardClickDetail>) => void;
65
+ onCloseClick?: (event: CustomEvent<void>) => void
65
66
  }
66
67
  export interface Slots {
67
68
  children?: Snippet;
68
69
  leadingIcon?: Snippet;
69
70
  poiIcon?: Snippet
70
71
  }
71
- const {onCardClick, class: className, style, children, leadingIcon, poiIcon, ...props} = $props<Props & Events & Slots>();
72
+ const {onCardClick, onCloseClick, class: className, style, children, leadingIcon, poiIcon, ...props} = $props<Props & Events & Slots>();
72
73
 
73
74
 
74
75
  </script>
@@ -77,7 +78,7 @@ import type {ObcPoiCardHeaderVariant} from '@oicl/openbridge-webcomponents/dist/
77
78
 
78
79
  class={className}
79
80
  style={style}
80
- use:forwardEvents={{'card-click': onCardClick}} >
81
+ use:forwardEvents={{'card-click': onCardClick, 'close-click': onCloseClick}} >
81
82
 
82
83
  {#if children}
83
84
  {@render children()}
@@ -55,6 +55,7 @@ export interface Props {
55
55
  }
56
56
  export interface Events {
57
57
  onCardClick?: (event: CustomEvent<PoiCardClickDetail>) => void;
58
+ onCloseClick?: (event: CustomEvent<void>) => void;
58
59
  }
59
60
  export interface Slots {
60
61
  children?: Snippet;
@@ -12,6 +12,8 @@ import type {Alert} from '@oicl/openbridge-webcomponents/dist/types.js';
12
12
  export interface Props {
13
13
  class?: string;
14
14
  style?: string;
15
+ /** Accessible name of the list, mapped to the `aria-label` attribute and forwarded to its table. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
16
+ ariaLabel?: string | null;
15
17
  /** Which alerts to list. */
16
18
  filterMode?: FilterModes;
17
19
  /** Alerts to list. */
@@ -5,6 +5,8 @@ import type { Snippet } from 'svelte';
5
5
  export interface Props {
6
6
  class?: string;
7
7
  style?: string;
8
+ /** Accessible name of the list, mapped to the `aria-label` attribute and forwarded to its table. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
9
+ ariaLabel?: string | null;
8
10
  /** Which alerts to list. */
9
11
  filterMode?: FilterModes;
10
12
  /** Alerts to list. */
@@ -10,6 +10,14 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  /** If true, displays the "Shelved" tab and enables shelving support for alerts. Set to false to hide the "Shelved" tab and related filtering. */
14
22
  hasShelved?: boolean;
15
23
  /** If true, enables the "ACK visible" button, allowing users to acknowledge all currently visible alerts in the active tab. Should be set to true only when there are unacknowledged alerts in view. */
@@ -22,7 +30,8 @@
22
30
  export interface Events {
23
31
  onAckAllVisibleClick?: (event: ObcAckAllVisibleClickEvent) => void;
24
32
  onSilenceClick?: (event: CustomEvent) => void;
25
- onGoToAlertListClick?: (event: CustomEvent) => void
33
+ onGoToAlertListClick?: (event: CustomEvent) => void;
34
+ onClose?: (event: CustomEvent<void>) => void
26
35
  }
27
36
  export interface Slots {
28
37
  children?: Snippet;
@@ -30,7 +39,7 @@
30
39
  emptyDescription?: Snippet<[any]>;
31
40
  emptyIcon?: Snippet<[any]>
32
41
  }
33
- const {onAckAllVisibleClick, onSilenceClick, onGoToAlertListClick, class: className, style, children, emptyTitle, emptyDescription, emptyIcon, ...props} = $props<Props & Events & Slots>();
42
+ const {onAckAllVisibleClick, onSilenceClick, onGoToAlertListClick, onClose, class: className, style, children, emptyTitle, emptyDescription, emptyIcon, ...props} = $props<Props & Events & Slots>();
34
43
 
35
44
 
36
45
  </script>
@@ -39,7 +48,7 @@
39
48
 
40
49
  class={className}
41
50
  style={style}
42
- use:forwardEvents={{'ack-all-visible-click': onAckAllVisibleClick, 'silence-click': onSilenceClick, 'go-to-alert-list-click': onGoToAlertListClick}} >
51
+ use:forwardEvents={{'ack-all-visible-click': onAckAllVisibleClick, 'silence-click': onSilenceClick, 'go-to-alert-list-click': onGoToAlertListClick, 'close': onClose}} >
43
52
 
44
53
  {#if children}
45
54
  {@render children()}
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  /** If true, displays the "Shelved" tab and enables shelving support for alerts. Set to false to hide the "Shelved" tab and related filtering. */
8
16
  hasShelved?: boolean;
9
17
  /** If true, enables the "ACK visible" button, allowing users to acknowledge all currently visible alerts in the active tab. Should be set to true only when there are unacknowledged alerts in view. */
@@ -17,6 +25,7 @@ export interface Events {
17
25
  onAckAllVisibleClick?: (event: ObcAckAllVisibleClickEvent) => void;
18
26
  onSilenceClick?: (event: CustomEvent) => void;
19
27
  onGoToAlertListClick?: (event: CustomEvent) => void;
28
+ onClose?: (event: CustomEvent<void>) => void;
20
29
  }
21
30
  export interface Slots {
22
31
  children?: Snippet;
@@ -9,15 +9,23 @@
9
9
  export interface Props {
10
10
  class?: string;
11
11
  style?: string;
12
-
12
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
13
+ softDismiss?: boolean;
14
+ /**
15
+ * Whether the menu is showing.
16
+ *
17
+ * Available when `softDismiss==true`.
18
+ */
19
+ open?: boolean
13
20
  }
14
21
  export interface Events {
15
- onSearch?: (event: CustomEvent<string>) => void
22
+ onSearch?: (event: CustomEvent<string>) => void;
23
+ onClose?: (event: CustomEvent<void>) => void
16
24
  }
17
25
  export interface Slots {
18
26
  children?: Snippet
19
27
  }
20
- const {onSearch, class: className, style, children, ...props} = $props<Props & Events & Slots>();
28
+ const {onSearch, onClose, class: className, style, children, ...props} = $props<Props & Events & Slots>();
21
29
 
22
30
 
23
31
  </script>
@@ -26,7 +34,7 @@
26
34
 
27
35
  class={className}
28
36
  style={style}
29
- use:forwardEvents={{'search': onSearch}} >
37
+ use:forwardEvents={{'search': onSearch, 'close': onClose}} >
30
38
 
31
39
  {#if children}
32
40
  {@render children()}
@@ -3,9 +3,18 @@ import type { Snippet } from 'svelte';
3
3
  export interface Props {
4
4
  class?: string;
5
5
  style?: string;
6
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
7
+ softDismiss?: boolean;
8
+ /**
9
+ * Whether the menu is showing.
10
+ *
11
+ * Available when `softDismiss==true`.
12
+ */
13
+ open?: boolean;
6
14
  }
7
15
  export interface Events {
8
16
  onSearch?: (event: CustomEvent<string>) => void;
17
+ onClose?: (event: CustomEvent<void>) => void;
9
18
  }
10
19
  export interface Slots {
11
20
  children?: Snippet;
@@ -10,6 +10,14 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  /** The currently selected palette. Possible values: `'night'`, `'dusk'`, `'day'`, `'bright'`. Defaults to `'day'`. */
14
22
  palette?: ObcPalette;
15
23
  /** The current brightness value (0–100). Defaults to `50`. */
@@ -48,12 +56,13 @@
48
56
  onBrightnessChanged?: (event: ObcBrightnessChangeEvent) => void;
49
57
  onLinkPaletteChanged?: (event: ObcLinkPaletteChangeEvent) => void;
50
58
  onLinkBrightnessChanged?: (event: ObcLinkBrightnessChangeEvent) => void;
51
- onScreenControlLinkClicked?: (event: CustomEvent) => void
59
+ onScreenControlLinkClicked?: (event: CustomEvent) => void;
60
+ onClose?: (event: CustomEvent<void>) => void
52
61
  }
53
62
  export interface Slots {
54
63
  additionalScreenControls?: Snippet
55
64
  }
56
- const {onPaletteChanged, onBrightnessChanged, onLinkPaletteChanged, onLinkBrightnessChanged, onScreenControlLinkClicked, class: className, style, additionalScreenControls, ...props} = $props<Props & Events & Slots>();
65
+ const {onPaletteChanged, onBrightnessChanged, onLinkPaletteChanged, onLinkBrightnessChanged, onScreenControlLinkClicked, onClose, class: className, style, additionalScreenControls, ...props} = $props<Props & Events & Slots>();
57
66
 
58
67
 
59
68
  </script>
@@ -62,7 +71,7 @@
62
71
 
63
72
  class={className}
64
73
  style={style}
65
- use:forwardEvents={{'palette-changed': onPaletteChanged, 'brightness-changed': onBrightnessChanged, 'link-palette-changed': onLinkPaletteChanged, 'link-brightness-changed': onLinkBrightnessChanged, 'screen-control-link-clicked': onScreenControlLinkClicked}} >
74
+ use:forwardEvents={{'palette-changed': onPaletteChanged, 'brightness-changed': onBrightnessChanged, 'link-palette-changed': onLinkPaletteChanged, 'link-brightness-changed': onLinkBrightnessChanged, 'screen-control-link-clicked': onScreenControlLinkClicked, 'close': onClose}} >
66
75
 
67
76
  {#if additionalScreenControls}
68
77
  <NamedSlot name="additional-screen-controls" content={additionalScreenControls} />
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  /** The currently selected palette. Possible values: `'night'`, `'dusk'`, `'day'`, `'bright'`. Defaults to `'day'`. */
8
16
  palette?: ObcPalette;
9
17
  /** The current brightness value (0–100). Defaults to `50`. */
@@ -43,6 +51,7 @@ export interface Events {
43
51
  onLinkPaletteChanged?: (event: ObcLinkPaletteChangeEvent) => void;
44
52
  onLinkBrightnessChanged?: (event: ObcLinkBrightnessChangeEvent) => void;
45
53
  onScreenControlLinkClicked?: (event: CustomEvent) => void;
54
+ onClose?: (event: CustomEvent<void>) => void;
46
55
  }
47
56
  export interface Slots {
48
57
  additionalScreenControls?: Snippet;
@@ -27,12 +27,13 @@
27
27
  onDateSelect?: (event: CustomEvent<{date: Date, events: CalendarEvent[]}>) => void;
28
28
  onTodayClick?: (event: CustomEvent<void>) => void;
29
29
  onNewEventClick?: (event: CustomEvent<void>) => void;
30
- onCalendarClick?: (event: CustomEvent<void>) => void
30
+ onCalendarClick?: (event: CustomEvent<void>) => void;
31
+ onEventClick?: (event: CustomEvent<{title: string, startTime: string, endTime: string}>) => void
31
32
  }
32
33
  export interface Slots {
33
34
  children?: Snippet
34
35
  }
35
- const {onMonthChange, onDateSelect, onTodayClick, onNewEventClick, onCalendarClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
36
+ const {onMonthChange, onDateSelect, onTodayClick, onNewEventClick, onCalendarClick, onEventClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
36
37
 
37
38
 
38
39
  </script>
@@ -41,7 +42,7 @@
41
42
 
42
43
  class={className}
43
44
  style={style}
44
- use:forwardEvents={{'month-change': onMonthChange, 'date-select': onDateSelect, 'today-click': onTodayClick, 'new-event-click': onNewEventClick, 'calendar-click': onCalendarClick}} >
45
+ use:forwardEvents={{'month-change': onMonthChange, 'date-select': onDateSelect, 'today-click': onTodayClick, 'new-event-click': onNewEventClick, 'calendar-click': onCalendarClick, 'event-click': onEventClick}} >
45
46
 
46
47
  {#if children}
47
48
  {@render children()}
@@ -28,6 +28,11 @@ export interface Events {
28
28
  onTodayClick?: (event: CustomEvent<void>) => void;
29
29
  onNewEventClick?: (event: CustomEvent<void>) => void;
30
30
  onCalendarClick?: (event: CustomEvent<void>) => void;
31
+ onEventClick?: (event: CustomEvent<{
32
+ title: string;
33
+ startTime: string;
34
+ endTime: string;
35
+ }>) => void;
31
36
  }
32
37
  export interface Slots {
33
38
  children?: Snippet;
@@ -10,13 +10,22 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  /** Whether the menu is in the "in command" state. Controls the toggle and visual state. */
14
22
  inCommand?: boolean;
15
23
  /** Whether to display the location slot. If false, the location is omitted from the menu. */
16
24
  showLocation?: boolean
17
25
  }
18
26
  export interface Events {
19
- onChange?: (event: CustomEvent<{inCommand: boolean}>) => void
27
+ onChange?: (event: CustomEvent<{inCommand: boolean}>) => void;
28
+ onClose?: (event: CustomEvent<void>) => void
20
29
  }
21
30
  export interface Slots {
22
31
  commandIcon?: Snippet;
@@ -29,7 +38,7 @@
29
38
  toogleStateNoCommandLabel?: Snippet;
30
39
  toogleStateInCommandIcon?: Snippet
31
40
  }
32
- const {onChange, class: className, style, commandIcon, commandStatus, commandDescription, commandLocation, toogleActionToInCommandLabel, toogleActionToNoCommandLabel, toogleStateInCommandLabel, toogleStateNoCommandLabel, toogleStateInCommandIcon, ...props} = $props<Props & Events & Slots>();
41
+ const {onChange, onClose, class: className, style, commandIcon, commandStatus, commandDescription, commandLocation, toogleActionToInCommandLabel, toogleActionToNoCommandLabel, toogleStateInCommandLabel, toogleStateNoCommandLabel, toogleStateInCommandIcon, ...props} = $props<Props & Events & Slots>();
33
42
 
34
43
 
35
44
  </script>
@@ -38,7 +47,7 @@
38
47
 
39
48
  class={className}
40
49
  style={style}
41
- use:forwardEvents={{'change': onChange}} >
50
+ use:forwardEvents={{'change': onChange, 'close': onClose}} >
42
51
 
43
52
  {#if commandIcon}
44
53
  <NamedSlot name="command-icon" content={commandIcon} />
@@ -3,6 +3,14 @@ import type { Snippet } from 'svelte';
3
3
  export interface Props {
4
4
  class?: string;
5
5
  style?: string;
6
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
7
+ softDismiss?: boolean;
8
+ /**
9
+ * Whether the menu is showing.
10
+ *
11
+ * Available when `softDismiss==true`.
12
+ */
13
+ open?: boolean;
6
14
  /** Whether the menu is in the "in command" state. Controls the toggle and visual state. */
7
15
  inCommand?: boolean;
8
16
  /** Whether to display the location slot. If false, the location is omitted from the menu. */
@@ -12,6 +20,7 @@ export interface Events {
12
20
  onChange?: (event: CustomEvent<{
13
21
  inCommand: boolean;
14
22
  }>) => void;
23
+ onClose?: (event: CustomEvent<void>) => void;
15
24
  }
16
25
  export interface Slots {
17
26
  commandIcon?: Snippet;
@@ -9,6 +9,14 @@
9
9
  export interface Props {
10
10
  class?: string;
11
11
  style?: string;
12
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
13
+ softDismiss?: boolean;
14
+ /**
15
+ * Whether the menu is showing.
16
+ *
17
+ * Available when `softDismiss==true`.
18
+ */
19
+ open?: boolean;
12
20
  /** Menu variant: `regular` (default) is a single-select navigation menu, `checkboxes` and `nested-checkboxes` are flat and hierarchical multi-select, `flyout` has expandable cascading groups, and `multi` and `multi-with-subtitles` lay the menu out in columns, the latter with group subtitles. */
13
21
  type?: ContextMenuType;
14
22
  /** Menu options, each with a unique `value` and a `label`, and optionally an `icon` template for the leading icon, a `level` giving the nesting depth for nested checkboxes, and `children` for a flyout or nested menu. */
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  /** Menu variant: `regular` (default) is a single-select navigation menu, `checkboxes` and `nested-checkboxes` are flat and hierarchical multi-select, `flyout` has expandable cascading groups, and `multi` and `multi-with-subtitles` lay the menu out in columns, the latter with group subtitles. */
8
16
  type?: ContextMenuType;
9
17
  /** Menu options, each with a unique `value` and a `label`, and optionally an `icon` template for the leading icon, a `level` giving the nesting depth for nested checkboxes, and `children` for a flyout or nested menu. */
@@ -27,12 +27,13 @@ import type {DateItemSize} from '@oicl/openbridge-webcomponents/dist/components/
27
27
  date?: number
28
28
  }
29
29
  export interface Events {
30
- onDateClick?: (event: CustomEvent<{date: number, events: DateItemEvent[], isToday: boolean, checked: boolean}>) => void
30
+ onDateClick?: (event: CustomEvent<{date: number, events: DateItemEvent[], isToday: boolean, checked: boolean}>) => void;
31
+ onEventClick?: (event: CustomEvent<{title: string, startTime: string, endTime: string}>) => void
31
32
  }
32
33
  export interface Slots {
33
34
  children?: Snippet
34
35
  }
35
- const {onDateClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
36
+ const {onDateClick, onEventClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
36
37
 
37
38
 
38
39
  </script>
@@ -41,7 +42,7 @@ date?: number
41
42
 
42
43
  class={className}
43
44
  style={style}
44
- use:forwardEvents={{'date-click': onDateClick}} >
45
+ use:forwardEvents={{'date-click': onDateClick, 'event-click': onEventClick}} >
45
46
 
46
47
  {#if children}
47
48
  {@render children()}
@@ -27,6 +27,11 @@ export interface Events {
27
27
  isToday: boolean;
28
28
  checked: boolean;
29
29
  }>) => void;
30
+ onEventClick?: (event: CustomEvent<{
31
+ title: string;
32
+ startTime: string;
33
+ endTime: string;
34
+ }>) => void;
30
35
  }
31
36
  export interface Slots {
32
37
  children?: Snippet;
@@ -2,7 +2,7 @@
2
2
  <script lang="ts">
3
3
  export type {DateItemEvent} from '@oicl/openbridge-webcomponents/dist/components/event-item/event-item.js';
4
4
  import '@oicl/openbridge-webcomponents/dist/components/event-list/event-list.js';
5
- import { setProperties } from "../../util.js";
5
+ import { setProperties, forwardEvents } from "../../util.js";
6
6
  import type {DateItemEvent} from '@oicl/openbridge-webcomponents/dist/components/event-item/event-item.js';
7
7
  import type { Snippet } from 'svelte';
8
8
 
@@ -19,12 +19,12 @@
19
19
  locale?: string | undefined
20
20
  }
21
21
  export interface Events {
22
-
22
+ onEventClick?: (event: CustomEvent<{title: string, startTime: string, endTime: string}>) => void
23
23
  }
24
24
  export interface Slots {
25
25
  children?: Snippet
26
26
  }
27
- const { class: className, style, children, ...props} = $props<Props & Events & Slots>();
27
+ const {onEventClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
28
28
 
29
29
 
30
30
  </script>
@@ -33,7 +33,7 @@
33
33
 
34
34
  class={className}
35
35
  style={style}
36
- >
36
+ use:forwardEvents={{'event-click': onEventClick}} >
37
37
 
38
38
  {#if children}
39
39
  {@render children()}
@@ -14,6 +14,11 @@ export interface Props {
14
14
  locale?: string | undefined;
15
15
  }
16
16
  export interface Events {
17
+ onEventClick?: (event: CustomEvent<{
18
+ title: string;
19
+ startTime: string;
20
+ endTime: string;
21
+ }>) => void;
17
22
  }
18
23
  export interface Slots {
19
24
  children?: Snippet;
@@ -30,6 +30,8 @@
30
30
  hasLabel?: boolean;
31
31
  /** If false, and cornerLeft or cornerRight is true, the divider is not shown. */
32
32
  showDivider?: boolean;
33
+ /** Whether the button is in the tab sequence. Turn it off for a button inside a composite widget that owns the tab stop, and give the widget a key for the action. */
34
+ focusable?: boolean;
33
35
  /** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
34
36
  ariaLabel?: string | null
35
37
  }
@@ -24,6 +24,8 @@ export interface Props {
24
24
  hasLabel?: boolean;
25
25
  /** If false, and cornerLeft or cornerRight is true, the divider is not shown. */
26
26
  showDivider?: boolean;
27
+ /** Whether the button is in the tab sequence. Turn it off for a button inside a composite widget that owns the tab stop, and give the widget a key for the action. */
28
+ focusable?: boolean;
27
29
  /** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
28
30
  ariaLabel?: string | null;
29
31
  }
@@ -2,7 +2,7 @@
2
2
  <script lang="ts">
3
3
  export type {ObcNavigationMenuVariant, ObcNavigationMenuFlyoutVariant} from '@oicl/openbridge-webcomponents/dist/components/navigation-menu/navigation-menu.js';
4
4
  import '@oicl/openbridge-webcomponents/dist/components/navigation-menu/navigation-menu.js';
5
- import { setProperties } from "../../util.js";
5
+ import { setProperties, forwardEvents } from "../../util.js";
6
6
  import NamedSlot from "../../NamedSlot.svelte";
7
7
  import type {ObcNavigationMenuVariant, ObcNavigationMenuFlyoutVariant} from '@oicl/openbridge-webcomponents/dist/components/navigation-menu/navigation-menu.js';
8
8
  import type { Snippet } from 'svelte';
@@ -10,6 +10,14 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  /** Visual style and layout: `full` (default) shows icons and labels, `icon-only` is the compact icon-only menu and takes no flyouts or groups, `icon-only-large` is the icon-only menu that does, `compact` is the space-saving menu, and `tree` expands groups inline and indents rows by depth. */
14
22
  variant?: ObcNavigationMenuVariant;
15
23
  /**
@@ -22,14 +30,14 @@
22
30
  smallScreen?: boolean
23
31
  }
24
32
  export interface Events {
25
-
33
+ onClose?: (event: CustomEvent<void>) => void
26
34
  }
27
35
  export interface Slots {
28
36
  main?: Snippet;
29
37
  footer?: Snippet;
30
38
  logo?: Snippet
31
39
  }
32
- const { class: className, style, main, footer, logo, ...props} = $props<Props & Events & Slots>();
40
+ const {onClose, class: className, style, main, footer, logo, ...props} = $props<Props & Events & Slots>();
33
41
 
34
42
 
35
43
  </script>
@@ -38,7 +46,7 @@
38
46
 
39
47
  class={className}
40
48
  style={style}
41
- >
49
+ use:forwardEvents={{'close': onClose}} >
42
50
 
43
51
  {#if main}
44
52
  <NamedSlot name="main" content={main} />
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  /** Visual style and layout: `full` (default) shows icons and labels, `icon-only` is the compact icon-only menu and takes no flyouts or groups, `icon-only-large` is the icon-only menu that does, `compact` is the space-saving menu, and `tree` expands groups inline and indents rows by depth. */
8
16
  variant?: ObcNavigationMenuVariant;
9
17
  /**
@@ -16,6 +24,7 @@ export interface Props {
16
24
  smallScreen?: boolean;
17
25
  }
18
26
  export interface Events {
27
+ onClose?: (event: CustomEvent<void>) => void;
19
28
  }
20
29
  export interface Slots {
21
30
  main?: Snippet;
@@ -10,6 +10,14 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  wifiState?: WifiState | undefined;
14
22
  audioState?: AudioState | undefined;
15
23
  microphoneState?: MicrophoneState | undefined;
@@ -35,12 +43,13 @@
35
43
  onSettingsClick?: (event: CustomEvent<unknown>) => void;
36
44
  onToSubMenuClick?: (event: CustomEvent<unknown>) => void;
37
45
  onWifiOptionsClick?: (event: CustomEvent<unknown>) => void;
38
- onWifiDisconnectClick?: (event: CustomEvent<unknown>) => void
46
+ onWifiDisconnectClick?: (event: CustomEvent<unknown>) => void;
47
+ onClose?: (event: CustomEvent<void>) => void
39
48
  }
40
49
  export interface Slots {
41
50
  batteryStatus?: Snippet
42
51
  }
43
- const {onWifiClick, onAudioClick, onAudioVolumeChange, onMicrophoneClick, onPushToTalkChange, onBatteryUsageClick, onBatterySavingModeChange, onBatteryModeChange, onWifiNetworkChange, onAudioOutputChange, onMicrophoneInputChange, onSettingsClick, onToSubMenuClick, onWifiOptionsClick, onWifiDisconnectClick, class: className, style, batteryStatus, ...props} = $props<Props & Events & Slots>();
52
+ const {onWifiClick, onAudioClick, onAudioVolumeChange, onMicrophoneClick, onPushToTalkChange, onBatteryUsageClick, onBatterySavingModeChange, onBatteryModeChange, onWifiNetworkChange, onAudioOutputChange, onMicrophoneInputChange, onSettingsClick, onToSubMenuClick, onWifiOptionsClick, onWifiDisconnectClick, onClose, class: className, style, batteryStatus, ...props} = $props<Props & Events & Slots>();
44
53
 
45
54
 
46
55
  </script>
@@ -49,7 +58,7 @@
49
58
 
50
59
  class={className}
51
60
  style={style}
52
- use:forwardEvents={{'wifi-click': onWifiClick, 'audio-click': onAudioClick, 'audio-volume-change': onAudioVolumeChange, 'microphone-click': onMicrophoneClick, 'push-to-talk-change': onPushToTalkChange, 'battery-usage-click': onBatteryUsageClick, 'battery-saving-mode-change': onBatterySavingModeChange, 'battery-mode-change': onBatteryModeChange, 'wifi-network-change': onWifiNetworkChange, 'audio-output-change': onAudioOutputChange, 'microphone-input-change': onMicrophoneInputChange, 'settings-click': onSettingsClick, 'to-sub-menu-click': onToSubMenuClick, 'wifi-options-click': onWifiOptionsClick, 'wifi-disconnect-click': onWifiDisconnectClick}} >
61
+ use:forwardEvents={{'wifi-click': onWifiClick, 'audio-click': onAudioClick, 'audio-volume-change': onAudioVolumeChange, 'microphone-click': onMicrophoneClick, 'push-to-talk-change': onPushToTalkChange, 'battery-usage-click': onBatteryUsageClick, 'battery-saving-mode-change': onBatterySavingModeChange, 'battery-mode-change': onBatteryModeChange, 'wifi-network-change': onWifiNetworkChange, 'audio-output-change': onAudioOutputChange, 'microphone-input-change': onMicrophoneInputChange, 'settings-click': onSettingsClick, 'to-sub-menu-click': onToSubMenuClick, 'wifi-options-click': onWifiOptionsClick, 'wifi-disconnect-click': onWifiDisconnectClick, 'close': onClose}} >
53
62
 
54
63
  {#if batteryStatus}
55
64
  <NamedSlot name="battery-status" content={batteryStatus} />
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  wifiState?: WifiState | undefined;
8
16
  audioState?: AudioState | undefined;
9
17
  microphoneState?: MicrophoneState | undefined;
@@ -30,6 +38,7 @@ export interface Events {
30
38
  onToSubMenuClick?: (event: CustomEvent<unknown>) => void;
31
39
  onWifiOptionsClick?: (event: CustomEvent<unknown>) => void;
32
40
  onWifiDisconnectClick?: (event: CustomEvent<unknown>) => void;
41
+ onClose?: (event: CustomEvent<void>) => void;
33
42
  }
34
43
  export interface Slots {
35
44
  batteryStatus?: Snippet;
@@ -43,6 +43,8 @@
43
43
  disabled?: boolean;
44
44
  /** Whether the tab is in the tab order. `obc-tab-row` manages this as a roving tabindex (one tab focusable at a time); a standalone tab stays tabbable. */
45
45
  focusable?: boolean;
46
+ /** The panel this tab shows, announced as the tab's `aria-controls`. `obc-tab-row` sets it when it renders panels; the panel has to live in this tab's tree or one it sits inside. */
47
+ panel?: Element | null;
46
48
  /** Available when `hasBadge==true`. */
47
49
  badgeType?: string;
48
50
  /** Available when `hasBadge==true`. */
@@ -37,6 +37,8 @@ export interface Props {
37
37
  disabled?: boolean;
38
38
  /** Whether the tab is in the tab order. `obc-tab-row` manages this as a roving tabindex (one tab focusable at a time); a standalone tab stays tabbable. */
39
39
  focusable?: boolean;
40
+ /** The panel this tab shows, announced as the tab's `aria-controls`. `obc-tab-row` sets it when it renders panels; the panel has to live in this tab's tree or one it sits inside. */
41
+ panel?: Element | null;
40
42
  /** Available when `hasBadge==true`. */
41
43
  badgeType?: string;
42
44
  /** Available when `hasBadge==true`. */
@@ -22,7 +22,11 @@
22
22
  /** Whether to display subtitle text for each tab. Individual tabs can override this with `tab.showSubtitle`. */
23
23
  showSubtitle?: boolean;
24
24
  /** Whether to display an "add new tab" button at the end of the tab row. When clicked, emits the `add-new-tab` event. */
25
- hasAddNewTab?: boolean
25
+ hasAddNewTab?: boolean;
26
+ /** Renders one panel per tab from its `tab-<id>-panel` slot, shows the selected one, and links each tab to its panel for assistive technology. */
27
+ hasPanels?: boolean;
28
+ /** Accessible name of the tab list, read out before its tabs. */
29
+ label?: string
26
30
  }
27
31
  export interface Events {
28
32
  onTabSelected?: (event: CustomEvent<{tab: TabData, id: string, index: number}>) => void;
@@ -31,9 +35,10 @@
31
35
  }
32
36
  export interface Slots {
33
37
  tabIcon?: Snippet<[any]>;
34
- tab?: Snippet<[any]>
38
+ tab?: Snippet<[any]>;
39
+ tabPanel?: Snippet<[any]>
35
40
  }
36
- const {onTabSelected, onTabClosed, onAddNewTab, class: className, style, tabIcon, tab, ...props} = $props<Props & Events & Slots>();
41
+ const {onTabSelected, onTabClosed, onAddNewTab, class: className, style, tabIcon, tab, tabPanel, ...props} = $props<Props & Events & Slots>();
37
42
 
38
43
 
39
44
  </script>
@@ -55,4 +60,10 @@
55
60
  <NamedSlot name="tab-{item.id}-<iconSlotName>" content={tab} arg={item} />
56
61
  {/each}
57
62
  {/if}
63
+
64
+ {#if props.tabs && tabPanel}
65
+ {#each props.tabs as item}
66
+ <NamedSlot name="tab-{item.id}-panel" content={tabPanel} arg={item} />
67
+ {/each}
68
+ {/if}
58
69
  </obc-tab-row>
@@ -17,6 +17,10 @@ export interface Props {
17
17
  showSubtitle?: boolean;
18
18
  /** Whether to display an "add new tab" button at the end of the tab row. When clicked, emits the `add-new-tab` event. */
19
19
  hasAddNewTab?: boolean;
20
+ /** Renders one panel per tab from its `tab-<id>-panel` slot, shows the selected one, and links each tab to its panel for assistive technology. */
21
+ hasPanels?: boolean;
22
+ /** Accessible name of the tab list, read out before its tabs. */
23
+ label?: string;
20
24
  }
21
25
  export interface Events {
22
26
  onTabSelected?: (event: CustomEvent<{
@@ -34,6 +38,7 @@ export interface Events {
34
38
  export interface Slots {
35
39
  tabIcon?: Snippet<[any]>;
36
40
  tab?: Snippet<[any]>;
41
+ tabPanel?: Snippet<[any]>;
37
42
  }
38
43
  type $$ComponentProps = Props & Events & Slots;
39
44
  declare const ObcTabRow: import("svelte").Component<$$ComponentProps, {
@@ -9,6 +9,8 @@
9
9
  export interface Props {
10
10
  class?: string;
11
11
  style?: string;
12
+ /** Accessible name of the table, mapped to the `aria-label` attribute and forwarded to the grid. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
13
+ ariaLabel?: string | null;
12
14
  data?: ObcTableRow[];
13
15
  columns?: ObcTableColumn<ObcTableCellData, ObcTableRow>[];
14
16
  rowDivider?: boolean;
@@ -4,6 +4,8 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Accessible name of the table, mapped to the `aria-label` attribute and forwarded to the grid. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
8
+ ariaLabel?: string | null;
7
9
  data?: ObcTableRow[];
8
10
  columns?: ObcTableColumn<ObcTableCellData, ObcTableRow>[];
9
11
  rowDivider?: boolean;
@@ -10,6 +10,14 @@
10
10
  export interface Props {
11
11
  class?: string;
12
12
  style?: string;
13
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
14
+ softDismiss?: boolean;
15
+ /**
16
+ * Whether the menu is showing.
17
+ *
18
+ * Available when `softDismiss==true`.
19
+ */
20
+ open?: boolean;
13
21
  /** Controls the visual layout of the user menu. */
14
22
  type?: ObcUserMenuType;
15
23
  /** Controls the overall size of the user menu. */
@@ -100,12 +108,13 @@
100
108
  onSignOutClick?: (event: CustomEvent<void>) => void;
101
109
  onUseAnotherAccountClick?: (event: CustomEvent<void>) => void;
102
110
  onSignedInActionClick?: (event: CustomEvent<{id: string, label: string}>) => void;
103
- onRecentUserClick?: (event: ObcUserMenuRecentUserClickEvent) => void
111
+ onRecentUserClick?: (event: ObcUserMenuRecentUserClickEvent) => void;
112
+ onClose?: (event: CustomEvent<void>) => void
104
113
  }
105
114
  export interface Slots {
106
115
  signedInActionIcon?: Snippet<[any]>
107
116
  }
108
- const {onSignInClick, onSignOutClick, onUseAnotherAccountClick, onSignedInActionClick, onRecentUserClick, class: className, style, signedInActionIcon, ...props} = $props<Props & Events & Slots>();
117
+ const {onSignInClick, onSignOutClick, onUseAnotherAccountClick, onSignedInActionClick, onRecentUserClick, onClose, class: className, style, signedInActionIcon, ...props} = $props<Props & Events & Slots>();
109
118
 
110
119
 
111
120
  </script>
@@ -114,7 +123,7 @@
114
123
 
115
124
  class={className}
116
125
  style={style}
117
- use:forwardEvents={{'sign-in-click': onSignInClick, 'sign-out-click': onSignOutClick, 'use-another-account-click': onUseAnotherAccountClick, 'signed-in-action-click': onSignedInActionClick, 'recent-user-click': onRecentUserClick}} >
126
+ use:forwardEvents={{'sign-in-click': onSignInClick, 'sign-out-click': onSignOutClick, 'use-another-account-click': onUseAnotherAccountClick, 'signed-in-action-click': onSignedInActionClick, 'recent-user-click': onRecentUserClick, 'close': onClose}} >
118
127
 
119
128
  {#if signedInActionIcon}
120
129
  <NamedSlot name="signed-in-action-icon-<id>" content={signedInActionIcon} />
@@ -4,6 +4,14 @@ import type { Snippet } from 'svelte';
4
4
  export interface Props {
5
5
  class?: string;
6
6
  style?: string;
7
+ /** Let the browser close this menu on its own: on a click outside it, on `Escape`, or when another menu opens. Leave it off to keep showing and hiding the menu yourself. */
8
+ softDismiss?: boolean;
9
+ /**
10
+ * Whether the menu is showing.
11
+ *
12
+ * Available when `softDismiss==true`.
13
+ */
14
+ open?: boolean;
7
15
  /** Controls the visual layout of the user menu. */
8
16
  type?: ObcUserMenuType;
9
17
  /** Controls the overall size of the user menu. */
@@ -101,6 +109,7 @@ export interface Events {
101
109
  label: string;
102
110
  }>) => void;
103
111
  onRecentUserClick?: (event: ObcUserMenuRecentUserClickEvent) => void;
112
+ onClose?: (event: CustomEvent<void>) => void;
104
113
  }
105
114
  export interface Slots {
106
115
  signedInActionIcon?: Snippet<[any]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.167",
3
+ "version": "2.0.0-next.169",
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.0.0-next.167"
37
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.169"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "svelte": "^5.0.0"