@oicl/openbridge-webcomponents-svelte 2.0.0-next.70 → 2.0.0-next.72

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,10 +1,10 @@
1
1
 
2
2
  <script lang="ts">
3
- export type {ObcAlertMenuItemStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
3
+ export type {ObcAlertMenuItemStatus, ObcAlertMenuItemActionState} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
4
4
  export type {ObcMessageMenuItemSize} from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
5
5
  import '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
6
6
  import { setProperties } from "../../util.js";
7
- import type {ObcAlertMenuItemStatus} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
7
+ import type {ObcAlertMenuItemStatus, ObcAlertMenuItemActionState} from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
8
8
  import type {ObcMessageMenuItemSize} from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
9
9
  import type { Snippet } from 'svelte';
10
10
 
@@ -39,17 +39,28 @@ Possible values: 'single-line', 'multi-line'.
39
39
  Default is 'single-line'. */
40
40
  size?: ObcMessageMenuItemSize;
41
41
  /** Whether to animate the item's appearance (intro animation). */
42
- animateIntro?: boolean
42
+ animateIntro?: boolean;
43
+ /** The label for the secondary action button.
44
+ Unlike the primary (ACK) action, the secondary label is not derived from
45
+ `status`; it must be provided explicitly. The secondary action is only
46
+ shown when a non-empty label is set and `secondaryActionState` is not
47
+ `none`. */
48
+ secondaryActionLabel?: string;
49
+ /** [object Object],[object Object],[object Object] */
50
+ primaryActionState?: ObcAlertMenuItemActionState;
51
+ /** [object Object],[object Object],[object Object] */
52
+ secondaryActionState?: ObcAlertMenuItemActionState
43
53
  }
44
54
  export interface Events {
45
55
  onAckClick?: (event: CustomEvent<void>) => void;
56
+ onAckSecondaryClick?: (event: CustomEvent<void>) => void;
46
57
  onItemClick?: (event: CustomEvent<void>) => void
47
58
  }
48
59
  export interface Slots {
49
60
  alertIcon?: Snippet;
50
61
  icon?: Snippet
51
62
  }
52
- const {onAckClick, onItemClick, class: className, style, alertIcon, icon, ...props} = $props<Props & Events & Slots>();
63
+ const {onAckClick, onAckSecondaryClick, onItemClick, class: className, style, alertIcon, icon, ...props} = $props<Props & Events & Slots>();
53
64
 
54
65
  </script>
55
66
  <obc-alert-menu-item
@@ -57,6 +68,7 @@ animateIntro?: boolean
57
68
  class={className}
58
69
  style={style}
59
70
  onack-click={onAckClick}
71
+ onack-secondary-click={onAckSecondaryClick}
60
72
  onitem-click={onItemClick} >
61
73
 
62
74
  {#if alertIcon}
@@ -1,5 +1,5 @@
1
1
  import '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
2
- import type { ObcAlertMenuItemStatus } from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
2
+ import type { ObcAlertMenuItemStatus, ObcAlertMenuItemActionState } from '@oicl/openbridge-webcomponents/dist/components/alert-menu-item/alert-menu-item.js';
3
3
  import type { ObcMessageMenuItemSize } from '@oicl/openbridge-webcomponents/dist/components/message-menu-item/message-menu-item.js';
4
4
  import type { Snippet } from 'svelte';
5
5
  export interface Props {
@@ -34,9 +34,20 @@ Default is 'single-line'. */
34
34
  size?: ObcMessageMenuItemSize;
35
35
  /** Whether to animate the item's appearance (intro animation). */
36
36
  animateIntro?: boolean;
37
+ /** The label for the secondary action button.
38
+ Unlike the primary (ACK) action, the secondary label is not derived from
39
+ `status`; it must be provided explicitly. The secondary action is only
40
+ shown when a non-empty label is set and `secondaryActionState` is not
41
+ `none`. */
42
+ secondaryActionLabel?: string;
43
+ /** [object Object],[object Object],[object Object] */
44
+ primaryActionState?: ObcAlertMenuItemActionState;
45
+ /** [object Object],[object Object],[object Object] */
46
+ secondaryActionState?: ObcAlertMenuItemActionState;
37
47
  }
38
48
  export interface Events {
39
49
  onAckClick?: (event: CustomEvent<void>) => void;
50
+ onAckSecondaryClick?: (event: CustomEvent<void>) => void;
40
51
  onItemClick?: (event: CustomEvent<void>) => void;
41
52
  }
42
53
  export interface Slots {
@@ -46,6 +57,7 @@ export interface Slots {
46
57
  type $$ComponentProps = Props & Events & Slots;
47
58
  declare const ObcAlertMenuItem: import("svelte").Component<$$ComponentProps, {
48
59
  ObcAlertMenuItemStatus: typeof ObcAlertMenuItemStatus;
60
+ ObcAlertMenuItemActionState: typeof ObcAlertMenuItemActionState;
49
61
  ObcMessageMenuItemSize: typeof ObcMessageMenuItemSize;
50
62
  }, "">;
51
63
  type ObcAlertMenuItem = ReturnType<typeof ObcAlertMenuItem>;
@@ -19,6 +19,8 @@
19
19
  time?: string;
20
20
  primaryActionLabel?: string;
21
21
  secondaryActionLabel?: string;
22
+ enablePrimaryAction?: boolean;
23
+ enableSecondaryAction?: boolean;
22
24
  hasPrimaryIcon?: boolean;
23
25
  hasSecondaryIcon?: boolean;
24
26
  hasTrailingIcon?: boolean;
@@ -14,6 +14,8 @@ export interface Props {
14
14
  time?: string;
15
15
  primaryActionLabel?: string;
16
16
  secondaryActionLabel?: string;
17
+ enablePrimaryAction?: boolean;
18
+ enableSecondaryAction?: boolean;
17
19
  hasPrimaryIcon?: boolean;
18
20
  hasSecondaryIcon?: boolean;
19
21
  hasTrailingIcon?: boolean;
@@ -0,0 +1,41 @@
1
+
2
+ <script lang="ts">
3
+ export type {ObcTextboxAlignment, ObcTextboxSize, ObcTextboxFontWeight} from '@oicl/openbridge-webcomponents/dist/components/textbox/textbox.js';
4
+ import '@oicl/openbridge-webcomponents/dist/components/textbox/textbox.js';
5
+ import { setProperties } from "../../util.js";
6
+ import type {ObcTextboxAlignment, ObcTextboxSize, ObcTextboxFontWeight} from '@oicl/openbridge-webcomponents/dist/components/textbox/textbox.js';
7
+ import type { Snippet } from 'svelte';
8
+
9
+ export interface Props {
10
+ class?: string;
11
+ style?: string;
12
+ alignment?: ObcTextboxAlignment;
13
+ size?: ObcTextboxSize;
14
+ fontWeight?: ObcTextboxFontWeight
15
+ }
16
+ export interface Events {
17
+
18
+ }
19
+ export interface Slots {
20
+ children?: Snippet;
21
+ length?: Snippet
22
+ }
23
+ const { class: className, style, children, length, ...props} = $props<Props & Events & Slots>();
24
+
25
+ </script>
26
+ <obc-textbox
27
+ use:setProperties={props}
28
+ class={className}
29
+ style={style}
30
+ >
31
+
32
+ {#if children}
33
+ {@render children()}
34
+ {/if}
35
+
36
+ {#if length}
37
+ <div slot="length">
38
+ {@render length()}
39
+ </div>
40
+ {/if}
41
+ </obc-textbox>
@@ -0,0 +1,24 @@
1
+ import '@oicl/openbridge-webcomponents/dist/components/textbox/textbox.js';
2
+ import type { ObcTextboxAlignment, ObcTextboxSize, ObcTextboxFontWeight } from '@oicl/openbridge-webcomponents/dist/components/textbox/textbox.js';
3
+ import type { Snippet } from 'svelte';
4
+ export interface Props {
5
+ class?: string;
6
+ style?: string;
7
+ alignment?: ObcTextboxAlignment;
8
+ size?: ObcTextboxSize;
9
+ fontWeight?: ObcTextboxFontWeight;
10
+ }
11
+ export interface Events {
12
+ }
13
+ export interface Slots {
14
+ children?: Snippet;
15
+ length?: Snippet;
16
+ }
17
+ type $$ComponentProps = Props & Events & Slots;
18
+ declare const ObcTextbox: import("svelte").Component<$$ComponentProps, {
19
+ ObcTextboxAlignment: typeof ObcTextboxAlignment;
20
+ ObcTextboxSize: typeof ObcTextboxSize;
21
+ ObcTextboxFontWeight: typeof ObcTextboxFontWeight;
22
+ }, "">;
23
+ type ObcTextbox = ReturnType<typeof ObcTextbox>;
24
+ export default ObcTextbox;
package/dist/index.d.ts CHANGED
@@ -176,6 +176,7 @@ export { default as ObcTableHeaderItem } from './components/table-header-item/Ob
176
176
  export { default as ObcTag } from './components/tag/ObcTag.svelte';
177
177
  export { default as ObcTextInputField } from './components/text-input-field/ObcTextInputField.svelte';
178
178
  export { default as ObcTextareaField } from './components/textarea-field/ObcTextareaField.svelte';
179
+ export { default as ObcTextbox } from './components/textbox/ObcTextbox.svelte';
179
180
  export { default as ObcTitleContainer } from './components/title-container/ObcTitleContainer.svelte';
180
181
  export { default as ObcToggleButtonGroup } from './components/toggle-button-group/ObcToggleButtonGroup.svelte';
181
182
  export { default as ObcToggleButtonOption } from './components/toggle-button-option/ObcToggleButtonOption.svelte';
package/dist/index.js CHANGED
@@ -176,6 +176,7 @@ export { default as ObcTableHeaderItem } from './components/table-header-item/Ob
176
176
  export { default as ObcTag } from './components/tag/ObcTag.svelte';
177
177
  export { default as ObcTextInputField } from './components/text-input-field/ObcTextInputField.svelte';
178
178
  export { default as ObcTextareaField } from './components/textarea-field/ObcTextareaField.svelte';
179
+ export { default as ObcTextbox } from './components/textbox/ObcTextbox.svelte';
179
180
  export { default as ObcTitleContainer } from './components/title-container/ObcTitleContainer.svelte';
180
181
  export { default as ObcToggleButtonGroup } from './components/toggle-button-group/ObcToggleButtonGroup.svelte';
181
182
  export { default as ObcToggleButtonOption } from './components/toggle-button-option/ObcToggleButtonOption.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.70",
3
+ "version": "2.0.0-next.72",
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.69"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.71"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"