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

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.
@@ -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. */
@@ -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;
@@ -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
  }
@@ -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;
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.168",
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.168"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "svelte": "^5.0.0"