@oicl/openbridge-webcomponents 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.
@@ -71776,6 +71776,26 @@
71776
71776
  "description": "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.",
71777
71777
  "attribute": "aria-label"
71778
71778
  },
71779
+ {
71780
+ "kind": "method",
71781
+ "name": "focus",
71782
+ "privacy": "public",
71783
+ "return": {
71784
+ "type": {
71785
+ "text": "void"
71786
+ }
71787
+ },
71788
+ "parameters": [
71789
+ {
71790
+ "name": "options",
71791
+ "optional": true,
71792
+ "type": {
71793
+ "text": "FocusOptions"
71794
+ }
71795
+ }
71796
+ ],
71797
+ "description": "Focus lands on the button inside, not on the host."
71798
+ },
71779
71799
  {
71780
71800
  "kind": "field",
71781
71801
  "name": "progressSpinner",
@@ -82949,12 +82969,16 @@
82949
82969
  "declarations": [
82950
82970
  {
82951
82971
  "kind": "class",
82952
- "description": "`<obc-split-button>` – A composite button component combining a primary action and a dropdown menu for additional actions or selections. Also known as a split button, segmented button, or action menu button.\n\nProvides a main button for a default/primary action and a secondary dropdown button that reveals a context menu with configurable options. This pattern allows users to quickly trigger a common action or select from a list of related actions or filters, improving workflow efficiency and reducing UI clutter.\n\n### Features\n- **Dual-action layout:** Combines a primary button (for the main action) and a dropdown button (for menu access) in a single horizontal control.\n- **Configurable dropdown menu:** Supports multiple menu types via `menuType` (regular, checkboxes, flyout, multi-column, etc.) for different selection and grouping needs.\n- **Multi-select and group selection:** Allows single or multiple selections in the dropdown, with optional grouping and per-group selection logic.\n- **Customizable menu content:** Accepts an array of options or column groups, supports icons, subtitles, and multi-column layouts for complex menus.\n- **Optional icon in primary button:** Add a leading icon to the main button using the `hasIcon` property and `icon` slot.\n- **Title bar and menu title:** Optionally display a title bar with close button and custom title text in the dropdown.\n- **Full width mode:** Can stretch to fill its container using the `fullWidth` property.\n- **Disabled state:** Disables both the primary and dropdown buttons when `disabled` is true.\n- **Dropdown positioning:** Menu can open above or below the button (`openTop`).\n- **Selection persistence:** Optionally keeps the selected state visually persistent in the menu.\n- **Keyboard and pointer accessibility:** Follows standard button and menu accessibility patterns.\n\n### Variants (Menu Types)\n- **Regular:** Standard single-selection dropdown menu.\n- **Checkboxes:** Menu with checkboxes for multi-selection.\n- **Flyout:** Hierarchical/flyout menu for nested actions.\n- **Multi:** Multi-column menu for large sets of options.\n- **MultiWithSubtitles:** Multi-column menu with grouped options and subtitles.\n- See `ContextMenuType` enum for all supported menu types.\n\n### Usage Guidelines\nUse `obc-split-button` when you want to provide a primary action alongside a set of related secondary actions or filters, without overwhelming the main UI. Ideal for toolbars, filter bars, or any context where a default action is common but alternatives should be easily accessible. For example, use it for \"Save\" (primary) with \"Save As...\" and \"Export\" (dropdown), or for filter controls with quick presets.\n\n- Prefer this component over a standalone dropdown when a default action is expected to be used frequently.\n- For menus with many options, use multi-column or grouped variants for better organization.\n- If only a single action is needed, use a standard `<obc-button>` instead.\n- For persistent or always-visible lists of actions, consider a toolbar or action list.\n- **TODO(designer):** Confirm best practices for when to use multi-select vs. single-select, and any recommended limits on number of options or columns.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|-------------|---------------------|-----------------------------------------------------|\n| `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |\n\n### Events\n- `click` – Fired when either the primary or dropdown button is clicked. The event detail includes `{action: 'primary' | 'dropdown'}` to distinguish which part was activated.\n- `change` – Fired when the menu selection changes. The event detail includes `{selectedValues, selectedOptions}`.\n\n### Best Practices & Constraints\n- Only use multi-select when the menu type and use case require it; otherwise, prefer single selection for clarity.\n- Keep the primary action clear and distinct from dropdown actions.\n- For accessibility, ensure all menu options have clear labels and, if using icons, provide appropriate alt text or aria-labels.\n- Avoid overloading the dropdown with too many options; group or paginate if necessary.\n- The dropdown menu closes automatically when an option is selected (unless it is a group/flyout parent).\n- The component manages focus and pointer events to ensure proper menu closing when clicking outside.\n- **TODO(designer):** Specify recommended icon usage, menu title conventions, and any animation/timing guidelines for menu opening/closing.\n\n### Example:\n```html\n<obc-split-button\n label=\"Save\"\n .options=${[\n {value: 'save-as', label: 'Save As...'},\n {value: 'export', label: 'Export'},\n ]}\n hasIcon\n>\n <obi-placeholder slot=\"icon\"></obi-placeholder>\n</obc-split-button>\n```\nIn this example, the split button shows a \"Save\" action with a leading icon, and a dropdown menu with \"Save As...\" and \"Export\" options.",
82972
+ "description": "`<obc-split-button>` – A composite button component combining a primary action and a dropdown menu for additional actions or selections. Also known as a split button, segmented button, or action menu button.\n\nProvides a main button for a default/primary action and a secondary dropdown button that reveals a context menu with configurable options. This pattern allows users to quickly trigger a common action or select from a list of related actions or filters, improving workflow efficiency and reducing UI clutter.\n\n### Features\n- **Dual-action layout:** Combines a primary button (for the main action) and a dropdown button (for menu access) in a single horizontal control.\n- **Configurable dropdown menu:** Supports multiple menu types via `menuType` (regular, checkboxes, flyout, multi-column, etc.) for different selection and grouping needs.\n- **Multi-select and group selection:** Allows single or multiple selections in the dropdown, with optional grouping and per-group selection logic.\n- **Customizable menu content:** Accepts an array of options or column groups, supports icons, subtitles, and multi-column layouts for complex menus.\n- **Optional icon in primary button:** Add a leading icon to the main button using the `hasIcon` property and `icon` slot.\n- **Replaceable dropdown icon:** The dropdown button shows a chevron; fill the `dropdown-icon` slot to show another symbol, for example one that says what the menu holds.\n- **Title bar and menu title:** Optionally display a title bar with close button and custom title text in the dropdown.\n- **Full width mode:** Can stretch to fill its container using the `fullWidth` property.\n- **Disabled state:** `disabled` disables both halves; `primaryDisabled` and `dropdownDisabled` disable one half each, so the primary action can be unavailable while the menu stays in use.\n- **Dropdown positioning:** The menu opens below the button and extends to the right. `openTop` opens it above and `openLeft` extends it to the left, for a button near the bottom or the right edge of its container.\n- **Selection persistence:** Optionally keeps the selected state visually persistent in the menu.\n- **Keyboard and pointer accessibility:** Follows standard button and menu accessibility patterns.\n\n### Variants (Menu Types)\n- **Regular:** Standard single-selection dropdown menu.\n- **Checkboxes:** Menu with checkboxes for multi-selection.\n- **Flyout:** Hierarchical/flyout menu for nested actions.\n- **Multi:** Multi-column menu for large sets of options.\n- **MultiWithSubtitles:** Multi-column menu with grouped options and subtitles.\n- See `ContextMenuType` enum for all supported menu types.\n\n### Usage Guidelines\nUse `obc-split-button` when you want to provide a primary action alongside a set of related secondary actions or filters, without overwhelming the main UI. Ideal for toolbars, filter bars, or any context where a default action is common but alternatives should be easily accessible. For example, use it for \"Save\" (primary) with \"Save As...\" and \"Export\" (dropdown), or for filter controls with quick presets.\n\n- Prefer this component over a standalone dropdown when a default action is expected to be used frequently.\n- For menus with many options, use multi-column or grouped variants for better organization.\n- If only a single action is needed, use a standard `<obc-button>` instead.\n- For persistent or always-visible lists of actions, consider a toolbar or action list.\n- **TODO(designer):** Confirm best practices for when to use multi-select vs. single-select, and any recommended limits on number of options or columns.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|-----------------|---------------------|-----------------------------------------------------|\n| `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |\n| `dropdown-icon` | Always | Icon of the dropdown button; the chevron when empty |\n\n### Events\n- `click` – Fired when either the primary or dropdown button is clicked. The event detail includes `{action: 'primary' | 'dropdown'}` to distinguish which part was activated.\n- `change` – Fired when the menu selection changes. The event detail includes `{selectedValues, selectedOptions}`.\n\n### Keyboard\nThe primary half is a plain button. The dropdown half follows the\n[APG Menu Button](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/):\n`Enter` and `Space` open the menu, `ArrowDown` and `Home` open it on the\nfirst item, `ArrowUp` and `End` on the last, and `Escape` closes it and\nreturns focus to the dropdown half. The menu is `obc-context-menu-input`.\n\nLeft out: `Enter` and `Space` land on the selected item rather than the\nfirst, so a reopened selection menu starts where the user left it.\n\n### Best Practices & Constraints\n- Only use multi-select when the menu type and use case require it; otherwise, prefer single selection for clarity.\n- Keep the primary action clear and distinct from dropdown actions.\n- For accessibility, ensure all menu options have clear labels and, if using icons, provide appropriate alt text or aria-labels.\n- Avoid overloading the dropdown with too many options; group or paginate if necessary.\n- The dropdown menu closes automatically when an option is selected (unless it is a group/flyout parent).\n- The component manages focus and pointer events to ensure proper menu closing when clicking outside.\n- **TODO(designer):** Specify recommended icon usage, menu title conventions, and any animation/timing guidelines for menu opening/closing.\n\n### Example:\n```html\n<obc-split-button\n label=\"Save\"\n .options=${[\n {value: 'save-as', label: 'Save As...'},\n {value: 'export', label: 'Export'},\n ]}\n hasIcon\n>\n <obi-placeholder slot=\"icon\"></obi-placeholder>\n</obc-split-button>\n```\nIn this example, the split button shows a \"Save\" action with a leading icon, and a dropdown menu with \"Save As...\" and \"Export\" options.",
82953
82973
  "name": "ObcSplitButton",
82954
82974
  "slots": [
82955
82975
  {
82956
82976
  "description": "Leading icon for the primary button (shown when `hasIcon` is true)",
82957
82977
  "name": "icon"
82978
+ },
82979
+ {
82980
+ "description": "Icon of the dropdown button; the chevron when empty.",
82981
+ "name": "dropdown-icon"
82958
82982
  }
82959
82983
  ],
82960
82984
  "members": [
@@ -83091,6 +83115,36 @@
83091
83115
  "description": "Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons.",
83092
83116
  "attribute": "disabled"
83093
83117
  },
83118
+ {
83119
+ "kind": "field",
83120
+ "name": "primaryDisabled",
83121
+ "type": {
83122
+ "text": "boolean"
83123
+ },
83124
+ "default": "false",
83125
+ "description": "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.\n\nAvailable when `disabled==false`.",
83126
+ "attribute": "primaryDisabled",
83127
+ "availableWhen": "disabled==false",
83128
+ "availableWhenIf": {
83129
+ "arg": "disabled",
83130
+ "truthy": false
83131
+ }
83132
+ },
83133
+ {
83134
+ "kind": "field",
83135
+ "name": "dropdownDisabled",
83136
+ "type": {
83137
+ "text": "boolean"
83138
+ },
83139
+ "default": "false",
83140
+ "description": "Disables the dropdown button alone, leaving the primary action.\n\nAvailable when `disabled==false`.",
83141
+ "attribute": "dropdownDisabled",
83142
+ "availableWhen": "disabled==false",
83143
+ "availableWhenIf": {
83144
+ "arg": "disabled",
83145
+ "truthy": false
83146
+ }
83147
+ },
83094
83148
  {
83095
83149
  "kind": "field",
83096
83150
  "name": "openTop",
@@ -83101,6 +83155,16 @@
83101
83155
  "description": "Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport.",
83102
83156
  "attribute": "openTop"
83103
83157
  },
83158
+ {
83159
+ "kind": "field",
83160
+ "name": "openLeft",
83161
+ "type": {
83162
+ "text": "boolean"
83163
+ },
83164
+ "default": "false",
83165
+ "description": "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`.",
83166
+ "attribute": "openLeft"
83167
+ },
83104
83168
  {
83105
83169
  "kind": "field",
83106
83170
  "name": "columnGroups",
@@ -83159,6 +83223,24 @@
83159
83223
  },
83160
83224
  "privacy": "private"
83161
83225
  },
83226
+ {
83227
+ "kind": "field",
83228
+ "name": "isPrimaryDisabled",
83229
+ "type": {
83230
+ "text": "boolean"
83231
+ },
83232
+ "privacy": "private",
83233
+ "readonly": true
83234
+ },
83235
+ {
83236
+ "kind": "field",
83237
+ "name": "isDropdownDisabled",
83238
+ "type": {
83239
+ "text": "boolean"
83240
+ },
83241
+ "privacy": "private",
83242
+ "readonly": true
83243
+ },
83162
83244
  {
83163
83245
  "kind": "field",
83164
83246
  "name": "handlePrimaryClick",
@@ -83348,6 +83430,24 @@
83348
83430
  "description": "Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons.",
83349
83431
  "fieldName": "disabled"
83350
83432
  },
83433
+ {
83434
+ "name": "primaryDisabled",
83435
+ "type": {
83436
+ "text": "boolean"
83437
+ },
83438
+ "default": "false",
83439
+ "description": "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.\n\nAvailable when `disabled==false`.",
83440
+ "fieldName": "primaryDisabled"
83441
+ },
83442
+ {
83443
+ "name": "dropdownDisabled",
83444
+ "type": {
83445
+ "text": "boolean"
83446
+ },
83447
+ "default": "false",
83448
+ "description": "Disables the dropdown button alone, leaving the primary action.\n\nAvailable when `disabled==false`.",
83449
+ "fieldName": "dropdownDisabled"
83450
+ },
83351
83451
  {
83352
83452
  "name": "openTop",
83353
83453
  "type": {
@@ -83357,6 +83457,15 @@
83357
83457
  "description": "Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport.",
83358
83458
  "fieldName": "openTop"
83359
83459
  },
83460
+ {
83461
+ "name": "openLeft",
83462
+ "type": {
83463
+ "text": "boolean"
83464
+ },
83465
+ "default": "false",
83466
+ "description": "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`.",
83467
+ "fieldName": "openLeft"
83468
+ },
83360
83469
  {
83361
83470
  "name": "columnGroups",
83362
83471
  "type": {
@@ -124,6 +124,8 @@ export declare class ObcIconButton extends LitElement {
124
124
  focusable: boolean;
125
125
  /** 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. */
126
126
  ariaLabel: string | null;
127
+ /** Focus lands on the button inside, not on the host. */
128
+ focus(options?: FocusOptions): void;
127
129
  get progressSpinner(): import('lit-html').TemplateResult<1> | typeof nothing;
128
130
  render(): import('lit-html').TemplateResult<1>;
129
131
  static styles: import('lit').CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAQ,OAAO,EAAY,MAAM,KAAK,CAAC;AAQzD;;;;;;GAMG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED;;;;;;;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,CAAS;IAER,WAAW,UAAQ;IAEnB,SAAS,UAAQ;IAIrD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzC,yDAAyD;IACzC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInD,IAAI,eAAe,0DAoDlB;IAEQ,MAAM;IAqCf,OAAgB,MAAM,0BAAwB;CAC/C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -37,6 +37,10 @@ var ObcIconButton = class ObcIconButton extends LitElement {
37
37
  this.focusable = true;
38
38
  this.ariaLabel = null;
39
39
  }
40
+ /** Focus lands on the button inside, not on the host. */
41
+ focus(options) {
42
+ this.shadowRoot?.querySelector("button")?.focus(options);
43
+ }
40
44
  get progressSpinner() {
41
45
  if (this.progress === void 0) return nothing;
42
46
  if (this.progress === 100) return html`<div class="progress-spinner">
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.js","names":[],"sources":["../../../src/components/icon-button/icon-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport iconStyle from './icon-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {customElement} from '../../decorator.js';\nimport {degToRad} from '../../svghelpers/math.js';\n\n/**\n * The available visual variants for `<obc-icon-button>`.\n * - `normal`: Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n */\nexport enum IconButtonVariant {\n normal = 'normal',\n raised = 'raised',\n flat = 'flat',\n integration = 'integration',\n}\n\n/**\n * `<obc-icon-button>` – An icon-only or icon-with-label button for quick actions.\n *\n * Provides a compact, visually prominent button that displays an icon (and optionally a label) for triggering actions. Commonly used for toolbars, navigation, or contextual actions where space is limited and a recognizable icon can represent the function.\n *\n * Appears as a circular or rounded button with configurable visual styles, supporting progress indication and various layout adaptations.\n *\n * ## Features\n * - **Variants:**\n * - `normal` (default): Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n * - **Progress Indicator:**\n * - Shows a circular progress spinner overlay when the `progress` property is set (0–100). Useful for indicating loading or ongoing actions.\n * - **Label Support:**\n * - Optionally displays a text label below the icon when `hasLabel` is true and content is provided in the `label` slot.\n * - **Corner Alignment:**\n * - `cornerLeft` and `cornerRight` adjust the button's border radius and alignment for flush placement at the start or end of a container.\n * - **Active State:**\n * - `activated` visually highlights the button as selected or toggled.\n * - `activeColor` applies an accent color for emphasis.\n * - **Wide Mode:**\n * - `wide` increases the button's width for easier touch targets or visual balance.\n * - **Disabled State:**\n * - `disabled` prevents interaction and visually dims the button.\n *\n * ## Usage Guidelines\n * - Use `obc-icon-button` for actions represented by icons, such as toolbars, navigation, or quick-access commands.\n * - Add a label (with `hasLabel` and the `label` slot) when clarity is needed or when icons alone may not be universally understood.\n * - Use the progress indicator for actions that take time, such as uploads or background processes.\n * - Prefer the `normal` variant for most cases; use `raised` to draw attention, and `flat` for less prominent or inline actions.\n * - For grouped or edge-aligned layouts, use `cornerLeft` or `cornerRight` to visually merge with container edges.\n * - Avoid using icon buttons for destructive or critical actions unless paired with clear feedback.\n * - **TODO(designer):** Clarify recommended icon sizes and when to use label vs. icon-only.\n *\n * ## Slots\n * | Slot Name | Renders When... | Purpose |\n * |-----------|---------------------|----------------------------------------------|\n * | (default) | Always | The icon to display (e.g., `<obi-search>`) |\n * | label | If `hasLabel` is set | Optional label text below the icon |\n *\n * ## Events\n * - Emits a standard `click` event (`onClick` handler in framework wrappers) when activated.\n *\n * ## Best Practices\n * - Ensure icons are clear and universally recognizable.\n * - For accessibility, provide an `aria-label` or descriptive label for the button's action.\n * - When using the progress indicator, avoid showing it for very short actions to prevent visual flicker.\n *\n * ## Example:\n * ```\n * <obc-icon-button variant=\"normal\">\n * <obi-search></obi-search>\n * </obc-icon-button>\n *\n * <obc-icon-button variant=\"normal\" hasLabel>\n * <obi-arrow></obi-arrow>\n * <span slot=\"label\">Next</span>\n * </obc-icon-button>\n * ```\n *\n * @property activated - Whether the button is in an activated (selected/toggled) state.\n * Visually highlights the button to indicate selection.\n * @property cornerLeft - If true, aligns the button to the left edge and removes left border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property cornerRight - If true, aligns the button to the right edge and removes right border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property activeColor - Applies an accent color to the button for emphasis.\n * Used to visually distinguish active or important actions.\n * @property wide - Increases the button's width for larger touch targets or visual balance.\n * @property disabled - Disables the button, preventing user interaction and dimming its appearance.\n * @property progress - Shows a circular progress indicator overlay when set (0–100).\n * Use to indicate ongoing actions or loading states.\n * If undefined, no progress indicator is shown.\n * @property hasLabel - If true, displays a label below the icon using the `label` slot.\n * @property showDivider - If false, and cornerLeft or cornerRight is true, the divider is not shown.\n * @property ariaLabel - 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.\n * @property focusable - Whether the button is in the tab sequence. Turn it off for a button inside a\n * composite widget that owns the tab stop, and give the widget a key for the action.\n * @property variant - Visual style: `normal` (default) is the standard appearance, `raised` adds\n * a shadow, `flat` drops the background.\n * @slot - Icon slot (default): Place an icon such as <obi-search> here.\n * @slot label - Optional label shown below the icon when `hasLabel` is true.\n * @fires click - Fired when the button is clicked (if not disabled).\n * @stable\n */\n@customElement('obc-icon-button')\nexport class ObcIconButton extends LitElement {\n @property({type: String}) variant: IconButtonVariant =\n IconButtonVariant.normal;\n\n @property({type: Boolean}) activated = false;\n\n @property({type: Boolean}) cornerLeft = false;\n\n @property({type: Boolean}) cornerRight = false;\n\n @property({type: Boolean}) activeColor = false;\n\n @property({type: Boolean}) wide = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Number}) progress: undefined | number = undefined;\n\n @property({type: Boolean}) hasLabel: boolean = false;\n\n @property({type: Boolean, attribute: false}) showDivider = true;\n\n @property({type: Boolean, attribute: false}) focusable = true;\n\n // Reactive so a consumer swapping the name (Play → Pause) re-renders the shadow button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n get progressSpinner() {\n if (this.progress === undefined) {\n return nothing;\n }\n if (this.progress === 100) {\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"#325B9A\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n </svg>\n </div>`;\n }\n const angleRad = degToRad(this.progress * 0.95 * 3.6);\n const x = 20 + 18 * Math.sin(angleRad);\n const y = 20 - 18 * Math.cos(angleRad);\n const largeArcFlag = angleRad > Math.PI ? 1 : 0;\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"var(--container-backdrop-color)\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n <path\n d=\"M18 2 A18 18 0 ${largeArcFlag} 1 ${x} ${y}\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>`;\n }\n\n override render() {\n return html`\n <button\n class=${classMap({\n wrapper: true,\n ['variant-' + this.variant]: true,\n activated: this.activated,\n 'corner-left': this.cornerLeft,\n 'corner-right': this.cornerRight,\n 'active-color': this.activeColor,\n 'has-label': this.hasLabel,\n wide: this.wide,\n progress: this.progress !== undefined,\n 'hide-divider': !this.showDivider,\n })}\n ?disabled=${this.disabled}\n aria-label=${ifDefined(this.ariaLabel ?? undefined)}\n tabindex=${ifDefined(this.focusable ? undefined : -1)}\n part=\"wrapper\"\n >\n ${this.progress !== undefined ? this.progressSpinner : nothing}\n <div class=\"visible-wrapper\" part=\"visible-wrapper\">\n <div class=\"icon\" part=\"icon\">\n <slot></slot>\n </div>\n </div>\n ${\n this.hasLabel\n ? html`<div class=\"label\" part=\"label\">\n <slot name=\"label\"></slot>\n </div>`\n : nothing\n }\n </button>\n `;\n }\n\n static override styles = unsafeCSS(iconStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-icon-button': ObcIconButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAY,oBAAL,yBAAA,mBAAA;CACL,kBAAA,YAAA;CACA,kBAAA,YAAA;CACA,kBAAA,UAAA;CACA,kBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AA0FO,IAAM,gBAAN,MAAM,sBAAsB,WAAW;;;;EAIL,KAAA,YAAA;EAEC,KAAA,aAAA;EAEC,KAAA,cAAA;EAEA,KAAA,cAAA;EAEP,KAAA,OAAA;EAEI,KAAA,WAAA;EAEmB,KAAA,WAAA,KAAA;EAEV,KAAA,WAAA;EAEY,KAAA,cAAA;EAEF,KAAA,YAAA;EAIrB,KAAA,YAAA;;CAEpC,IAAI,kBAAkB;EACpB,IAAI,KAAK,aAAa,KAAA,GACpB,OAAO;EAET,IAAI,KAAK,aAAa,KACpB,OAAO,IAAI;;;;;;;;;;;;;;;;;;EAmBb,MAAM,WAAW,SAAS,KAAK,WAAW,MAAO,GAAG;EACpD,MAAM,IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ;EACrC,MAAM,IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ;EAErC,OAAO,IAAI;;;;;;;;;;;;;;;;;8BADU,WAAW,KAAK,KAAK,IAAI,EAkBP,KAAK,EAAE,GAAG,EAAE;;;;;;;CAOrD;CAEA,SAAkB;EAChB,OAAO,IAAI;;gBAEC,SAAS;GACf,SAAS;IACR,a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,CAAC,CAAA,GAAA,cAAA,WAAA,YAAA,KAAA,CAAA;AAExB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAS,WAAW;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,eAAA,KAAA,CAAA;AAE1C,WAAA,CAAA,SAAS;CAAC,MAAM;CAAS,WAAW;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,aAAA,KAAA,CAAA;AAG1C,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,cAAA,WAAA,aAAA,KAAA,CAAA;AA1BlD,gBAAA,WAAA,CAAA,cAAc,iBAAiB,CAAA,GAAA,aAAA"}
1
+ {"version":3,"file":"icon-button.js","names":[],"sources":["../../../src/components/icon-button/icon-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport iconStyle from './icon-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {customElement} from '../../decorator.js';\nimport {degToRad} from '../../svghelpers/math.js';\n\n/**\n * The available visual variants for `<obc-icon-button>`.\n * - `normal`: Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n */\nexport enum IconButtonVariant {\n normal = 'normal',\n raised = 'raised',\n flat = 'flat',\n integration = 'integration',\n}\n\n/**\n * `<obc-icon-button>` – An icon-only or icon-with-label button for quick actions.\n *\n * Provides a compact, visually prominent button that displays an icon (and optionally a label) for triggering actions. Commonly used for toolbars, navigation, or contextual actions where space is limited and a recognizable icon can represent the function.\n *\n * Appears as a circular or rounded button with configurable visual styles, supporting progress indication and various layout adaptations.\n *\n * ## Features\n * - **Variants:**\n * - `normal` (default): Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n * - **Progress Indicator:**\n * - Shows a circular progress spinner overlay when the `progress` property is set (0–100). Useful for indicating loading or ongoing actions.\n * - **Label Support:**\n * - Optionally displays a text label below the icon when `hasLabel` is true and content is provided in the `label` slot.\n * - **Corner Alignment:**\n * - `cornerLeft` and `cornerRight` adjust the button's border radius and alignment for flush placement at the start or end of a container.\n * - **Active State:**\n * - `activated` visually highlights the button as selected or toggled.\n * - `activeColor` applies an accent color for emphasis.\n * - **Wide Mode:**\n * - `wide` increases the button's width for easier touch targets or visual balance.\n * - **Disabled State:**\n * - `disabled` prevents interaction and visually dims the button.\n *\n * ## Usage Guidelines\n * - Use `obc-icon-button` for actions represented by icons, such as toolbars, navigation, or quick-access commands.\n * - Add a label (with `hasLabel` and the `label` slot) when clarity is needed or when icons alone may not be universally understood.\n * - Use the progress indicator for actions that take time, such as uploads or background processes.\n * - Prefer the `normal` variant for most cases; use `raised` to draw attention, and `flat` for less prominent or inline actions.\n * - For grouped or edge-aligned layouts, use `cornerLeft` or `cornerRight` to visually merge with container edges.\n * - Avoid using icon buttons for destructive or critical actions unless paired with clear feedback.\n * - **TODO(designer):** Clarify recommended icon sizes and when to use label vs. icon-only.\n *\n * ## Slots\n * | Slot Name | Renders When... | Purpose |\n * |-----------|---------------------|----------------------------------------------|\n * | (default) | Always | The icon to display (e.g., `<obi-search>`) |\n * | label | If `hasLabel` is set | Optional label text below the icon |\n *\n * ## Events\n * - Emits a standard `click` event (`onClick` handler in framework wrappers) when activated.\n *\n * ## Best Practices\n * - Ensure icons are clear and universally recognizable.\n * - For accessibility, provide an `aria-label` or descriptive label for the button's action.\n * - When using the progress indicator, avoid showing it for very short actions to prevent visual flicker.\n *\n * ## Example:\n * ```\n * <obc-icon-button variant=\"normal\">\n * <obi-search></obi-search>\n * </obc-icon-button>\n *\n * <obc-icon-button variant=\"normal\" hasLabel>\n * <obi-arrow></obi-arrow>\n * <span slot=\"label\">Next</span>\n * </obc-icon-button>\n * ```\n *\n * @property activated - Whether the button is in an activated (selected/toggled) state.\n * Visually highlights the button to indicate selection.\n * @property cornerLeft - If true, aligns the button to the left edge and removes left border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property cornerRight - If true, aligns the button to the right edge and removes right border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property activeColor - Applies an accent color to the button for emphasis.\n * Used to visually distinguish active or important actions.\n * @property wide - Increases the button's width for larger touch targets or visual balance.\n * @property disabled - Disables the button, preventing user interaction and dimming its appearance.\n * @property progress - Shows a circular progress indicator overlay when set (0–100).\n * Use to indicate ongoing actions or loading states.\n * If undefined, no progress indicator is shown.\n * @property hasLabel - If true, displays a label below the icon using the `label` slot.\n * @property showDivider - If false, and cornerLeft or cornerRight is true, the divider is not shown.\n * @property ariaLabel - 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.\n * @property focusable - Whether the button is in the tab sequence. Turn it off for a button inside a\n * composite widget that owns the tab stop, and give the widget a key for the action.\n * @property variant - Visual style: `normal` (default) is the standard appearance, `raised` adds\n * a shadow, `flat` drops the background.\n * @slot - Icon slot (default): Place an icon such as <obi-search> here.\n * @slot label - Optional label shown below the icon when `hasLabel` is true.\n * @fires click - Fired when the button is clicked (if not disabled).\n * @stable\n */\n@customElement('obc-icon-button')\nexport class ObcIconButton extends LitElement {\n @property({type: String}) variant: IconButtonVariant =\n IconButtonVariant.normal;\n\n @property({type: Boolean}) activated = false;\n\n @property({type: Boolean}) cornerLeft = false;\n\n @property({type: Boolean}) cornerRight = false;\n\n @property({type: Boolean}) activeColor = false;\n\n @property({type: Boolean}) wide = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Number}) progress: undefined | number = undefined;\n\n @property({type: Boolean}) hasLabel: boolean = false;\n\n @property({type: Boolean, attribute: false}) showDivider = true;\n\n @property({type: Boolean, attribute: false}) focusable = true;\n\n // Reactive so a consumer swapping the name (Play → Pause) re-renders the shadow button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n /** Focus lands on the button inside, not on the host. */\n public override focus(options?: FocusOptions): void {\n this.shadowRoot?.querySelector('button')?.focus(options);\n }\n\n get progressSpinner() {\n if (this.progress === undefined) {\n return nothing;\n }\n if (this.progress === 100) {\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"#325B9A\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n </svg>\n </div>`;\n }\n const angleRad = degToRad(this.progress * 0.95 * 3.6);\n const x = 20 + 18 * Math.sin(angleRad);\n const y = 20 - 18 * Math.cos(angleRad);\n const largeArcFlag = angleRad > Math.PI ? 1 : 0;\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"var(--container-backdrop-color)\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n <path\n d=\"M18 2 A18 18 0 ${largeArcFlag} 1 ${x} ${y}\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>`;\n }\n\n override render() {\n return html`\n <button\n class=${classMap({\n wrapper: true,\n ['variant-' + this.variant]: true,\n activated: this.activated,\n 'corner-left': this.cornerLeft,\n 'corner-right': this.cornerRight,\n 'active-color': this.activeColor,\n 'has-label': this.hasLabel,\n wide: this.wide,\n progress: this.progress !== undefined,\n 'hide-divider': !this.showDivider,\n })}\n ?disabled=${this.disabled}\n aria-label=${ifDefined(this.ariaLabel ?? undefined)}\n tabindex=${ifDefined(this.focusable ? undefined : -1)}\n part=\"wrapper\"\n >\n ${this.progress !== undefined ? this.progressSpinner : nothing}\n <div class=\"visible-wrapper\" part=\"visible-wrapper\">\n <div class=\"icon\" part=\"icon\">\n <slot></slot>\n </div>\n </div>\n ${\n this.hasLabel\n ? html`<div class=\"label\" part=\"label\">\n <slot name=\"label\"></slot>\n </div>`\n : nothing\n }\n </button>\n `;\n }\n\n static override styles = unsafeCSS(iconStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-icon-button': ObcIconButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAY,oBAAL,yBAAA,mBAAA;CACL,kBAAA,YAAA;CACA,kBAAA,YAAA;CACA,kBAAA,UAAA;CACA,kBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AA0FO,IAAM,gBAAN,MAAM,sBAAsB,WAAW;;;;EAIL,KAAA,YAAA;EAEC,KAAA,aAAA;EAEC,KAAA,cAAA;EAEA,KAAA,cAAA;EAEP,KAAA,OAAA;EAEI,KAAA,WAAA;EAEmB,KAAA,WAAA,KAAA;EAEV,KAAA,WAAA;EAEY,KAAA,cAAA;EAEF,KAAA,YAAA;EAIrB,KAAA,YAAA;;;CAGpC,MAAsB,SAA8B;EAClD,KAAK,YAAY,cAAc,QAAQ,CAAC,EAAE,MAAM,OAAO;CACzD;CAEA,IAAI,kBAAkB;EACpB,IAAI,KAAK,aAAa,KAAA,GACpB,OAAO;EAET,IAAI,KAAK,aAAa,KACpB,OAAO,IAAI;;;;;;;;;;;;;;;;;;EAmBb,MAAM,WAAW,SAAS,KAAK,WAAW,MAAO,GAAG;EACpD,MAAM,IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ;EACrC,MAAM,IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ;EAErC,OAAO,IAAI;;;;;;;;;;;;;;;;;8BADU,WAAW,KAAK,KAAK,IAAI,EAkBP,KAAK,EAAE,GAAG,EAAE;;;;;;;CAOrD;CAEA,SAAkB;EAChB,OAAO,IAAI;;gBAEC,SAAS;GACf,SAAS;IACR,aAAa,KAAK,UAA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AAA,cAAA,WAAA,YAAA,KAAA,CAAA;AAExB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAS,WAAW;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,eAAA,KAAA,CAAA;AAE1C,WAAA,CAAA,SAAS;CAAC,MAAM;CAAS,WAAW;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,aAAA,KAAA,CAAA;AAG1C,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,cAAA,WAAA,aAAA,KAAA,CAAA;AA1BlD,gBAAA,WAAA,CAAA,cAAc,iBAAiB,CAAA,GAAA,aAAA"}
@@ -45,6 +45,11 @@ var split_button_default = css`* {
45
45
  top: unset;
46
46
  }
47
47
 
48
+ .wrapper.open-left .positioned-menu {
49
+ right: anchor(right);
50
+ left: unset;
51
+ }
52
+
48
53
  .dropdown-button::part(visible-wrapper) {
49
54
  box-sizing: border-box;
50
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.css.js","names":[],"sources":["../../../src/components/split-button/split-button.css?inline"],"sourcesContent":[".wrapper {\n position: relative;\n display: flex;\n align-items: stretch;\n width: fit-content;\n\n anchor-name: --split-button-anchor;\n\n &.full-width {\n width: 100%;\n }\n}\n\n.primary-button {\n flex: 1;\n}\n\n.primary-button::part(visible-wrapper) {\n border-right: none;\n flex: 1;\n}\n\n.primary-button::part(wrapper) {\n padding-left: var(--split-button-padding-left, 8px);\n display: flex;\n flex-grow: 1;\n}\n\n/* Context menu positioning */\n.positioned-menu {\n position: fixed;\n position-anchor: --split-button-anchor;\n left: calc(anchor(right) - var(--ui-components-button-touch-target-size));\n top: anchor(bottom);\n}\n\n.wrapper.open-top {\n .positioned-menu {\n bottom: anchor(top);\n top: unset;\n }\n}\n\n.dropdown-button::part(visible-wrapper) {\n box-sizing: border-box;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"split-button.css.js","names":[],"sources":["../../../src/components/split-button/split-button.css?inline"],"sourcesContent":[".wrapper {\n position: relative;\n display: flex;\n align-items: stretch;\n width: fit-content;\n\n anchor-name: --split-button-anchor;\n\n &.full-width {\n width: 100%;\n }\n}\n\n.primary-button {\n flex: 1;\n}\n\n.primary-button::part(visible-wrapper) {\n border-right: none;\n flex: 1;\n}\n\n.primary-button::part(wrapper) {\n padding-left: var(--split-button-padding-left, 8px);\n display: flex;\n flex-grow: 1;\n}\n\n/* Context menu positioning */\n.positioned-menu {\n position: fixed;\n position-anchor: --split-button-anchor;\n left: calc(anchor(right) - var(--ui-components-button-touch-target-size));\n top: anchor(bottom);\n}\n\n.wrapper.open-top {\n .positioned-menu {\n bottom: anchor(top);\n top: unset;\n }\n}\n\n.wrapper.open-left {\n .positioned-menu {\n right: anchor(right);\n left: unset;\n }\n}\n\n.dropdown-button::part(visible-wrapper) {\n box-sizing: border-box;\n}\n"],"mappings":""}
@@ -24,10 +24,11 @@ export type ObcSplitButtonChangeEvent = CustomEvent<{
24
24
  * - **Multi-select and group selection:** Allows single or multiple selections in the dropdown, with optional grouping and per-group selection logic.
25
25
  * - **Customizable menu content:** Accepts an array of options or column groups, supports icons, subtitles, and multi-column layouts for complex menus.
26
26
  * - **Optional icon in primary button:** Add a leading icon to the main button using the `hasIcon` property and `icon` slot.
27
+ * - **Replaceable dropdown icon:** The dropdown button shows a chevron; fill the `dropdown-icon` slot to show another symbol, for example one that says what the menu holds.
27
28
  * - **Title bar and menu title:** Optionally display a title bar with close button and custom title text in the dropdown.
28
29
  * - **Full width mode:** Can stretch to fill its container using the `fullWidth` property.
29
- * - **Disabled state:** Disables both the primary and dropdown buttons when `disabled` is true.
30
- * - **Dropdown positioning:** Menu can open above or below the button (`openTop`).
30
+ * - **Disabled state:** `disabled` disables both halves; `primaryDisabled` and `dropdownDisabled` disable one half each, so the primary action can be unavailable while the menu stays in use.
31
+ * - **Dropdown positioning:** The menu opens below the button and extends to the right. `openTop` opens it above and `openLeft` extends it to the left, for a button near the bottom or the right edge of its container.
31
32
  * - **Selection persistence:** Optionally keeps the selected state visually persistent in the menu.
32
33
  * - **Keyboard and pointer accessibility:** Follows standard button and menu accessibility patterns.
33
34
  *
@@ -49,14 +50,25 @@ export type ObcSplitButtonChangeEvent = CustomEvent<{
49
50
  * - **TODO(designer):** Confirm best practices for when to use multi-select vs. single-select, and any recommended limits on number of options or columns.
50
51
  *
51
52
  * ### Slots
52
- * | Slot Name | Renders When... | Purpose |
53
- * |-------------|---------------------|-----------------------------------------------------|
54
- * | `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |
53
+ * | Slot Name | Renders When... | Purpose |
54
+ * |-----------------|---------------------|-----------------------------------------------------|
55
+ * | `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |
56
+ * | `dropdown-icon` | Always | Icon of the dropdown button; the chevron when empty |
55
57
  *
56
58
  * ### Events
57
59
  * - `click` – Fired when either the primary or dropdown button is clicked. The event detail includes `{action: 'primary' | 'dropdown'}` to distinguish which part was activated.
58
60
  * - `change` – Fired when the menu selection changes. The event detail includes `{selectedValues, selectedOptions}`.
59
61
  *
62
+ * ### Keyboard
63
+ * The primary half is a plain button. The dropdown half follows the
64
+ * [APG Menu Button](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/):
65
+ * `Enter` and `Space` open the menu, `ArrowDown` and `Home` open it on the
66
+ * first item, `ArrowUp` and `End` on the last, and `Escape` closes it and
67
+ * returns focus to the dropdown half. The menu is `obc-context-menu-input`.
68
+ *
69
+ * Left out: `Enter` and `Space` land on the selected item rather than the
70
+ * first, so a reopened selection menu starts where the user left it.
71
+ *
60
72
  * ### Best Practices & Constraints
61
73
  * - Only use multi-select when the menu type and use case require it; otherwise, prefer single selection for clarity.
62
74
  * - Keep the primary action clear and distinct from dropdown actions.
@@ -107,13 +119,23 @@ export type ObcSplitButtonChangeEvent = CustomEvent<{
107
119
  * When true, the component stretches horizontally.
108
120
  * @property disabled - Whether both parts of the button are disabled.
109
121
  * When true, disables both the primary and dropdown buttons.
122
+ * @property primaryDisabled - Disables the primary button alone, for an action the user
123
+ * cannot take right now while the menu stays in use, for example to ask for the access
124
+ * the action needs.
125
+ * @availableWhen primaryDisabled disabled==false
126
+ * @property dropdownDisabled - Disables the dropdown button alone, leaving the primary action.
127
+ * @availableWhen dropdownDisabled disabled==false
110
128
  * @property openTop - Open context menu dropdown above (`true`) or below (`false`) the button.
111
129
  * Useful for placement near the bottom of the viewport.
130
+ * @property openLeft - Extend the menu to the left of the dropdown button (`true`), its right
131
+ * edge on the button's right edge, instead of to the right. For a button near the right
132
+ * edge of its container; combines with `openTop`.
112
133
  * @property columnGroups - Array of column group definitions for multi-column/grouped menus.
113
134
  * Use instead of `options` for grouped or subtitle layouts.
114
135
  * @availableWhen columnGroups menuType==MultiWithSubtitles
115
136
  * @property dropdownLabel - Accessible name of the dropdown button; the chevron carries none.
116
137
  * @slot icon - Leading icon for the primary button (shown when `hasIcon` is true)
138
+ * @slot dropdown-icon - Icon of the dropdown button; the chevron when empty.
117
139
  * @fires {ObcSplitButtonClickEvent} click - Fired when the primary or dropdown button is clicked.
118
140
  * @fires {ObcSplitButtonChangeEvent} change - Fired when the dropdown menu selection changes.
119
141
  * @beta
@@ -153,8 +175,22 @@ export declare class ObcSplitButton extends LitElement {
153
175
  fullWidth: boolean;
154
176
  /** Whether both parts of the button are disabled. When true, disables both the primary and dropdown buttons. */
155
177
  disabled: boolean;
178
+ /**
179
+ * 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.
180
+ *
181
+ * Available when `disabled==false`.
182
+ */
183
+ primaryDisabled: boolean;
184
+ /**
185
+ * Disables the dropdown button alone, leaving the primary action.
186
+ *
187
+ * Available when `disabled==false`.
188
+ */
189
+ dropdownDisabled: boolean;
156
190
  /** Open context menu dropdown above (`true`) or below (`false`) the button. Useful for placement near the bottom of the viewport. */
157
191
  openTop: boolean;
192
+ /** 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`. */
193
+ openLeft: boolean;
158
194
  /**
159
195
  * Array of column group definitions for multi-column/grouped menus. Use instead of `options` for grouped or subtitle layouts.
160
196
  *
@@ -166,6 +202,8 @@ export declare class ObcSplitButton extends LitElement {
166
202
  private menuFocusStrategy;
167
203
  private menu?;
168
204
  private dropdownButton?;
205
+ private get isPrimaryDisabled();
206
+ private get isDropdownDisabled();
169
207
  private handlePrimaryClick;
170
208
  private handleDropdownClick;
171
209
  private focusMenuAfterOpen;
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../../src/components/split-button/split-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,yCAAyC,CAAC;AACjD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,WAAW,EACZ,MAAM,6CAA6C,CAAC;AAGrD,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;IACjD,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;IAClD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AACH,qBACa,cAAe,SAAQ,UAAU;IAClB,KAAK,SAAkB;IAEtB,OAAO,UAAS;IAElB,OAAO,EAAE,iBAAiB,EAAE,CAAM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GAE7B;IAED,OAAO,CAAC,kBAAkB,CAOxB;IAEF,OAAO,CAAC,mBAAmB,CAczB;YAEY,kBAAkB;IAkBhC,OAAO,CAAC,qBAAqB,CAmD3B;IAEF,OAAO,CAAC,cAAc,CAKpB;IAEF,OAAO,CAAC,mBAAmB,CAYzB;IAEF,OAAO,KAAK,aAAa,GAQxB;IAED,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,eAAe,CAUrB;IAEO,oBAAoB;IAKpB,MAAM;IAyEf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -24,7 +24,10 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
24
24
  this.dropdownLabel = "More options";
25
25
  this.fullWidth = false;
26
26
  this.disabled = false;
27
+ this.primaryDisabled = false;
28
+ this.dropdownDisabled = false;
27
29
  this.openTop = false;
30
+ this.openLeft = false;
28
31
  this.columnGroups = [];
29
32
  this.isDropdownOpen = false;
30
33
  this.restoreFocusOnClose = false;
@@ -43,7 +46,7 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
43
46
  } else window.removeEventListener("pointerdown", this.closeOnOutside);
44
47
  };
45
48
  this.handleDropdownKeydown = (event) => {
46
- if (this.disabled) return;
49
+ if (this.isDropdownDisabled) return;
47
50
  switch (event.key) {
48
51
  case "ArrowDown":
49
52
  event.preventDefault();
@@ -105,8 +108,15 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
105
108
  });
106
109
  };
107
110
  }
111
+ get isPrimaryDisabled() {
112
+ return this.disabled || this.primaryDisabled;
113
+ }
114
+ get isDropdownDisabled() {
115
+ return this.disabled || this.dropdownDisabled;
116
+ }
108
117
  async focusMenuAfterOpen() {
109
118
  await this.updateComplete;
119
+ await this.menu?.updateComplete;
110
120
  if (!this.isDropdownOpen) return;
111
121
  if (this.menuFocusStrategy === "last") this.menu?.focusLastItem();
112
122
  else if (this.menuFocusStrategy === "first") this.menu?.focusFirstItem();
@@ -138,7 +148,8 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
138
148
  wrapper: true,
139
149
  "full-width": this.fullWidth,
140
150
  "is-open": this.isDropdownOpen,
141
- "open-top": this.openTop
151
+ "open-top": this.openTop,
152
+ "open-left": this.openLeft
142
153
  })}
143
154
  >
144
155
  <obc-button
@@ -146,7 +157,7 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
146
157
  .variant=${"normal"}
147
158
  .segmentPosition=${segmentPosition.start}
148
159
  .showLeadingIcon=${this.hasIcon}
149
- .disabled=${this.disabled}
160
+ .disabled=${this.isPrimaryDisabled}
150
161
  @click=${this.handlePrimaryClick}
151
162
  .fullWidth=${this.fullWidth}
152
163
  >
@@ -158,7 +169,7 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
158
169
  class="dropdown-button"
159
170
  .variant=${"normal"}
160
171
  .cornerRight=${true}
161
- .disabled=${this.disabled}
172
+ .disabled=${this.isDropdownDisabled}
162
173
  .activated=${this.isDropdownOpen}
163
174
  aria-label=${this.dropdownLabel}
164
175
  @click=${this.handleDropdownClick}
@@ -166,7 +177,11 @@ var ObcSplitButton = class ObcSplitButton extends LitElement {
166
177
  aria-expanded=${this.isDropdownOpen}
167
178
  aria-haspopup="menu"
168
179
  >
169
- <obi-arrow-flyout-google></obi-arrow-flyout-google>
180
+ <slot name="dropdown-icon">
181
+ <obi-arrow-flyout-google
182
+ aria-hidden="true"
183
+ ></obi-arrow-flyout-google>
184
+ </slot>
170
185
  </obc-icon-button>
171
186
 
172
187
  <!-- Context Menu -->
@@ -207,7 +222,10 @@ __decorate([property({ type: String })], ObcSplitButton.prototype, "menuTitle",
207
222
  __decorate([property({ type: String })], ObcSplitButton.prototype, "dropdownLabel", void 0);
208
223
  __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "fullWidth", void 0);
209
224
  __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "disabled", void 0);
225
+ __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "primaryDisabled", void 0);
226
+ __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "dropdownDisabled", void 0);
210
227
  __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "openTop", void 0);
228
+ __decorate([property({ type: Boolean })], ObcSplitButton.prototype, "openLeft", void 0);
211
229
  __decorate([property({ type: Array })], ObcSplitButton.prototype, "columnGroups", void 0);
212
230
  __decorate([state()], ObcSplitButton.prototype, "isDropdownOpen", void 0);
213
231
  __decorate([query("obc-context-menu-input")], ObcSplitButton.prototype, "menu", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"split-button.js","names":[],"sources":["../../../src/components/split-button/split-button.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS, nothing} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport compentStyle from './split-button.css?inline';\nimport {customElement} from '../../decorator.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {segmentPosition} from '../button/button.js';\nimport '../../icons/icon-arrow-flyout-google.js';\nimport '../button/button.js';\nimport '../icon-button/icon-button.js';\nimport '../menu-button/menu-button.js';\nimport {\n ContextMenuType,\n ContextMenuOption,\n ColumnGroup,\n} from '../context-menu-input/context-menu-input.js';\nimport type {ObcContextMenuInput} from '../context-menu-input/context-menu-input.js';\n\nexport type ObcSplitButtonClickEvent = CustomEvent<{\n action: 'primary' | 'dropdown';\n value?: string;\n option?: ContextMenuOption;\n}>;\n\nexport type ObcSplitButtonChangeEvent = CustomEvent<{\n selectedValues: string[];\n selectedOptions: Array<ContextMenuOption>;\n}>;\n\n/**\n * `<obc-split-button>` – A composite button component combining a primary action and a dropdown menu for additional actions or selections. Also known as a split button, segmented button, or action menu button.\n *\n * Provides a main button for a default/primary action and a secondary dropdown button that reveals a context menu with configurable options. This pattern allows users to quickly trigger a common action or select from a list of related actions or filters, improving workflow efficiency and reducing UI clutter.\n *\n * ### Features\n * - **Dual-action layout:** Combines a primary button (for the main action) and a dropdown button (for menu access) in a single horizontal control.\n * - **Configurable dropdown menu:** Supports multiple menu types via `menuType` (regular, checkboxes, flyout, multi-column, etc.) for different selection and grouping needs.\n * - **Multi-select and group selection:** Allows single or multiple selections in the dropdown, with optional grouping and per-group selection logic.\n * - **Customizable menu content:** Accepts an array of options or column groups, supports icons, subtitles, and multi-column layouts for complex menus.\n * - **Optional icon in primary button:** Add a leading icon to the main button using the `hasIcon` property and `icon` slot.\n * - **Title bar and menu title:** Optionally display a title bar with close button and custom title text in the dropdown.\n * - **Full width mode:** Can stretch to fill its container using the `fullWidth` property.\n * - **Disabled state:** Disables both the primary and dropdown buttons when `disabled` is true.\n * - **Dropdown positioning:** Menu can open above or below the button (`openTop`).\n * - **Selection persistence:** Optionally keeps the selected state visually persistent in the menu.\n * - **Keyboard and pointer accessibility:** Follows standard button and menu accessibility patterns.\n *\n * ### Variants (Menu Types)\n * - **Regular:** Standard single-selection dropdown menu.\n * - **Checkboxes:** Menu with checkboxes for multi-selection.\n * - **Flyout:** Hierarchical/flyout menu for nested actions.\n * - **Multi:** Multi-column menu for large sets of options.\n * - **MultiWithSubtitles:** Multi-column menu with grouped options and subtitles.\n * - See `ContextMenuType` enum for all supported menu types.\n *\n * ### Usage Guidelines\n * Use `obc-split-button` when you want to provide a primary action alongside a set of related secondary actions or filters, without overwhelming the main UI. Ideal for toolbars, filter bars, or any context where a default action is common but alternatives should be easily accessible. For example, use it for \"Save\" (primary) with \"Save As...\" and \"Export\" (dropdown), or for filter controls with quick presets.\n *\n * - Prefer this component over a standalone dropdown when a default action is expected to be used frequently.\n * - For menus with many options, use multi-column or grouped variants for better organization.\n * - If only a single action is needed, use a standard `<obc-button>` instead.\n * - For persistent or always-visible lists of actions, consider a toolbar or action list.\n * - **TODO(designer):** Confirm best practices for when to use multi-select vs. single-select, and any recommended limits on number of options or columns.\n *\n * ### Slots\n * | Slot Name | Renders When... | Purpose |\n * |-------------|---------------------|-----------------------------------------------------|\n * | `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |\n *\n * ### Events\n * - `click` – Fired when either the primary or dropdown button is clicked. The event detail includes `{action: 'primary' | 'dropdown'}` to distinguish which part was activated.\n * - `change` – Fired when the menu selection changes. The event detail includes `{selectedValues, selectedOptions}`.\n *\n * ### Best Practices & Constraints\n * - Only use multi-select when the menu type and use case require it; otherwise, prefer single selection for clarity.\n * - Keep the primary action clear and distinct from dropdown actions.\n * - For accessibility, ensure all menu options have clear labels and, if using icons, provide appropriate alt text or aria-labels.\n * - Avoid overloading the dropdown with too many options; group or paginate if necessary.\n * - The dropdown menu closes automatically when an option is selected (unless it is a group/flyout parent).\n * - The component manages focus and pointer events to ensure proper menu closing when clicking outside.\n * - **TODO(designer):** Specify recommended icon usage, menu title conventions, and any animation/timing guidelines for menu opening/closing.\n *\n * ### Example:\n * ```html\n * <obc-split-button\n * label=\"Save\"\n * .options=${[\n * {value: 'save-as', label: 'Save As...'},\n * {value: 'export', label: 'Export'},\n * ]}\n * hasIcon\n * >\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * </obc-split-button>\n * ```\n * In this example, the split button shows a \"Save\" action with a leading icon, and a dropdown menu with \"Save As...\" and \"Export\" options.\n *\n * @property label - The label displayed on the main (primary) button.\n * @property hasIcon - Whether the main button should show a leading icon slot.\n * When true, content in the `icon` slot is rendered before the label.\n * @property options - Array of menu options for the dropdown.\n * Each option should be a `ContextMenuOption` object.\n * For grouped or multi-column menus, use `columnGroups` instead.\n * @property selectedValues - Array of currently selected option values in the dropdown.\n * Used to control the checked/selected state of menu items.\n * @property menuType - The variant type of context menu to display in the dropdown.\n * Accepts values from the `ContextMenuType` enum (e.g., 'regular', 'checkboxes', 'flyout', 'multi', 'multiWithSubtitles').\n * @property multiSelect - Whether multiple selections are allowed in the dropdown.\n * If true, users can select more than one option (e.g., for checkboxes or multi-column).\n * @property selectPerGroup - Allows single selection per group/column (matches context-menu-input).\n * When true, only one option can be selected per group/column.\n * @property itemsPerColumn - Number of items per column in multi-column layouts.\n * Used when `menuType` is 'multi' or 'multiWithSubtitles'.\n * @availableWhen itemsPerColumn menuType in [Multi, MultiWithSubtitles]\n * @property hasTitleBar - Whether to show a title bar with close button in the dropdown.\n * When true, a title bar appears at the top of the menu.\n * @property menuTitle - Title text for the dropdown menu.\n * Displayed in the title bar when `hasTitleBar` is true.\n * @availableWhen menuTitle hasTitleBar==true\n * @property fullWidth - Whether the split button should fill the full width of its container.\n * When true, the component stretches horizontally.\n * @property disabled - Whether both parts of the button are disabled.\n * When true, disables both the primary and dropdown buttons.\n * @property openTop - Open context menu dropdown above (`true`) or below (`false`) the button.\n * Useful for placement near the bottom of the viewport.\n * @property columnGroups - Array of column group definitions for multi-column/grouped menus.\n * Use instead of `options` for grouped or subtitle layouts.\n * @availableWhen columnGroups menuType==MultiWithSubtitles\n * @property dropdownLabel - Accessible name of the dropdown button; the chevron carries none.\n * @slot icon - Leading icon for the primary button (shown when `hasIcon` is true)\n * @fires {ObcSplitButtonClickEvent} click - Fired when the primary or dropdown button is clicked.\n * @fires {ObcSplitButtonChangeEvent} change - Fired when the dropdown menu selection changes.\n * @beta\n */\n@customElement('obc-split-button')\nexport class ObcSplitButton extends LitElement {\n @property({type: String}) label = 'Split Button';\n\n @property({type: Boolean}) hasIcon = false;\n\n @property({type: Array}) options: ContextMenuOption[] = [];\n\n @property({type: Array}) selectedValues: string[] = [];\n\n @property({type: String}) menuType: ContextMenuType = ContextMenuType.Regular;\n\n @property({type: Boolean}) multiSelect?: boolean;\n\n @property({type: Boolean}) selectPerGroup?: boolean;\n\n @property({type: Number}) itemsPerColumn: number = 5;\n\n @property({type: Boolean}) hasTitleBar = false;\n\n @property({type: String}) menuTitle = '';\n\n @property({type: String}) dropdownLabel = 'More options';\n\n @property({type: Boolean}) fullWidth = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Boolean}) openTop = false;\n\n @property({type: Array}) columnGroups: ColumnGroup[] = [];\n\n @state() private isDropdownOpen = false;\n\n private restoreFocusOnClose = false;\n\n private menuFocusStrategy: 'first' | 'selected' | 'last' = 'selected';\n\n @query('obc-context-menu-input') private menu?: ObcContextMenuInput;\n\n @query('.dropdown-button') private dropdownButton?: HTMLElement;\n\n private handlePrimaryClick = (e: Event) => {\n e.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('click', {\n detail: {action: 'primary'},\n })\n );\n };\n\n private handleDropdownClick = (e: Event) => {\n e.stopPropagation();\n this.isDropdownOpen = !this.isDropdownOpen;\n this.dispatchEvent(\n new CustomEvent('click', {\n detail: {action: 'dropdown'},\n })\n );\n if (this.isDropdownOpen) {\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n window.removeEventListener('pointerdown', this.closeOnOutside);\n }\n };\n\n private async focusMenuAfterOpen() {\n await this.updateComplete;\n if (!this.isDropdownOpen) return;\n\n if (this.menuFocusStrategy === 'last') {\n this.menu?.focusLastItem();\n } else if (this.menuFocusStrategy === 'first') {\n this.menu?.focusFirstItem();\n } else {\n this.menu?.focusSelectedItem();\n }\n\n this.menuFocusStrategy = 'selected';\n }\n\n private handleDropdownKeydown = (event: KeyboardEvent) => {\n if (this.disabled) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.menuFocusStrategy = 'first';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusFirstItem();\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.menuFocusStrategy = 'last';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusLastItem();\n }\n break;\n case 'Home':\n event.preventDefault();\n this.menuFocusStrategy = 'first';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusFirstItem();\n }\n break;\n case 'End':\n event.preventDefault();\n this.menuFocusStrategy = 'last';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusLastItem();\n }\n break;\n default:\n break;\n }\n };\n\n private closeOnOutside = (e: Event) => {\n if (!this.contains(e.target as Node)) {\n this.isDropdownOpen = false;\n window.removeEventListener('pointerdown', this.closeOnOutside);\n }\n };\n\n private handleMenuItemClick = (e: CustomEvent) => {\n const {option} = e.detail;\n // For flyout, only close if it's a leaf (not a group)\n if (\n this.menuType === ContextMenuType.Flyout &&\n option.children &&\n option.children.length\n ) {\n return; // do not close if it's a group\n }\n // Close for all other options (including flyout leaves)\n this.handleMenuClose();\n };\n\n private get isMultiSelect(): boolean {\n if (this.multiSelect !== undefined) return this.multiSelect;\n return [\n ContextMenuType.Checkboxes,\n ContextMenuType.NestedCheckboxes,\n ContextMenuType.Multi,\n ContextMenuType.MultiWithSubtitles,\n ].includes(this.menuType);\n }\n\n private handleMenuChange(\n e: CustomEvent<{\n selectedValues: string[];\n selectedOptions: ContextMenuOption[];\n }>\n ) {\n this.selectedValues = e.detail.selectedValues;\n\n this.dispatchEvent(new CustomEvent('change', {detail: e.detail}));\n this.handleMenuClose();\n }\n\n private handleMenuClose = () => {\n this.restoreFocusOnClose = true;\n this.isDropdownOpen = false;\n window.removeEventListener('pointerdown', this.closeOnOutside);\n queueMicrotask(() => {\n if (this.restoreFocusOnClose) {\n this.restoreFocusOnClose = false;\n this.dropdownButton?.focus();\n }\n });\n };\n\n override disconnectedCallback() {\n window.removeEventListener('pointerdown', this.closeOnOutside);\n super.disconnectedCallback();\n }\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n 'full-width': this.fullWidth,\n 'is-open': this.isDropdownOpen,\n 'open-top': this.openTop,\n })}\n >\n <obc-button\n class=\"primary-button\"\n .variant=${'normal'}\n .segmentPosition=${segmentPosition.start}\n .showLeadingIcon=${this.hasIcon}\n .disabled=${this.disabled}\n @click=${this.handlePrimaryClick}\n .fullWidth=${this.fullWidth}\n >\n ${\n this.hasIcon\n ? html`<slot name=\"icon\" slot=\"leading-icon\"></slot>`\n : nothing\n }\n ${this.label}\n </obc-button>\n\n <obc-icon-button\n class=\"dropdown-button\"\n .variant=${'normal'}\n .cornerRight=${true}\n .disabled=${this.disabled}\n .activated=${this.isDropdownOpen}\n aria-label=${this.dropdownLabel}\n @click=${this.handleDropdownClick}\n @keydown=${this.handleDropdownKeydown}\n aria-expanded=${this.isDropdownOpen}\n aria-haspopup=\"menu\"\n >\n <obi-arrow-flyout-google></obi-arrow-flyout-google>\n </obc-icon-button>\n\n <!-- Context Menu -->\n ${\n this.isDropdownOpen && this.options.length > 0\n ? html`\n <obc-context-menu-input\n class=\"positioned-menu\"\n .options=${this.options}\n .selectedValues=${this.selectedValues}\n .type=${this.menuType}\n .multiSelect=${this.isMultiSelect}\n .selectPerGroup=${true}\n .hasTitleBar=${this.hasTitleBar}\n .title=${this.menuTitle}\n .columnGroups=${this.columnGroups}\n .itemsPerColumn=${this.itemsPerColumn}\n @change=${this.handleMenuChange}\n @close=${this.handleMenuClose}\n @item-click=${this.handleMenuItemClick}\n /></obc-context-menu-input>\n `\n : nothing\n }\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-split-button': ObcSplitButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsIO,IAAM,iBAAN,MAAM,uBAAuB,WAAW;;;EACX,KAAA,QAAA;EAEG,KAAA,UAAA;EAEmB,KAAA,UAAA,CAAC;EAEL,KAAA,iBAAA,CAAC;EAEC,KAAA,WAAA,gBAAgB;EAMnB,KAAA,iBAAA;EAEV,KAAA,cAAA;EAEH,KAAA,YAAA;EAEI,KAAA,gBAAA;EAEH,KAAA,YAAA;EAED,KAAA,WAAA;EAED,K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BAAkB,CAAA,GAAA,eAAA,WAAA,kBAAA,KAAA,CAAA;AAxC1B,iBAAA,WAAA,CAAA,cAAc,kBAAkB,CAAA,GAAA,cAAA"}
1
+ {"version":3,"file":"split-button.js","names":[],"sources":["../../../src/components/split-button/split-button.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS, nothing} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport compentStyle from './split-button.css?inline';\nimport {customElement} from '../../decorator.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {segmentPosition} from '../button/button.js';\nimport '../../icons/icon-arrow-flyout-google.js';\nimport '../button/button.js';\nimport '../icon-button/icon-button.js';\nimport '../menu-button/menu-button.js';\nimport {\n ContextMenuType,\n ContextMenuOption,\n ColumnGroup,\n} from '../context-menu-input/context-menu-input.js';\nimport type {ObcContextMenuInput} from '../context-menu-input/context-menu-input.js';\n\nexport type ObcSplitButtonClickEvent = CustomEvent<{\n action: 'primary' | 'dropdown';\n value?: string;\n option?: ContextMenuOption;\n}>;\n\nexport type ObcSplitButtonChangeEvent = CustomEvent<{\n selectedValues: string[];\n selectedOptions: Array<ContextMenuOption>;\n}>;\n\n/**\n * `<obc-split-button>` – A composite button component combining a primary action and a dropdown menu for additional actions or selections. Also known as a split button, segmented button, or action menu button.\n *\n * Provides a main button for a default/primary action and a secondary dropdown button that reveals a context menu with configurable options. This pattern allows users to quickly trigger a common action or select from a list of related actions or filters, improving workflow efficiency and reducing UI clutter.\n *\n * ### Features\n * - **Dual-action layout:** Combines a primary button (for the main action) and a dropdown button (for menu access) in a single horizontal control.\n * - **Configurable dropdown menu:** Supports multiple menu types via `menuType` (regular, checkboxes, flyout, multi-column, etc.) for different selection and grouping needs.\n * - **Multi-select and group selection:** Allows single or multiple selections in the dropdown, with optional grouping and per-group selection logic.\n * - **Customizable menu content:** Accepts an array of options or column groups, supports icons, subtitles, and multi-column layouts for complex menus.\n * - **Optional icon in primary button:** Add a leading icon to the main button using the `hasIcon` property and `icon` slot.\n * - **Replaceable dropdown icon:** The dropdown button shows a chevron; fill the `dropdown-icon` slot to show another symbol, for example one that says what the menu holds.\n * - **Title bar and menu title:** Optionally display a title bar with close button and custom title text in the dropdown.\n * - **Full width mode:** Can stretch to fill its container using the `fullWidth` property.\n * - **Disabled state:** `disabled` disables both halves; `primaryDisabled` and `dropdownDisabled` disable one half each, so the primary action can be unavailable while the menu stays in use.\n * - **Dropdown positioning:** The menu opens below the button and extends to the right. `openTop` opens it above and `openLeft` extends it to the left, for a button near the bottom or the right edge of its container.\n * - **Selection persistence:** Optionally keeps the selected state visually persistent in the menu.\n * - **Keyboard and pointer accessibility:** Follows standard button and menu accessibility patterns.\n *\n * ### Variants (Menu Types)\n * - **Regular:** Standard single-selection dropdown menu.\n * - **Checkboxes:** Menu with checkboxes for multi-selection.\n * - **Flyout:** Hierarchical/flyout menu for nested actions.\n * - **Multi:** Multi-column menu for large sets of options.\n * - **MultiWithSubtitles:** Multi-column menu with grouped options and subtitles.\n * - See `ContextMenuType` enum for all supported menu types.\n *\n * ### Usage Guidelines\n * Use `obc-split-button` when you want to provide a primary action alongside a set of related secondary actions or filters, without overwhelming the main UI. Ideal for toolbars, filter bars, or any context where a default action is common but alternatives should be easily accessible. For example, use it for \"Save\" (primary) with \"Save As...\" and \"Export\" (dropdown), or for filter controls with quick presets.\n *\n * - Prefer this component over a standalone dropdown when a default action is expected to be used frequently.\n * - For menus with many options, use multi-column or grouped variants for better organization.\n * - If only a single action is needed, use a standard `<obc-button>` instead.\n * - For persistent or always-visible lists of actions, consider a toolbar or action list.\n * - **TODO(designer):** Confirm best practices for when to use multi-select vs. single-select, and any recommended limits on number of options or columns.\n *\n * ### Slots\n * | Slot Name | Renders When... | Purpose |\n * |-----------------|---------------------|-----------------------------------------------------|\n * | `icon` | `hasIcon` is true | Leading icon in the primary button (e.g., `<obi-placeholder></obi-placeholder>`) |\n * | `dropdown-icon` | Always | Icon of the dropdown button; the chevron when empty |\n *\n * ### Events\n * - `click` – Fired when either the primary or dropdown button is clicked. The event detail includes `{action: 'primary' | 'dropdown'}` to distinguish which part was activated.\n * - `change` – Fired when the menu selection changes. The event detail includes `{selectedValues, selectedOptions}`.\n *\n * ### Keyboard\n * The primary half is a plain button. The dropdown half follows the\n * [APG Menu Button](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/):\n * `Enter` and `Space` open the menu, `ArrowDown` and `Home` open it on the\n * first item, `ArrowUp` and `End` on the last, and `Escape` closes it and\n * returns focus to the dropdown half. The menu is `obc-context-menu-input`.\n *\n * Left out: `Enter` and `Space` land on the selected item rather than the\n * first, so a reopened selection menu starts where the user left it.\n *\n * ### Best Practices & Constraints\n * - Only use multi-select when the menu type and use case require it; otherwise, prefer single selection for clarity.\n * - Keep the primary action clear and distinct from dropdown actions.\n * - For accessibility, ensure all menu options have clear labels and, if using icons, provide appropriate alt text or aria-labels.\n * - Avoid overloading the dropdown with too many options; group or paginate if necessary.\n * - The dropdown menu closes automatically when an option is selected (unless it is a group/flyout parent).\n * - The component manages focus and pointer events to ensure proper menu closing when clicking outside.\n * - **TODO(designer):** Specify recommended icon usage, menu title conventions, and any animation/timing guidelines for menu opening/closing.\n *\n * ### Example:\n * ```html\n * <obc-split-button\n * label=\"Save\"\n * .options=${[\n * {value: 'save-as', label: 'Save As...'},\n * {value: 'export', label: 'Export'},\n * ]}\n * hasIcon\n * >\n * <obi-placeholder slot=\"icon\"></obi-placeholder>\n * </obc-split-button>\n * ```\n * In this example, the split button shows a \"Save\" action with a leading icon, and a dropdown menu with \"Save As...\" and \"Export\" options.\n *\n * @property label - The label displayed on the main (primary) button.\n * @property hasIcon - Whether the main button should show a leading icon slot.\n * When true, content in the `icon` slot is rendered before the label.\n * @property options - Array of menu options for the dropdown.\n * Each option should be a `ContextMenuOption` object.\n * For grouped or multi-column menus, use `columnGroups` instead.\n * @property selectedValues - Array of currently selected option values in the dropdown.\n * Used to control the checked/selected state of menu items.\n * @property menuType - The variant type of context menu to display in the dropdown.\n * Accepts values from the `ContextMenuType` enum (e.g., 'regular', 'checkboxes', 'flyout', 'multi', 'multiWithSubtitles').\n * @property multiSelect - Whether multiple selections are allowed in the dropdown.\n * If true, users can select more than one option (e.g., for checkboxes or multi-column).\n * @property selectPerGroup - Allows single selection per group/column (matches context-menu-input).\n * When true, only one option can be selected per group/column.\n * @property itemsPerColumn - Number of items per column in multi-column layouts.\n * Used when `menuType` is 'multi' or 'multiWithSubtitles'.\n * @availableWhen itemsPerColumn menuType in [Multi, MultiWithSubtitles]\n * @property hasTitleBar - Whether to show a title bar with close button in the dropdown.\n * When true, a title bar appears at the top of the menu.\n * @property menuTitle - Title text for the dropdown menu.\n * Displayed in the title bar when `hasTitleBar` is true.\n * @availableWhen menuTitle hasTitleBar==true\n * @property fullWidth - Whether the split button should fill the full width of its container.\n * When true, the component stretches horizontally.\n * @property disabled - Whether both parts of the button are disabled.\n * When true, disables both the primary and dropdown buttons.\n * @property primaryDisabled - Disables the primary button alone, for an action the user\n * cannot take right now while the menu stays in use, for example to ask for the access\n * the action needs.\n * @availableWhen primaryDisabled disabled==false\n * @property dropdownDisabled - Disables the dropdown button alone, leaving the primary action.\n * @availableWhen dropdownDisabled disabled==false\n * @property openTop - Open context menu dropdown above (`true`) or below (`false`) the button.\n * Useful for placement near the bottom of the viewport.\n * @property openLeft - Extend the menu to the left of the dropdown button (`true`), its right\n * edge on the button's right edge, instead of to the right. For a button near the right\n * edge of its container; combines with `openTop`.\n * @property columnGroups - Array of column group definitions for multi-column/grouped menus.\n * Use instead of `options` for grouped or subtitle layouts.\n * @availableWhen columnGroups menuType==MultiWithSubtitles\n * @property dropdownLabel - Accessible name of the dropdown button; the chevron carries none.\n * @slot icon - Leading icon for the primary button (shown when `hasIcon` is true)\n * @slot dropdown-icon - Icon of the dropdown button; the chevron when empty.\n * @fires {ObcSplitButtonClickEvent} click - Fired when the primary or dropdown button is clicked.\n * @fires {ObcSplitButtonChangeEvent} change - Fired when the dropdown menu selection changes.\n * @beta\n */\n@customElement('obc-split-button')\nexport class ObcSplitButton extends LitElement {\n @property({type: String}) label = 'Split Button';\n\n @property({type: Boolean}) hasIcon = false;\n\n @property({type: Array}) options: ContextMenuOption[] = [];\n\n @property({type: Array}) selectedValues: string[] = [];\n\n @property({type: String}) menuType: ContextMenuType = ContextMenuType.Regular;\n\n @property({type: Boolean}) multiSelect?: boolean;\n\n @property({type: Boolean}) selectPerGroup?: boolean;\n\n @property({type: Number}) itemsPerColumn: number = 5;\n\n @property({type: Boolean}) hasTitleBar = false;\n\n @property({type: String}) menuTitle = '';\n\n @property({type: String}) dropdownLabel = 'More options';\n\n @property({type: Boolean}) fullWidth = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Boolean}) primaryDisabled = false;\n\n @property({type: Boolean}) dropdownDisabled = false;\n\n @property({type: Boolean}) openTop = false;\n\n @property({type: Boolean}) openLeft = false;\n\n @property({type: Array}) columnGroups: ColumnGroup[] = [];\n\n @state() private isDropdownOpen = false;\n\n private restoreFocusOnClose = false;\n\n private menuFocusStrategy: 'first' | 'selected' | 'last' = 'selected';\n\n @query('obc-context-menu-input') private menu?: ObcContextMenuInput;\n\n @query('.dropdown-button') private dropdownButton?: HTMLElement;\n\n private get isPrimaryDisabled(): boolean {\n return this.disabled || this.primaryDisabled;\n }\n\n private get isDropdownDisabled(): boolean {\n return this.disabled || this.dropdownDisabled;\n }\n\n private handlePrimaryClick = (e: Event) => {\n e.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('click', {\n detail: {action: 'primary'},\n })\n );\n };\n\n private handleDropdownClick = (e: Event) => {\n e.stopPropagation();\n this.isDropdownOpen = !this.isDropdownOpen;\n this.dispatchEvent(\n new CustomEvent('click', {\n detail: {action: 'dropdown'},\n })\n );\n if (this.isDropdownOpen) {\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n window.removeEventListener('pointerdown', this.closeOnOutside);\n }\n };\n\n private async focusMenuAfterOpen() {\n await this.updateComplete;\n // The menu is created on open; its items can take focus only once it has\n // rendered them, which this host's own update does not wait for.\n await this.menu?.updateComplete;\n if (!this.isDropdownOpen) return;\n\n if (this.menuFocusStrategy === 'last') {\n this.menu?.focusLastItem();\n } else if (this.menuFocusStrategy === 'first') {\n this.menu?.focusFirstItem();\n } else {\n this.menu?.focusSelectedItem();\n }\n\n this.menuFocusStrategy = 'selected';\n }\n\n private handleDropdownKeydown = (event: KeyboardEvent) => {\n if (this.isDropdownDisabled) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.menuFocusStrategy = 'first';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusFirstItem();\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.menuFocusStrategy = 'last';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusLastItem();\n }\n break;\n case 'Home':\n event.preventDefault();\n this.menuFocusStrategy = 'first';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusFirstItem();\n }\n break;\n case 'End':\n event.preventDefault();\n this.menuFocusStrategy = 'last';\n if (!this.isDropdownOpen) {\n this.isDropdownOpen = true;\n window.addEventListener('pointerdown', this.closeOnOutside);\n void this.focusMenuAfterOpen();\n } else {\n this.menu?.focusLastItem();\n }\n break;\n default:\n break;\n }\n };\n\n private closeOnOutside = (e: Event) => {\n if (!this.contains(e.target as Node)) {\n this.isDropdownOpen = false;\n window.removeEventListener('pointerdown', this.closeOnOutside);\n }\n };\n\n private handleMenuItemClick = (e: CustomEvent) => {\n const {option} = e.detail;\n // For flyout, only close if it's a leaf (not a group)\n if (\n this.menuType === ContextMenuType.Flyout &&\n option.children &&\n option.children.length\n ) {\n return; // do not close if it's a group\n }\n // Close for all other options (including flyout leaves)\n this.handleMenuClose();\n };\n\n private get isMultiSelect(): boolean {\n if (this.multiSelect !== undefined) return this.multiSelect;\n return [\n ContextMenuType.Checkboxes,\n ContextMenuType.NestedCheckboxes,\n ContextMenuType.Multi,\n ContextMenuType.MultiWithSubtitles,\n ].includes(this.menuType);\n }\n\n private handleMenuChange(\n e: CustomEvent<{\n selectedValues: string[];\n selectedOptions: ContextMenuOption[];\n }>\n ) {\n this.selectedValues = e.detail.selectedValues;\n\n this.dispatchEvent(new CustomEvent('change', {detail: e.detail}));\n this.handleMenuClose();\n }\n\n private handleMenuClose = () => {\n this.restoreFocusOnClose = true;\n this.isDropdownOpen = false;\n window.removeEventListener('pointerdown', this.closeOnOutside);\n queueMicrotask(() => {\n if (this.restoreFocusOnClose) {\n this.restoreFocusOnClose = false;\n this.dropdownButton?.focus();\n }\n });\n };\n\n override disconnectedCallback() {\n window.removeEventListener('pointerdown', this.closeOnOutside);\n super.disconnectedCallback();\n }\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n 'full-width': this.fullWidth,\n 'is-open': this.isDropdownOpen,\n 'open-top': this.openTop,\n 'open-left': this.openLeft,\n })}\n >\n <obc-button\n class=\"primary-button\"\n .variant=${'normal'}\n .segmentPosition=${segmentPosition.start}\n .showLeadingIcon=${this.hasIcon}\n .disabled=${this.isPrimaryDisabled}\n @click=${this.handlePrimaryClick}\n .fullWidth=${this.fullWidth}\n >\n ${\n this.hasIcon\n ? html`<slot name=\"icon\" slot=\"leading-icon\"></slot>`\n : nothing\n }\n ${this.label}\n </obc-button>\n\n <obc-icon-button\n class=\"dropdown-button\"\n .variant=${'normal'}\n .cornerRight=${true}\n .disabled=${this.isDropdownDisabled}\n .activated=${this.isDropdownOpen}\n aria-label=${this.dropdownLabel}\n @click=${this.handleDropdownClick}\n @keydown=${this.handleDropdownKeydown}\n aria-expanded=${this.isDropdownOpen}\n aria-haspopup=\"menu\"\n >\n <slot name=\"dropdown-icon\">\n <obi-arrow-flyout-google\n aria-hidden=\"true\"\n ></obi-arrow-flyout-google>\n </slot>\n </obc-icon-button>\n\n <!-- Context Menu -->\n ${\n this.isDropdownOpen && this.options.length > 0\n ? html`\n <obc-context-menu-input\n class=\"positioned-menu\"\n .options=${this.options}\n .selectedValues=${this.selectedValues}\n .type=${this.menuType}\n .multiSelect=${this.isMultiSelect}\n .selectPerGroup=${true}\n .hasTitleBar=${this.hasTitleBar}\n .title=${this.menuTitle}\n .columnGroups=${this.columnGroups}\n .itemsPerColumn=${this.itemsPerColumn}\n @change=${this.handleMenuChange}\n @close=${this.handleMenuClose}\n @item-click=${this.handleMenuItemClick}\n /></obc-context-menu-input>\n `\n : nothing\n }\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-split-button': ObcSplitButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA4JO,IAAM,iBAAN,MAAM,uBAAuB,WAAW;;;EACX,KAAA,QAAA;EAEG,KAAA,UAAA;EAEmB,KAAA,UAAA,CAAC;EAEL,KAAA,iBAAA,CAAC;EAEC,KAAA,WAAA,gBAAgB;EAMnB,KAAA,iBAAA;EAEV,KAAA,cAAA;EAEH,KAAA,YAAA;EAEI,KAAA,gBAAA;EAEH,KAAA,YAAA;EAED,KAAA,WAAA;EAEO,KAAA,kBAAA;EAEC,KAAA,mBAAA;EAET,KAAA,UAAA;EAEC,KAAA,WAAA;EAEiB,KAAA,eAAA,CAAC;EAEtB,KAAA,iBAAA;EAEJ,KAAA,sBAAA;EAE6B,KAAA,oBAAA;EAc7B,KAAA,sBAAA,MAAa;GACzC,EAAE,gBAAgB;GAClB,KAAK,cACH,IAAI,YAAY,SAAS,EACvB,QAAQ,EAAC,QAAQ,UAAS,EAC5B,CAAC,CACH;EACF;EAE+B,KAAA,uBAAA,MAAa;GAC1C,EAAE,gBAAgB;GAClB,KAAK,iBAAiB,CAAC,KAAK;GAC5B,K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