@oicl/openbridge-webcomponents-svelte 2.2.0-next.19 → 2.2.0-next.20

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.
@@ -25,7 +25,9 @@
25
25
  /** Specifies the target for the anchor link (only applies when `href` is set). Common values: `_blank`, `_self`, `_parent`, `_top`. */
26
26
  target?: string | undefined;
27
27
  /** Position within a segmented button group: `single` stands alone, `start`, `middle` and `end` shape the button for the first, an inner and the last segment. */
28
- segmentPosition?: segmentPosition
28
+ segmentPosition?: segmentPosition;
29
+ /** Accessible name forwarded to the inner `<button>` or `<a>`, mapped to the `aria-label` attribute. It replaces the slotted text as the name, for a button whose text describes a state rather than the action it takes. Start it with the visible text, so a user who speaks the label they see still reaches the button. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
30
+ ariaLabel?: string | null
29
31
  }
30
32
  export interface Events {
31
33
  onClick?: (event: CustomEvent<unknown>) => void
@@ -21,7 +21,17 @@
21
21
  /** Whether the menu is in the "in command" state. Controls the toggle and visual state. */
22
22
  inCommand?: boolean;
23
23
  /** Whether to display the location slot. If false, the location is omitted from the menu. */
24
- showLocation?: boolean
24
+ showLocation?: boolean;
25
+ /** Disables the toggle, for a menu with nothing to offer: no user signed in, a request already pending, or a user who holds the command and may not release it. The toggle then hides its thumb and shows only the current side's state label. */
26
+ disabled?: boolean;
27
+ /** Shows `actionDescription` as a caption under the toggle. */
28
+ hasActionDescription?: boolean;
29
+ /**
30
+ * Caption under the toggle that says what taking or releasing the command does.
31
+ *
32
+ * Available when `hasActionDescription==true`.
33
+ */
34
+ actionDescription?: string
25
35
  }
26
36
  export interface Events {
27
37
  onChange?: (event: CustomEvent<{inCommand: boolean}>) => void;
@@ -32,13 +42,18 @@
32
42
  commandStatus?: Snippet;
33
43
  commandDescription?: Snippet;
34
44
  commandLocation?: Snippet;
45
+ toggleActionToInCommandLabel?: Snippet;
46
+ toggleActionToNoCommandLabel?: Snippet;
47
+ toggleStateInCommandLabel?: Snippet;
48
+ toggleStateNoCommandLabel?: Snippet;
49
+ toggleStateInCommandIcon?: Snippet;
35
50
  toogleActionToInCommandLabel?: Snippet;
36
51
  toogleActionToNoCommandLabel?: Snippet;
37
52
  toogleStateInCommandLabel?: Snippet;
38
53
  toogleStateNoCommandLabel?: Snippet;
39
54
  toogleStateInCommandIcon?: Snippet
40
55
  }
41
- const {onChange, onClose, class: className, style, commandIcon, commandStatus, commandDescription, commandLocation, toogleActionToInCommandLabel, toogleActionToNoCommandLabel, toogleStateInCommandLabel, toogleStateNoCommandLabel, toogleStateInCommandIcon, ...props} = $props<Props & Events & Slots>();
56
+ const {onChange, onClose, class: className, style, commandIcon, commandStatus, commandDescription, commandLocation, toggleActionToInCommandLabel, toggleActionToNoCommandLabel, toggleStateInCommandLabel, toggleStateNoCommandLabel, toggleStateInCommandIcon, toogleActionToInCommandLabel, toogleActionToNoCommandLabel, toogleStateInCommandLabel, toogleStateNoCommandLabel, toogleStateInCommandIcon, ...props} = $props<Props & Events & Slots>();
42
57
 
43
58
 
44
59
  </script>
@@ -65,6 +80,26 @@
65
80
  <NamedSlot name="command-location" content={commandLocation} />
66
81
  {/if}
67
82
 
83
+ {#if toggleActionToInCommandLabel}
84
+ <NamedSlot name="toggle-action-to-in-command-label" content={toggleActionToInCommandLabel} />
85
+ {/if}
86
+
87
+ {#if toggleActionToNoCommandLabel}
88
+ <NamedSlot name="toggle-action-to-no-command-label" content={toggleActionToNoCommandLabel} />
89
+ {/if}
90
+
91
+ {#if toggleStateInCommandLabel}
92
+ <NamedSlot name="toggle-state-in-command-label" content={toggleStateInCommandLabel} />
93
+ {/if}
94
+
95
+ {#if toggleStateNoCommandLabel}
96
+ <NamedSlot name="toggle-state-no-command-label" content={toggleStateNoCommandLabel} />
97
+ {/if}
98
+
99
+ {#if toggleStateInCommandIcon}
100
+ <NamedSlot name="toggle-state-in-command-icon" content={toggleStateInCommandIcon} />
101
+ {/if}
102
+
68
103
  {#if toogleActionToInCommandLabel}
69
104
  <NamedSlot name="toogle-action-to-in-command-label" content={toogleActionToInCommandLabel} />
70
105
  {/if}
@@ -8,6 +8,11 @@ declare const ObcCommandMenu: import("svelte").Component<{
8
8
  commandStatus: any;
9
9
  commandDescription: any;
10
10
  commandLocation: any;
11
+ toggleActionToInCommandLabel: any;
12
+ toggleActionToNoCommandLabel: any;
13
+ toggleStateInCommandLabel: any;
14
+ toggleStateNoCommandLabel: any;
15
+ toggleStateInCommandIcon: any;
11
16
  toogleActionToInCommandLabel: any;
12
17
  toogleActionToNoCommandLabel: any;
13
18
  toogleStateInCommandLabel: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.2.0-next.19",
3
+ "version": "2.2.0-next.20",
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.2.0-next.19"
37
+ "@oicl/openbridge-webcomponents": "^2.2.0-next.20"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "svelte": "^5.0.0"