@oicl/openbridge-webcomponents-svelte 2.1.0 → 2.2.0-next.1

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.
@@ -46,8 +46,22 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
46
46
  fullWidth?: boolean;
47
47
  /** Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons. */
48
48
  disabled?: boolean;
49
+ /**
50
+ * Disables the primary button alone, for an action the user cannot take right now while the menu stays in use, for example to ask for the access the action needs.
51
+ *
52
+ * Available when `disabled==false`.
53
+ */
54
+ primaryDisabled?: boolean;
55
+ /**
56
+ * Disables the dropdown button alone, leaving the primary action.
57
+ *
58
+ * Available when `disabled==false`.
59
+ */
60
+ dropdownDisabled?: boolean;
49
61
  /** Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport. */
50
62
  openTop?: boolean;
63
+ /** Extend the menu to the left of the dropdown button (`true`), its right edge on the button's right edge, instead of to the right. For a button near the right edge of its container; combines with `openTop`. */
64
+ openLeft?: boolean;
51
65
  /**
52
66
  * Array of column group definitions for multi-column/grouped menus. Use instead of `options` for grouped or subtitle layouts.
53
67
  *
@@ -60,9 +74,10 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
60
74
  onChange?: (event: ObcSplitButtonChangeEvent) => void
61
75
  }
62
76
  export interface Slots {
63
- icon?: Snippet
77
+ icon?: Snippet;
78
+ dropdownIcon?: Snippet
64
79
  }
65
- const {onClick, onChange, class: className, style, icon, ...props} = $props<Props & Events & Slots>();
80
+ const {onClick, onChange, class: className, style, icon, dropdownIcon, ...props} = $props<Props & Events & Slots>();
66
81
 
67
82
 
68
83
  </script>
@@ -76,4 +91,8 @@ import type {ContextMenuOption, ContextMenuType, ColumnGroup} from '@oicl/openbr
76
91
  {#if icon}
77
92
  <NamedSlot name="icon" content={icon} />
78
93
  {/if}
94
+
95
+ {#if dropdownIcon}
96
+ <NamedSlot name="dropdown-icon" content={dropdownIcon} />
97
+ {/if}
79
98
  </obc-split-button>
@@ -39,8 +39,22 @@ export interface Props {
39
39
  fullWidth?: boolean;
40
40
  /** Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons. */
41
41
  disabled?: boolean;
42
+ /**
43
+ * Disables the primary button alone, for an action the user cannot take right now while the menu stays in use, for example to ask for the access the action needs.
44
+ *
45
+ * Available when `disabled==false`.
46
+ */
47
+ primaryDisabled?: boolean;
48
+ /**
49
+ * Disables the dropdown button alone, leaving the primary action.
50
+ *
51
+ * Available when `disabled==false`.
52
+ */
53
+ dropdownDisabled?: boolean;
42
54
  /** Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport. */
43
55
  openTop?: boolean;
56
+ /** Extend the menu to the left of the dropdown button (`true`), its right edge on the button's right edge, instead of to the right. For a button near the right edge of its container; combines with `openTop`. */
57
+ openLeft?: boolean;
44
58
  /**
45
59
  * Array of column group definitions for multi-column/grouped menus. Use instead of `options` for grouped or subtitle layouts.
46
60
  *
@@ -54,6 +68,7 @@ export interface Events {
54
68
  }
55
69
  export interface Slots {
56
70
  icon?: Snippet;
71
+ dropdownIcon?: Snippet;
57
72
  }
58
73
  type $$ComponentProps = Props & Events & Slots;
59
74
  declare const ObcSplitButton: import("svelte").Component<$$ComponentProps, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.1.0",
3
+ "version": "2.2.0-next.1",
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.1.0"
37
+ "@oicl/openbridge-webcomponents": "^2.2.0-next.1"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "svelte": "^5.0.0"