@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.130 → 2.0.0-next.131

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.
@@ -54878,8 +54878,15 @@
54878
54878
  "declarations": [
54879
54879
  {
54880
54880
  "kind": "class",
54881
- "description": "`<obc-modal-window>` – A modular dialog component for displaying content and capturing user actions.\n\nThe `obc-modal-window` provides a structured layout with a header (title and leading icon), a content area, and a footer with action buttons (Cancel, Done, and an optional custom action).\n\n### Features\n- **Flexible Sizing:** Supports `small`, `medium`, and `large` sizes to accommodate different content amounts.\n- **Header Customization:** Includes a title slot and an optional leading icon slot.\n- **Action Management:** Built-in \"Cancel\" and \"Done\" buttons, plus an optional additional action button.\n- **Responsive Actions:** Action buttons automatically switch between horizontal and vertical layouts based on the modal size.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|---------------|----------------------------|----------------------------------------------------|\n| leading-icon | `hasLeadingIcon` is true | Icon displayed before the title |\n| title | Always | Main heading text for the modal |\n| content | Always | Primary content area of the modal |\n| option-label | `hasOptionalAction` is true | Label for the optional action button |\n| cancel-label | `hasCancelAction` is true | Label for the cancel button |\n| done-label | Always | Label for the primary (done) button |\n\n### Properties\n- `size` (ObcModalWindowSize): Controls the width and layout of the modal. Default is `large`.\n- `hasOptionalAction` (boolean): Shows an additional action button when true.\n- `hasLeadingIcon` (boolean): Shows the leading icon slot when true.\n- `hasCancelAction` (boolean): Shows the footer cancel button when true. Default is `true`.\n- `hasCloseAction` (boolean): Shows the header close (X) button when true. Default is `true`.\n\n### Events\n- `close-click`: Fired when the close (X) button in the header is clicked.\n- `cancel-click`: Fired when the cancel button is clicked.\n- `done-click`: Fired when the done button is clicked.\n- `option-click`: Fired when the optional action button is clicked.\n\n### Example:\n```html\n<obc-modal-window size=\"medium\" hasLeadingIcon>\n <span slot=\"leading-icon\"><obi-info></obi-info></span>\n <span slot=\"title\">Settings</span>\n <div slot=\"content\">\n <p>Adjust your preferences here.</p>\n </div>\n <span slot=\"cancel-label\">Discard</span>\n <span slot=\"done-label\">Save</span>\n</obc-modal-window>\n```",
54881
+ "description": "`<obc-modal-window>` – A modular dialog component for displaying content and capturing user actions.\n\nThe `obc-modal-window` provides a structured layout with a header (title and leading icon), a content area, and a footer with action buttons (Cancel, Done, and an optional custom action).\n\n### Features\n- **Flexible Sizing:** Supports `small`, `medium`, and `large` sizes to accommodate different content amounts.\n- **Header Customization:** Includes a title slot and an optional leading icon slot.\n- **Action Management:** Built-in \"Cancel\" and \"Done\" buttons, plus an optional additional action button.\n- **Responsive Actions:** Action buttons automatically switch between horizontal and vertical layouts based on the modal size.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|---------------|----------------------------|----------------------------------------------------|\n| leading-icon | `hasLeadingIcon` is true | Icon displayed before the title |\n| title | Always | Main heading text for the modal |\n| content | Always | Primary content area of the modal |\n| option-label | `hasOptionalAction` is true | Label for the optional action button |\n| cancel-label | `hasCancelAction` is true | Label for the cancel button |\n| done-label | Always | Label for the primary (done) button |\n\n### Properties\n- `size` (ObcModalWindowSize): Controls the width and layout of the modal. Default is `large`.\n- `hasOptionalAction` (boolean): Shows an additional action button when true.\n- `hasLeadingIcon` (boolean): Shows the leading icon slot when true.\n- `hasCancelAction` (boolean): Shows the footer cancel button when true. Default is `true`.\n- `hasCloseAction` (boolean): Shows the header close (X) button when true. Default is `true`.\n\n### Events\n- `close-click`: Fired when the close (X) button in the header is clicked.\n- `cancel-click`: Fired when the cancel button is clicked.\n- `done-click`: Fired when the done button is clicked.\n- `option-click`: Fired when the optional action button is clicked.\n\n### Sizing\nBy default the modal is as tall as its content, capped at `90vh`. To give it\nan explicit height, set the `--obc-modal-window-height` custom property on\nthe element — either a fixed value (`--obc-modal-window-height: 360px`) or\n`100%` to fill a host element that is sized by its container. The `90vh` cap\nalways applies, and the content area scrolls when the content does not fit.\n\n### Example:\n```html\n<obc-modal-window size=\"medium\" hasLeadingIcon>\n <span slot=\"leading-icon\"><obi-info></obi-info></span>\n <span slot=\"title\">Settings</span>\n <div slot=\"content\">\n <p>Adjust your preferences here.</p>\n </div>\n <span slot=\"cancel-label\">Discard</span>\n <span slot=\"done-label\">Save</span>\n</obc-modal-window>\n```",
54882
54882
  "name": "ObcModalWindow",
54883
+ "cssProperties": [
54884
+ {
54885
+ "description": "Height of the modal window. Defaults to content height (capped at 90vh); set a fixed value or `100%` to size the modal externally.",
54886
+ "name": "--obc-modal-window-height",
54887
+ "default": "auto"
54888
+ }
54889
+ ],
54883
54890
  "slots": [
54884
54891
  {
54885
54892
  "description": "Slot for an icon to appear before the title (shown when `hasLeadingIcon` is true)",
@@ -58608,7 +58615,7 @@
58608
58615
  "declarations": [
58609
58616
  {
58610
58617
  "kind": "class",
58611
- "description": "`<obc-progress-bar>` – A status-only progress indicator (progress meter / spinner /\nloading indicator) for visualizing how far a task has advanced.\n\nDisplays the progress of an ongoing operation either as a horizontal bar or as a circular\nring. Unlike `<obc-progress-button>`, this is a passive, non-interactive display element:\nit shows status only and emits no events. Use it to communicate determinate progress\n(a known percentage) or an open-ended \"working\" state.\n\n## Features / Variants\n\n**Layout types (`type`)**\n- **Linear** (default): A horizontal bar with an optional value label above and an optional\n description below. Best inline within content where horizontal space is available.\n- **Circular**: A ring with centered content. Best for compact, icon-led, or centered status.\n\n**Linear modes (`mode`)**\n- **Determinate** (default): Fills proportionally to `value` (0–100); the label shows the\n rounded percentage.\n- **Indeterminate**: Animated, looping fill for work of unknown duration; the label shows\n \"Loading\".\n\n**Circular states (`circularState`)**\n- **Determinate**: Ring fills to `value`, with the rounded number (and optional `%` unit) centered.\n- **Indeterminate**: Animated ring with the `icon` slot centered.\n- **Icon**: A full ring acting as a frame around the centered `icon` slot (defaults to a placeholder).\n\n**Circular progressive indeterminate (`progressiveIndeterminate`)**\n- A spinning arc that also grows with `value`, blending an indeterminate animation with a\n numeric readout. Takes precedence over `circularState` when enabled.\n\n## Usage Guidelines\n\nUse a progress bar to report the status of a task the user is waiting on. Choose\n**determinate** when the completion percentage is known and **indeterminate** when it is not.\nPick the **linear** type for inline, full-width contexts and the **circular** type for compact\nor centered placements. Because this component is display-only, pair it with a separate\ncontrol (such as `<obc-progress-button>`) when the user also needs to trigger or cancel the action.\n\n## Slots\n\n| Slot | Renders When... | Purpose |\n| ------ | ----------------------------------------------------------- | ----------------------------------------- |\n| `icon` | `type=\"circular\"` && `circularState` is `indeterminate` or `icon` | Centered icon inside the circular ring. |",
58618
+ "description": "`<obc-progress-bar>` – A status-only progress indicator (progress meter / spinner /\nloading indicator) for visualizing how far a task has advanced.\n\nDisplays the progress of an ongoing operation either as a horizontal bar or as a circular\nring. Unlike `<obc-progress-button>`, this is a passive, non-interactive display element:\nit shows status only and emits no events. Use it to communicate determinate progress\n(a known percentage) or an open-ended \"working\" state.\n\n## Features / Variants\n\n**Layout types (`type`)**\n- **Linear** (default): A horizontal bar with an optional value label above and an optional\n description below. Best inline within content where horizontal space is available.\n- **Circular**: A ring with centered content. Best for compact, icon-led, or centered status.\n\n**Linear modes (`mode`)**\n- **Determinate** (default): Fills proportionally to `value` (0–100); the label shows the\n rounded percentage.\n- **Indeterminate**: Animated, looping fill for work of unknown duration; the label shows\n \"Loading\".\n\n**Color priority (`priority`)**\n- **Enhanced** (default): Blue fill, for a bar that reads as the primary value.\n- **Regular**: Neutral gray fill, for a bar that should recede as ancillary status.\n\n**Circular states (`circularState`)**\n- **Determinate**: Ring fills to `value`, with the rounded number (and optional `%` unit) centered.\n- **Indeterminate**: Animated ring with the `icon` slot centered.\n- **Icon**: A full ring acting as a frame around the centered `icon` slot (defaults to a placeholder).\n\n**Circular progressive indeterminate (`progressiveIndeterminate`)**\n- A spinning arc that also grows with `value`, blending an indeterminate animation with a\n numeric readout. Takes precedence over `circularState` when enabled.\n\n## Usage Guidelines\n\nUse a progress bar to report the status of a task the user is waiting on. Choose\n**determinate** when the completion percentage is known and **indeterminate** when it is not.\nPick the **linear** type for inline, full-width contexts and the **circular** type for compact\nor centered placements. Because this component is display-only, pair it with a separate\ncontrol (such as `<obc-progress-button>`) when the user also needs to trigger or cancel the action.\n\n## Slots\n\n| Slot | Renders When... | Purpose |\n| ------ | ----------------------------------------------------------- | ----------------------------------------- |\n| `icon` | `type=\"circular\"` && `circularState` is `indeterminate` or `icon` | Centered icon inside the circular ring. |",
58612
58619
  "name": "ObcProgressBar",
58613
58620
  "slots": [
58614
58621
  {
@@ -58644,6 +58651,15 @@
58644
58651
  "description": "Circular display state: `determinate` (numeric ring), `indeterminate` (animated ring with\nicon), or `icon` (ring framing the icon slot).",
58645
58652
  "attribute": "circularState"
58646
58653
  },
58654
+ {
58655
+ "kind": "field",
58656
+ "name": "priority",
58657
+ "type": {
58658
+ "text": "Priority"
58659
+ },
58660
+ "description": "Color emphasis of the bar fill: `regular` (gray) or `enhanced` (blue).",
58661
+ "attribute": "priority"
58662
+ },
58647
58663
  {
58648
58664
  "kind": "field",
58649
58665
  "name": "value",
@@ -58780,6 +58796,14 @@
58780
58796
  "description": "Circular display state: `determinate` (numeric ring), `indeterminate` (animated ring with\nicon), or `icon` (ring framing the icon slot).",
58781
58797
  "fieldName": "circularState"
58782
58798
  },
58799
+ {
58800
+ "name": "priority",
58801
+ "type": {
58802
+ "text": "Priority"
58803
+ },
58804
+ "description": "Color emphasis of the bar fill: `regular` (gray) or `enhanced` (blue).",
58805
+ "fieldName": "priority"
58806
+ },
58783
58807
  {
58784
58808
  "name": "value",
58785
58809
  "type": {
@@ -58862,6 +58886,14 @@
58862
58886
  }
58863
58887
  ],
58864
58888
  "exports": [
58889
+ {
58890
+ "kind": "js",
58891
+ "name": "Priority",
58892
+ "declaration": {
58893
+ "name": "Priority",
58894
+ "module": "src/components/progress-bar/progress-bar.ts"
58895
+ }
58896
+ },
58865
58897
  {
58866
58898
  "kind": "js",
58867
58899
  "name": "ObcProgressBar",
@@ -7,6 +7,10 @@ const componentStyle = css`* {
7
7
  box-sizing: border-box;
8
8
  }
9
9
 
10
+ :host {
11
+ display: block;
12
+ }
13
+
10
14
  .wrapper {
11
15
  box-sizing: border-box;
12
16
  background: var(--container-background-color);
@@ -18,6 +22,7 @@ const componentStyle = css`* {
18
22
  display: flex;
19
23
  flex-direction: column;
20
24
  width: 100%;
25
+ height: var(--obc-modal-window-height, auto);
21
26
  max-height: 90vh;
22
27
  }
23
28
 
@@ -1 +1 @@
1
- {"version":3,"file":"modal-window.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"modal-window.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -47,6 +47,13 @@ export declare enum ObcModalWindowSize {
47
47
  * - `done-click`: Fired when the done button is clicked.
48
48
  * - `option-click`: Fired when the optional action button is clicked.
49
49
  *
50
+ * ### Sizing
51
+ * By default the modal is as tall as its content, capped at `90vh`. To give it
52
+ * an explicit height, set the `--obc-modal-window-height` custom property on
53
+ * the element — either a fixed value (`--obc-modal-window-height: 360px`) or
54
+ * `100%` to fill a host element that is sized by its container. The `90vh` cap
55
+ * always applies, and the content area scrolls when the content does not fit.
56
+ *
50
57
  * ### Example:
51
58
  * ```html
52
59
  * <obc-modal-window size="medium" hasLeadingIcon>
@@ -71,6 +78,7 @@ export declare enum ObcModalWindowSize {
71
78
  * @slot option-label - Slot for the label of the optional action button (shown when `hasOptionalAction` is true)
72
79
  * @slot cancel-label - Slot for the label of the cancel button (shown when `hasCancelAction` is true)
73
80
  * @slot done-label - Slot for the label of the done button
81
+ * @cssprop [--obc-modal-window-height=auto] - Height of the modal window. Defaults to content height (capped at 90vh); set a fixed value or `100%` to size the modal externally.
74
82
  * @stable
75
83
  */
76
84
  export declare class ObcModalWindow extends LitElement {
@@ -1 +1 @@
1
- {"version":3,"file":"modal-window.d.ts","sourceRoot":"","sources":["../../../src/components/modal-window/modal-window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,+BAA+B,CAAC;AACvC,OAAO,kCAAkC,CAAC;AAE1C;;;;;GAKG;AACH,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C;;OAEG;IACuB,IAAI,qBAA4B;IAE1D;;OAEG;IACwB,iBAAiB,UAAS;IAErD;;OAEG;IACwB,cAAc,UAAS;IAElD;;OAEG;IAC0C,eAAe,UAAQ;IAEpE;;OAEG;IAC0C,cAAc,UAAQ;IAEnE,OAAO,CAAC,YAAY,CACiC;IAErD,OAAO,CAAC,aAAa,CACiC;IAEtD,OAAO,CAAC,WAAW,CAA2D;IAE9E,OAAO,CAAC,aAAa,CACiC;cAEnC,MAAM;IAiFzB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"modal-window.d.ts","sourceRoot":"","sources":["../../../src/components/modal-window/modal-window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,+BAA+B,CAAC;AACvC,OAAO,kCAAkC,CAAC;AAE1C;;;;;GAKG;AACH,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C;;OAEG;IACuB,IAAI,qBAA4B;IAE1D;;OAEG;IACwB,iBAAiB,UAAS;IAErD;;OAEG;IACwB,cAAc,UAAS;IAElD;;OAEG;IAC0C,eAAe,UAAQ;IAEpE;;OAEG;IAC0C,cAAc,UAAQ;IAEnE,OAAO,CAAC,YAAY,CACiC;IAErD,OAAO,CAAC,aAAa,CACiC;IAEtD,OAAO,CAAC,WAAW,CAA2D;IAE9E,OAAO,CAAC,aAAa,CACiC;cAEnC,MAAM;IAiFzB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"modal-window.js","sources":["../../../src/components/modal-window/modal-window.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport componentStyle from './modal-window.css?inline';\n\nimport '../button/button.js';\nimport '../icon-button/icon-button.js';\nimport '../../icons/icon-close-google.js';\n\n/**\n * Enum for modal window sizes.\n * - `small`: Compact size for minimal content.\n * - `medium`: Standard size for most content.\n * - `large`: Expanded size for complex content.\n */\nexport enum ObcModalWindowSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\n\n/**\n * `<obc-modal-window>` – A modular dialog component for displaying content and capturing user actions.\n *\n * The `obc-modal-window` provides a structured layout with a header (title and leading icon), a content area, and a footer with action buttons (Cancel, Done, and an optional custom action).\n *\n * ### Features\n * - **Flexible Sizing:** Supports `small`, `medium`, and `large` sizes to accommodate different content amounts.\n * - **Header Customization:** Includes a title slot and an optional leading icon slot.\n * - **Action Management:** Built-in \"Cancel\" and \"Done\" buttons, plus an optional additional action button.\n * - **Responsive Actions:** Action buttons automatically switch between horizontal and vertical layouts based on the modal size.\n *\n * ### Slots\n * | Slot Name | Renders When... | Purpose |\n * |---------------|----------------------------|----------------------------------------------------|\n * | leading-icon | `hasLeadingIcon` is true | Icon displayed before the title |\n * | title | Always | Main heading text for the modal |\n * | content | Always | Primary content area of the modal |\n * | option-label | `hasOptionalAction` is true | Label for the optional action button |\n * | cancel-label | `hasCancelAction` is true | Label for the cancel button |\n * | done-label | Always | Label for the primary (done) button |\n *\n * ### Properties\n * - `size` (ObcModalWindowSize): Controls the width and layout of the modal. Default is `large`.\n * - `hasOptionalAction` (boolean): Shows an additional action button when true.\n * - `hasLeadingIcon` (boolean): Shows the leading icon slot when true.\n * - `hasCancelAction` (boolean): Shows the footer cancel button when true. Default is `true`.\n * - `hasCloseAction` (boolean): Shows the header close (X) button when true. Default is `true`.\n *\n * ### Events\n * - `close-click`: Fired when the close (X) button in the header is clicked.\n * - `cancel-click`: Fired when the cancel button is clicked.\n * - `done-click`: Fired when the done button is clicked.\n * - `option-click`: Fired when the optional action button is clicked.\n *\n * ### Example:\n * ```html\n * <obc-modal-window size=\"medium\" hasLeadingIcon>\n * <span slot=\"leading-icon\"><obi-info></obi-info></span>\n * <span slot=\"title\">Settings</span>\n * <div slot=\"content\">\n * <p>Adjust your preferences here.</p>\n * </div>\n * <span slot=\"cancel-label\">Discard</span>\n * <span slot=\"done-label\">Save</span>\n * </obc-modal-window>\n * ```\n *\n * @fires {CustomEvent} close-click - Fired when the close button is clicked.\n * @fires {CustomEvent} cancel-click - Fired when the cancel button is clicked.\n * @fires {CustomEvent} done-click - Fired when the done button is clicked.\n * @fires {CustomEvent} option-click - Fired when the optional action button is clicked.\n *\n * @slot leading-icon - Slot for an icon to appear before the title (shown when `hasLeadingIcon` is true)\n * @slot title - Slot for the modal title text\n * @slot content - Slot for the main content area\n * @slot option-label - Slot for the label of the optional action button (shown when `hasOptionalAction` is true)\n * @slot cancel-label - Slot for the label of the cancel button (shown when `hasCancelAction` is true)\n * @slot done-label - Slot for the label of the done button\n * @stable\n */\n@customElement('obc-modal-window')\nexport class ObcModalWindow extends LitElement {\n /**\n * Controls the modal window size and action button layout.\n */\n @property({type: String}) size = ObcModalWindowSize.Large;\n\n /**\n * Whether to show an optional third action button.\n */\n @property({type: Boolean}) hasOptionalAction = false;\n\n /**\n * Whether to show the leading icon slot in the header.\n */\n @property({type: Boolean}) hasLeadingIcon = false;\n\n /**\n * Whether to show the footer cancel button.\n */\n @property({type: Boolean, attribute: false}) hasCancelAction = true;\n\n /**\n * Whether to show the header close (X) button.\n */\n @property({type: Boolean, attribute: false}) hasCloseAction = true;\n\n private onCloseClick = () =>\n this.dispatchEvent(new CustomEvent('close-click'));\n\n private onCancelClick = () =>\n this.dispatchEvent(new CustomEvent('cancel-click'));\n\n private onDoneClick = () => this.dispatchEvent(new CustomEvent('done-click'));\n\n private onOptionClick = () =>\n this.dispatchEvent(new CustomEvent('option-click'));\n\n protected override render() {\n const isLarge = this.size === ObcModalWindowSize.Large;\n const isMedium = this.size === ObcModalWindowSize.Medium;\n const isSmall = this.size === ObcModalWindowSize.Small;\n const stretchFooterActions = (isSmall || isMedium) && this.hasCancelAction;\n\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`size-${this.size}`]: true,\n })}\n >\n <div\n class=${classMap({\n 'title-container': true,\n 'without-close': !this.hasCloseAction,\n })}\n >\n <div class=\"title-content\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"label-container\">\n <slot name=\"title\">Title</slot>\n </div>\n </div>\n ${this.hasCloseAction\n ? html`<obc-icon-button variant=\"flat\" @click=${this.onCloseClick}>\n <obi-close-google></obi-close-google>\n </obc-icon-button>`\n : nothing}\n <div class=\"divider\"></div>\n </div>\n\n <div class=\"content-area\">\n <slot name=\"content\"></slot>\n </div>\n\n <div class=\"action-container\">\n <div class=\"divider\"></div>\n ${this.hasOptionalAction\n ? html`<div class=\"optional-action-container\">\n <obc-button @click=${this.onOptionClick} .fullWidth=${true}>\n <slot name=\"option-label\">Option</slot>\n </obc-button>\n </div>`\n : nothing}\n\n <div\n class=${classMap({\n 'primary-action-container': true,\n 'primary-action-horizontal':\n isLarge || isMedium || !this.hasCancelAction,\n 'primary-action-vertical': isSmall && this.hasCancelAction,\n 'without-cancel': !this.hasCancelAction,\n })}\n >\n ${this.hasCancelAction\n ? html`<obc-button\n @click=${this.onCancelClick}\n .fullWidth=${stretchFooterActions}\n >\n <slot name=\"cancel-label\">Cancel</slot>\n </obc-button>`\n : nothing}\n <obc-button\n variant=\"raised\"\n @click=${this.onDoneClick}\n .fullWidth=${stretchFooterActions}\n >\n <slot name=\"done-label\">Done</slot>\n </obc-button>\n </div>\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-modal-window': ObcModalWindow;\n }\n}\n"],"names":["ObcModalWindowSize"],"mappings":";;;;;;;;;;;;;;;;;;AAgBO,IAAK,uCAAAA,wBAAL;AACLA,sBAAA,OAAA,IAAQ;AACRA,sBAAA,QAAA,IAAS;AACTA,sBAAA,OAAA,IAAQ;AAHE,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;AAmEL,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA;AAIqB,SAAA,OAAO;AAKN,SAAA,oBAAoB;AAKpB,SAAA,iBAAiB;AAKC,SAAA,kBAAkB;AAKlB,SAAA,iBAAiB;AAE9D,SAAQ,eAAe,MACrB,KAAK,cAAc,IAAI,YAAY,aA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AW;AAAA,2BACZ,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7C;AAGF;AAvHa,eAsHK,SAAS,UAAU,cAAc;AAlHvB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAJb,eAIe,WAAA,QAAA,CAAA;AAKC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GATd,eASgB,WAAA,qBAAA,CAAA;AAKA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAdd,eAcgB,WAAA,kBAAA,CAAA;AAKkB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAnBhC,eAmBkC,WAAA,mBAAA,CAAA;AAKA,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAxBhC,eAwBkC,WAAA,kBAAA,CAAA;AAxBlC,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
1
+ {"version":3,"file":"modal-window.js","sources":["../../../src/components/modal-window/modal-window.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport componentStyle from './modal-window.css?inline';\n\nimport '../button/button.js';\nimport '../icon-button/icon-button.js';\nimport '../../icons/icon-close-google.js';\n\n/**\n * Enum for modal window sizes.\n * - `small`: Compact size for minimal content.\n * - `medium`: Standard size for most content.\n * - `large`: Expanded size for complex content.\n */\nexport enum ObcModalWindowSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\n\n/**\n * `<obc-modal-window>` – A modular dialog component for displaying content and capturing user actions.\n *\n * The `obc-modal-window` provides a structured layout with a header (title and leading icon), a content area, and a footer with action buttons (Cancel, Done, and an optional custom action).\n *\n * ### Features\n * - **Flexible Sizing:** Supports `small`, `medium`, and `large` sizes to accommodate different content amounts.\n * - **Header Customization:** Includes a title slot and an optional leading icon slot.\n * - **Action Management:** Built-in \"Cancel\" and \"Done\" buttons, plus an optional additional action button.\n * - **Responsive Actions:** Action buttons automatically switch between horizontal and vertical layouts based on the modal size.\n *\n * ### Slots\n * | Slot Name | Renders When... | Purpose |\n * |---------------|----------------------------|----------------------------------------------------|\n * | leading-icon | `hasLeadingIcon` is true | Icon displayed before the title |\n * | title | Always | Main heading text for the modal |\n * | content | Always | Primary content area of the modal |\n * | option-label | `hasOptionalAction` is true | Label for the optional action button |\n * | cancel-label | `hasCancelAction` is true | Label for the cancel button |\n * | done-label | Always | Label for the primary (done) button |\n *\n * ### Properties\n * - `size` (ObcModalWindowSize): Controls the width and layout of the modal. Default is `large`.\n * - `hasOptionalAction` (boolean): Shows an additional action button when true.\n * - `hasLeadingIcon` (boolean): Shows the leading icon slot when true.\n * - `hasCancelAction` (boolean): Shows the footer cancel button when true. Default is `true`.\n * - `hasCloseAction` (boolean): Shows the header close (X) button when true. Default is `true`.\n *\n * ### Events\n * - `close-click`: Fired when the close (X) button in the header is clicked.\n * - `cancel-click`: Fired when the cancel button is clicked.\n * - `done-click`: Fired when the done button is clicked.\n * - `option-click`: Fired when the optional action button is clicked.\n *\n * ### Sizing\n * By default the modal is as tall as its content, capped at `90vh`. To give it\n * an explicit height, set the `--obc-modal-window-height` custom property on\n * the element — either a fixed value (`--obc-modal-window-height: 360px`) or\n * `100%` to fill a host element that is sized by its container. The `90vh` cap\n * always applies, and the content area scrolls when the content does not fit.\n *\n * ### Example:\n * ```html\n * <obc-modal-window size=\"medium\" hasLeadingIcon>\n * <span slot=\"leading-icon\"><obi-info></obi-info></span>\n * <span slot=\"title\">Settings</span>\n * <div slot=\"content\">\n * <p>Adjust your preferences here.</p>\n * </div>\n * <span slot=\"cancel-label\">Discard</span>\n * <span slot=\"done-label\">Save</span>\n * </obc-modal-window>\n * ```\n *\n * @fires {CustomEvent} close-click - Fired when the close button is clicked.\n * @fires {CustomEvent} cancel-click - Fired when the cancel button is clicked.\n * @fires {CustomEvent} done-click - Fired when the done button is clicked.\n * @fires {CustomEvent} option-click - Fired when the optional action button is clicked.\n *\n * @slot leading-icon - Slot for an icon to appear before the title (shown when `hasLeadingIcon` is true)\n * @slot title - Slot for the modal title text\n * @slot content - Slot for the main content area\n * @slot option-label - Slot for the label of the optional action button (shown when `hasOptionalAction` is true)\n * @slot cancel-label - Slot for the label of the cancel button (shown when `hasCancelAction` is true)\n * @slot done-label - Slot for the label of the done button\n * @cssprop [--obc-modal-window-height=auto] - Height of the modal window. Defaults to content height (capped at 90vh); set a fixed value or `100%` to size the modal externally.\n * @stable\n */\n@customElement('obc-modal-window')\nexport class ObcModalWindow extends LitElement {\n /**\n * Controls the modal window size and action button layout.\n */\n @property({type: String}) size = ObcModalWindowSize.Large;\n\n /**\n * Whether to show an optional third action button.\n */\n @property({type: Boolean}) hasOptionalAction = false;\n\n /**\n * Whether to show the leading icon slot in the header.\n */\n @property({type: Boolean}) hasLeadingIcon = false;\n\n /**\n * Whether to show the footer cancel button.\n */\n @property({type: Boolean, attribute: false}) hasCancelAction = true;\n\n /**\n * Whether to show the header close (X) button.\n */\n @property({type: Boolean, attribute: false}) hasCloseAction = true;\n\n private onCloseClick = () =>\n this.dispatchEvent(new CustomEvent('close-click'));\n\n private onCancelClick = () =>\n this.dispatchEvent(new CustomEvent('cancel-click'));\n\n private onDoneClick = () => this.dispatchEvent(new CustomEvent('done-click'));\n\n private onOptionClick = () =>\n this.dispatchEvent(new CustomEvent('option-click'));\n\n protected override render() {\n const isLarge = this.size === ObcModalWindowSize.Large;\n const isMedium = this.size === ObcModalWindowSize.Medium;\n const isSmall = this.size === ObcModalWindowSize.Small;\n const stretchFooterActions = (isSmall || isMedium) && this.hasCancelAction;\n\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`size-${this.size}`]: true,\n })}\n >\n <div\n class=${classMap({\n 'title-container': true,\n 'without-close': !this.hasCloseAction,\n })}\n >\n <div class=\"title-content\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"label-container\">\n <slot name=\"title\">Title</slot>\n </div>\n </div>\n ${this.hasCloseAction\n ? html`<obc-icon-button variant=\"flat\" @click=${this.onCloseClick}>\n <obi-close-google></obi-close-google>\n </obc-icon-button>`\n : nothing}\n <div class=\"divider\"></div>\n </div>\n\n <div class=\"content-area\">\n <slot name=\"content\"></slot>\n </div>\n\n <div class=\"action-container\">\n <div class=\"divider\"></div>\n ${this.hasOptionalAction\n ? html`<div class=\"optional-action-container\">\n <obc-button @click=${this.onOptionClick} .fullWidth=${true}>\n <slot name=\"option-label\">Option</slot>\n </obc-button>\n </div>`\n : nothing}\n\n <div\n class=${classMap({\n 'primary-action-container': true,\n 'primary-action-horizontal':\n isLarge || isMedium || !this.hasCancelAction,\n 'primary-action-vertical': isSmall && this.hasCancelAction,\n 'without-cancel': !this.hasCancelAction,\n })}\n >\n ${this.hasCancelAction\n ? html`<obc-button\n @click=${this.onCancelClick}\n .fullWidth=${stretchFooterActions}\n >\n <slot name=\"cancel-label\">Cancel</slot>\n </obc-button>`\n : nothing}\n <obc-button\n variant=\"raised\"\n @click=${this.onDoneClick}\n .fullWidth=${stretchFooterActions}\n >\n <slot name=\"done-label\">Done</slot>\n </obc-button>\n </div>\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-modal-window': ObcModalWindow;\n }\n}\n"],"names":["ObcModalWindowSize"],"mappings":";;;;;;;;;;;;;;;;;;AAgBO,IAAK,uCAAAA,wBAAL;AACLA,sBAAA,OAAA,IAAQ;AACRA,sBAAA,QAAA,IAAS;AACTA,sBAAA,OAAA,IAAQ;AAHE,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;AA2EL,IAAM,iBAAN,cAA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WAAW,KAAK;AAAA,MAC3C,kBAAkB,CAAC,KAAK;AAAA,IAAA,CACzB,CAAC;AAAA;AAAA,cAEA,KAAK,kBACH;AAAA,2BACW,KAAK,aAAa;AAAA,+BACd,oBAAoB;AAAA;AAAA;AAAA,iCAInC,OAAO;AAAA;AAAA;AAAA,uBAGA,KAAK,WAAW;AAAA,2BACZ,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7C;AAGF;AAvHa,eAsHK,SAAS,UAAU,cAAc;AAlHvB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAJb,eAIe,WAAA,QAAA,CAAA;AAKC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GATd,eASgB,WAAA,qBAAA,CAAA;AAKA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAdd,eAcgB,WAAA,kBAAA,CAAA;AAKkB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAnBhC,eAmBkC,WAAA,mBAAA,CAAA;AAKA,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAxBhC,eAwBkC,WAAA,kBAAA,CAAA;AAxBlC,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
@@ -106,6 +106,10 @@ const componentStyle = css`* {
106
106
  transition: width 0.3s ease-in-out;
107
107
  }
108
108
 
109
+ .bar.priority-regular .loaded {
110
+ background-color: var(--instrument-regular-secondary-color);
111
+ }
112
+
109
113
  .indeterminate-track {
110
114
  position: absolute;
111
115
  top: 0;
@@ -117,6 +121,10 @@ const componentStyle = css`* {
117
121
  animation: indeterminate-slide 1.5s ease-in-out infinite;
118
122
  }
119
123
 
124
+ .bar.priority-regular .indeterminate-track {
125
+ background-color: var(--instrument-regular-secondary-color);
126
+ }
127
+
120
128
  @keyframes indeterminate-slide {
121
129
  0% {
122
130
  transform: translateX(-100%);
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"progress-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
+ import { Priority } from '../../navigation-instruments/types.js';
2
3
  import '../../icons/icon-placeholder.js';
4
+ export { Priority };
3
5
  export declare enum ProgressBarType {
4
6
  linear = "linear",
5
7
  circular = "circular"
@@ -35,6 +37,10 @@ export declare enum CircularProgressState {
35
37
  * - **Indeterminate**: Animated, looping fill for work of unknown duration; the label shows
36
38
  * "Loading".
37
39
  *
40
+ * **Color priority (`priority`)**
41
+ * - **Enhanced** (default): Blue fill, for a bar that reads as the primary value.
42
+ * - **Regular**: Neutral gray fill, for a bar that should recede as ancillary status.
43
+ *
38
44
  * **Circular states (`circularState`)**
39
45
  * - **Determinate**: Ring fills to `value`, with the rounded number (and optional `%` unit) centered.
40
46
  * - **Indeterminate**: Animated ring with the `icon` slot centered.
@@ -87,6 +93,11 @@ export declare class ObcProgressBar extends LitElement {
87
93
  * @availableWhen type==circular
88
94
  */
89
95
  circularState: CircularProgressState;
96
+ /**
97
+ * Color emphasis of the bar fill: `regular` (gray) or `enhanced` (blue).
98
+ * @availableWhen type==linear
99
+ */
100
+ priority: Priority;
90
101
  /** Progress percentage (0–100); clamped when rendered. */
91
102
  value: number;
92
103
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,OAAO,iCAAiC,CAAC;AAGzC,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;CAChC;AAED,oBAAY,qBAAqB;IAC/B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C,mEAAmE;IACzC,IAAI,EAAE,eAAe,CAA0B;IACzE;;;OAGG;IACuB,IAAI,EAAE,eAAe,CAA+B;IAC9E;;;;OAIG;IACuB,aAAa,EAAE,qBAAqB,CAC1B;IACpC,0DAA0D;IAChC,KAAK,SAAK;IACpC;;;OAGG;IACwB,SAAS,UAAS;IAC7C;;;OAGG;IACwB,QAAQ,UAAS;IAC5C;;;OAGG;IACwB,cAAc,UAAS;IAClD;;;OAGG;IACuB,WAAW,SAAsB;IAC3D;;;;;;OAMG;IACwB,SAAS,UAAS;IAC7C;;;OAGG;IACuB,UAAU,SAAU;IAC9C;;;;OAIG;IACwB,wBAAwB,UAAS;IAEnD,MAAM;IAQf,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,qBAAqB;IAwC7B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,WAAW;IAsBnB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAE/D,OAAO,EAAC,QAAQ,EAAC,CAAC;AAElB,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,eAAe;IACzB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;CAChC;AAED,oBAAY,qBAAqB;IAC/B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBACa,cAAe,SAAQ,UAAU;IAC5C,mEAAmE;IACzC,IAAI,EAAE,eAAe,CAA0B;IACzE;;;OAGG;IACuB,IAAI,EAAE,eAAe,CAA+B;IAC9E;;;;OAIG;IACuB,aAAa,EAAE,qBAAqB,CAC1B;IACpC;;;OAGG;IACuB,QAAQ,EAAE,QAAQ,CAAqB;IACjE,0DAA0D;IAChC,KAAK,SAAK;IACpC;;;OAGG;IACwB,SAAS,UAAS;IAC7C;;;OAGG;IACwB,QAAQ,UAAS;IAC5C;;;OAGG;IACwB,cAAc,UAAS;IAClD;;;OAGG;IACuB,WAAW,SAAsB;IAC3D;;;;;;OAMG;IACwB,SAAS,UAAS;IAC7C;;;OAGG;IACuB,UAAU,SAAU;IAC9C;;;;OAIG;IACwB,wBAAwB,UAAS;IAEnD,MAAM;IAQf,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,qBAAqB;IAwC7B,OAAO,CAAC,oBAAoB;IAkC5B,OAAO,CAAC,WAAW;IAsBnB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -1,10 +1,12 @@
1
1
  import { unsafeCSS, LitElement, html, nothing } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
+ import { classMap } from "lit/directives/class-map.js";
3
4
  import { styleMap } from "lit/directives/style-map.js";
4
5
  import componentStyle from "./progress-bar.css.js";
5
6
  import { customElement } from "../../decorator.js";
6
7
  import "../../icons/icon-placeholder.js";
7
8
  import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
9
+ import { Priority } from "../../navigation-instruments/types.js";
8
10
  var __defProp = Object.defineProperty;
9
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
12
  var __decorateClass = (decorators, target, key, kind) => {
@@ -37,6 +39,7 @@ let ObcProgressBar = class extends LitElement {
37
39
  this.type = "linear";
38
40
  this.mode = "determinate";
39
41
  this.circularState = "determinate";
42
+ this.priority = Priority.enhanced;
40
43
  this.value = 0;
41
44
  this.showValue = false;
42
45
  this.showUnit = false;
@@ -116,11 +119,15 @@ let ObcProgressBar = class extends LitElement {
116
119
  renderLinearProgress() {
117
120
  const clampedValue = Math.max(0, Math.min(100, this.value));
118
121
  const progressWidth = `${clampedValue}%`;
122
+ const barClasses = {
123
+ bar: true,
124
+ "priority-regular": this.priority === Priority.regular
125
+ };
119
126
  return html`
120
127
  <div class="wrapper">
121
128
  ${this.showValue ? this.renderLabel() : ""}
122
129
 
123
- <div class="bar">
130
+ <div class=${classMap(barClasses)}>
124
131
  ${this.mode === "determinate" ? html`
125
132
  <div
126
133
  class="loaded"
@@ -167,6 +174,9 @@ __decorateClass([
167
174
  __decorateClass([
168
175
  property({ type: String })
169
176
  ], ObcProgressBar.prototype, "circularState", 2);
177
+ __decorateClass([
178
+ property({ type: String })
179
+ ], ObcProgressBar.prototype, "priority", 2);
170
180
  __decorateClass([
171
181
  property({ type: Number })
172
182
  ], ObcProgressBar.prototype, "value", 2);
@@ -197,6 +207,7 @@ ObcProgressBar = __decorateClass([
197
207
  export {
198
208
  CircularProgressState,
199
209
  ObcProgressBar,
210
+ Priority,
200
211
  ProgressBarMode,
201
212
  ProgressBarType
202
213
  };
@@ -1 +1 @@
1
- {"version":3,"file":"progress-bar.js","sources":["../../../src/components/progress-bar/progress-bar.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport componentStyle from './progress-bar.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../../icons/icon-placeholder.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum ProgressBarType {\n linear = 'linear',\n circular = 'circular',\n}\n\nexport enum ProgressBarMode {\n determinate = 'determinate',\n indeterminate = 'indeterminate',\n}\n\nexport enum CircularProgressState {\n determinate = 'determinate',\n indeterminate = 'indeterminate',\n icon = 'icon',\n}\n\n/**\n * `<obc-progress-bar>` – A status-only progress indicator (progress meter / spinner /\n * loading indicator) for visualizing how far a task has advanced.\n *\n * Displays the progress of an ongoing operation either as a horizontal bar or as a circular\n * ring. Unlike `<obc-progress-button>`, this is a passive, non-interactive display element:\n * it shows status only and emits no events. Use it to communicate determinate progress\n * (a known percentage) or an open-ended \"working\" state.\n *\n * ## Features / Variants\n *\n * **Layout types (`type`)**\n * - **Linear** (default): A horizontal bar with an optional value label above and an optional\n * description below. Best inline within content where horizontal space is available.\n * - **Circular**: A ring with centered content. Best for compact, icon-led, or centered status.\n *\n * **Linear modes (`mode`)**\n * - **Determinate** (default): Fills proportionally to `value` (0–100); the label shows the\n * rounded percentage.\n * - **Indeterminate**: Animated, looping fill for work of unknown duration; the label shows\n * \"Loading\".\n *\n * **Circular states (`circularState`)**\n * - **Determinate**: Ring fills to `value`, with the rounded number (and optional `%` unit) centered.\n * - **Indeterminate**: Animated ring with the `icon` slot centered.\n * - **Icon**: A full ring acting as a frame around the centered `icon` slot (defaults to a placeholder).\n *\n * **Circular progressive indeterminate (`progressiveIndeterminate`)**\n * - A spinning arc that also grows with `value`, blending an indeterminate animation with a\n * numeric readout. Takes precedence over `circularState` when enabled.\n *\n * ## Usage Guidelines\n *\n * Use a progress bar to report the status of a task the user is waiting on. Choose\n * **determinate** when the completion percentage is known and **indeterminate** when it is not.\n * Pick the **linear** type for inline, full-width contexts and the **circular** type for compact\n * or centered placements. Because this component is display-only, pair it with a separate\n * control (such as `<obc-progress-button>`) when the user also needs to trigger or cancel the action.\n *\n * ## Slots\n *\n * | Slot | Renders When... | Purpose |\n * | ------ | ----------------------------------------------------------- | ----------------------------------------- |\n * | `icon` | `type=\"circular\"` && `circularState` is `indeterminate` or `icon` | Centered icon inside the circular ring. |\n *\n * @example\n * ```html\n * <obc-progress-bar\n * type=\"linear\"\n * mode=\"determinate\"\n * value=\"65\"\n * showValue\n * hasDescription\n * description=\"Uploading files...\"\n * ></obc-progress-bar>\n * ```\n *\n * @slot icon - Centered icon for the circular `indeterminate` and `icon` states.\n * @stable\n */\n@customElement('obc-progress-bar')\nexport class ObcProgressBar extends LitElement {\n /** Layout type: `linear` (horizontal bar) or `circular` (ring). */\n @property({type: String}) type: ProgressBarType = ProgressBarType.linear;\n /**\n * Progress mode: `determinate` tracks `value`, `indeterminate` loops indefinitely.\n * @availableWhen type==linear\n */\n @property({type: String}) mode: ProgressBarMode = ProgressBarMode.determinate;\n /**\n * Circular display state: `determinate` (numeric ring), `indeterminate` (animated ring with\n * icon), or `icon` (ring framing the icon slot).\n * @availableWhen type==circular\n */\n @property({type: String}) circularState: CircularProgressState =\n CircularProgressState.determinate;\n /** Progress percentage (0–100); clamped when rendered. */\n @property({type: Number}) value = 0;\n /**\n * Shows the value label above the bar (percentage when determinate, \"Loading\" when indeterminate).\n * @availableWhen type==linear\n */\n @property({type: Boolean}) showValue = false;\n /**\n * Appends a `%` unit next to the centered value.\n * @availableWhen type==circular && (progressiveIndeterminate==true || circularState==determinate)\n */\n @property({type: Boolean}) showUnit = false;\n /**\n * Shows the `description` text below the bar.\n * @availableWhen type==linear\n */\n @property({type: Boolean}) hasDescription = false;\n /**\n * Description text rendered below the bar.\n * @availableWhen type==linear && hasDescription==true\n */\n @property({type: String}) description = 'Description text';\n /**\n * Shows the `stateLabel` next to the value.\n *\n * **TODO(designer):** Confirm the intended purpose of the state indicator — the story labels\n * this a \"future feature\".\n * @availableWhen type==linear && showValue==true && mode==determinate\n */\n @property({type: Boolean}) showState = false;\n /**\n * Text shown alongside the value when `showState` is enabled.\n * @availableWhen type==linear && showValue==true && mode==determinate && showState==true\n */\n @property({type: String}) stateLabel = 'Open';\n /**\n * Uses a progressive indeterminate ring (spinning arc that grows with `value`); takes\n * precedence over `circularState`.\n * @availableWhen type==circular\n */\n @property({type: Boolean}) progressiveIndeterminate = false;\n\n override render() {\n if (this.type === ProgressBarType.circular) {\n return this.renderCircularProgress();\n }\n\n return this.renderLinearProgress();\n }\n\n private getCircularProgressMode(): CircularProgressMode {\n if (this.progressiveIndeterminate) {\n return CircularProgressMode.progressiveIndeterminate;\n }\n if (this.circularState === CircularProgressState.icon) {\n return CircularProgressMode.determinate;\n }\n if (this.circularState === CircularProgressState.indeterminate) {\n return CircularProgressMode.indeterminate;\n }\n return CircularProgressMode.determinate;\n }\n\n private renderCircularProgress() {\n const progressValue =\n this.circularState === CircularProgressState.icon ? 100 : this.value;\n\n return html`\n <div class=\"circular-wrapper\">\n <obc-circular-progress\n .mode=${this.getCircularProgressMode()}\n .value=${progressValue}\n .viewBoxSize=${48}\n .strokeWidth=${4}\n ></obc-circular-progress>\n\n <div class=\"circular-content\">${this.renderCircularContent()}</div>\n </div>\n `;\n }\n\n private renderCircularContent() {\n if (this.progressiveIndeterminate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">${Math.round(this.value)}</span>\n ${this.showUnit\n ? html`<span class=\"circular-unit\">%</span>`\n : nothing}\n </div>\n `;\n }\n\n if (this.circularState === CircularProgressState.determinate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">${Math.round(this.value)}</span>\n ${this.showUnit\n ? html`<span class=\"circular-unit\">%</span>`\n : nothing}\n </div>\n `;\n } else if (this.circularState === CircularProgressState.indeterminate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">\n <slot name=\"icon\">...</slot>\n </span>\n </div>\n `;\n } else {\n return html`\n <div class=\"circular-icon-container\">\n <slot name=\"icon\">\n <obi-placeholder></obi-placeholder>\n </slot>\n </div>\n `;\n }\n }\n\n private renderLinearProgress() {\n const clampedValue = Math.max(0, Math.min(100, this.value));\n const progressWidth = `${clampedValue}%`;\n\n return html`\n <div class=\"wrapper\">\n ${this.showValue ? this.renderLabel() : ''}\n\n <div class=\"bar\">\n ${this.mode === ProgressBarMode.determinate\n ? html`\n <div\n class=\"loaded\"\n style=${styleMap({width: progressWidth})}\n ></div>\n `\n : html` <div class=\"indeterminate-track\"></div> `}\n </div>\n\n ${this.hasDescription\n ? html`\n <div class=\"description-container\">\n <span class=\"description-text\">${this.description}</span>\n </div>\n `\n : nothing}\n </div>\n `;\n }\n\n private renderLabel() {\n if (this.mode === ProgressBarMode.determinate) {\n return html`\n <div class=\"label-container\">\n <div class=\"value-frame\">\n <span class=\"value-number\">${Math.round(this.value)}</span>\n <span class=\"value-unit\">%</span>\n </div>\n ${this.showState\n ? html` <span class=\"state\">${this.stateLabel}</span> `\n : nothing}\n </div>\n `;\n } else {\n return html`\n <div class=\"label-container\">\n <span class=\"loading-text\">Loading</span>\n </div>\n `;\n }\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-progress-bar': ObcProgressBar;\n }\n}\n"],"names":["ProgressBarType","ProgressBarMode","CircularProgressState"],"mappings":";;;;;;;;;;;;;;;;;AAQO,IAAK,oCAAAA,qBAAL;AACLA,mBAAA,QAAA,IAAS;AACTA,mBAAA,UAAA,IAAW;AAFD,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAKL,IAAK,oCAAAC,qBAAL;AACLA,mBAAA,aAAA,IAAc;AACdA,mBAAA,eAAA,IAAgB;AAFN,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAKL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,aAAA,IAAc;AACdA,yBAAA,eAAA,IAAgB;AAChBA,yBAAA,MAAA,IAAO;AAHG,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAmEL,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,OAAwB;AAKxB,SAAA,OAAwB;AAMxB,SAAA,gBACxB;AAEwB,SAAA,QAAQ;AAKP,SAAA,YAAY;AAKZ,SAAA,WAAW;AAKX,SAAA,iBAAiB;AAKlB,SAAA,cAAc;AAQb,SAAA,YAAY;AAKb,SAAA,aAAa;AAMZ,SAAA,2BAA2B;AAAA,EAAA;AAAA,EAE7C,SAAS;AAChB,QAAI,KAAK,SAAS,YAA0B;AAC1C,aAAO,KAAK,uBAAA;AAAA,IACd;AAEA,WAAO,KAAK,qBAAA;AAAA,EACd;AAAA,EAEQ,0BAAgD;AACtD,QAAI,KAAK,0BAA0B;AACjC,aAAO,qBAAqB;AAAA,IAC9B;AACA,QAAI,KAAK,kBAAkB,QAA4B;AACrD,aAAO,qBAAqB;AAAA,IAC9B;AACA,QAAI,KAAK,kBAAkB,iBAAqC;AAC9D,aAAO,qBAAqB;AAAA,IAC9B;AACA,WAAO,qBAAqB;AAAA,EAC9B;AA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MC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAvDd,eAuDgB,WAAA,4BAAA,CAAA;AAvDhB,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
1
+ {"version":3,"file":"progress-bar.js","sources":["../../../src/components/progress-bar/progress-bar.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport componentStyle from './progress-bar.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../../icons/icon-placeholder.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {Priority} from '../../navigation-instruments/types.js';\n\nexport {Priority};\n\nexport enum ProgressBarType {\n linear = 'linear',\n circular = 'circular',\n}\n\nexport enum ProgressBarMode {\n determinate = 'determinate',\n indeterminate = 'indeterminate',\n}\n\nexport enum CircularProgressState {\n determinate = 'determinate',\n indeterminate = 'indeterminate',\n icon = 'icon',\n}\n\n/**\n * `<obc-progress-bar>` – A status-only progress indicator (progress meter / spinner /\n * loading indicator) for visualizing how far a task has advanced.\n *\n * Displays the progress of an ongoing operation either as a horizontal bar or as a circular\n * ring. Unlike `<obc-progress-button>`, this is a passive, non-interactive display element:\n * it shows status only and emits no events. Use it to communicate determinate progress\n * (a known percentage) or an open-ended \"working\" state.\n *\n * ## Features / Variants\n *\n * **Layout types (`type`)**\n * - **Linear** (default): A horizontal bar with an optional value label above and an optional\n * description below. Best inline within content where horizontal space is available.\n * - **Circular**: A ring with centered content. Best for compact, icon-led, or centered status.\n *\n * **Linear modes (`mode`)**\n * - **Determinate** (default): Fills proportionally to `value` (0–100); the label shows the\n * rounded percentage.\n * - **Indeterminate**: Animated, looping fill for work of unknown duration; the label shows\n * \"Loading\".\n *\n * **Color priority (`priority`)**\n * - **Enhanced** (default): Blue fill, for a bar that reads as the primary value.\n * - **Regular**: Neutral gray fill, for a bar that should recede as ancillary status.\n *\n * **Circular states (`circularState`)**\n * - **Determinate**: Ring fills to `value`, with the rounded number (and optional `%` unit) centered.\n * - **Indeterminate**: Animated ring with the `icon` slot centered.\n * - **Icon**: A full ring acting as a frame around the centered `icon` slot (defaults to a placeholder).\n *\n * **Circular progressive indeterminate (`progressiveIndeterminate`)**\n * - A spinning arc that also grows with `value`, blending an indeterminate animation with a\n * numeric readout. Takes precedence over `circularState` when enabled.\n *\n * ## Usage Guidelines\n *\n * Use a progress bar to report the status of a task the user is waiting on. Choose\n * **determinate** when the completion percentage is known and **indeterminate** when it is not.\n * Pick the **linear** type for inline, full-width contexts and the **circular** type for compact\n * or centered placements. Because this component is display-only, pair it with a separate\n * control (such as `<obc-progress-button>`) when the user also needs to trigger or cancel the action.\n *\n * ## Slots\n *\n * | Slot | Renders When... | Purpose |\n * | ------ | ----------------------------------------------------------- | ----------------------------------------- |\n * | `icon` | `type=\"circular\"` && `circularState` is `indeterminate` or `icon` | Centered icon inside the circular ring. |\n *\n * @example\n * ```html\n * <obc-progress-bar\n * type=\"linear\"\n * mode=\"determinate\"\n * value=\"65\"\n * showValue\n * hasDescription\n * description=\"Uploading files...\"\n * ></obc-progress-bar>\n * ```\n *\n * @slot icon - Centered icon for the circular `indeterminate` and `icon` states.\n * @stable\n */\n@customElement('obc-progress-bar')\nexport class ObcProgressBar extends LitElement {\n /** Layout type: `linear` (horizontal bar) or `circular` (ring). */\n @property({type: String}) type: ProgressBarType = ProgressBarType.linear;\n /**\n * Progress mode: `determinate` tracks `value`, `indeterminate` loops indefinitely.\n * @availableWhen type==linear\n */\n @property({type: String}) mode: ProgressBarMode = ProgressBarMode.determinate;\n /**\n * Circular display state: `determinate` (numeric ring), `indeterminate` (animated ring with\n * icon), or `icon` (ring framing the icon slot).\n * @availableWhen type==circular\n */\n @property({type: String}) circularState: CircularProgressState =\n CircularProgressState.determinate;\n /**\n * Color emphasis of the bar fill: `regular` (gray) or `enhanced` (blue).\n * @availableWhen type==linear\n */\n @property({type: String}) priority: Priority = Priority.enhanced;\n /** Progress percentage (0–100); clamped when rendered. */\n @property({type: Number}) value = 0;\n /**\n * Shows the value label above the bar (percentage when determinate, \"Loading\" when indeterminate).\n * @availableWhen type==linear\n */\n @property({type: Boolean}) showValue = false;\n /**\n * Appends a `%` unit next to the centered value.\n * @availableWhen type==circular && (progressiveIndeterminate==true || circularState==determinate)\n */\n @property({type: Boolean}) showUnit = false;\n /**\n * Shows the `description` text below the bar.\n * @availableWhen type==linear\n */\n @property({type: Boolean}) hasDescription = false;\n /**\n * Description text rendered below the bar.\n * @availableWhen type==linear && hasDescription==true\n */\n @property({type: String}) description = 'Description text';\n /**\n * Shows the `stateLabel` next to the value.\n *\n * **TODO(designer):** Confirm the intended purpose of the state indicator — the story labels\n * this a \"future feature\".\n * @availableWhen type==linear && showValue==true && mode==determinate\n */\n @property({type: Boolean}) showState = false;\n /**\n * Text shown alongside the value when `showState` is enabled.\n * @availableWhen type==linear && showValue==true && mode==determinate && showState==true\n */\n @property({type: String}) stateLabel = 'Open';\n /**\n * Uses a progressive indeterminate ring (spinning arc that grows with `value`); takes\n * precedence over `circularState`.\n * @availableWhen type==circular\n */\n @property({type: Boolean}) progressiveIndeterminate = false;\n\n override render() {\n if (this.type === ProgressBarType.circular) {\n return this.renderCircularProgress();\n }\n\n return this.renderLinearProgress();\n }\n\n private getCircularProgressMode(): CircularProgressMode {\n if (this.progressiveIndeterminate) {\n return CircularProgressMode.progressiveIndeterminate;\n }\n if (this.circularState === CircularProgressState.icon) {\n return CircularProgressMode.determinate;\n }\n if (this.circularState === CircularProgressState.indeterminate) {\n return CircularProgressMode.indeterminate;\n }\n return CircularProgressMode.determinate;\n }\n\n private renderCircularProgress() {\n const progressValue =\n this.circularState === CircularProgressState.icon ? 100 : this.value;\n\n return html`\n <div class=\"circular-wrapper\">\n <obc-circular-progress\n .mode=${this.getCircularProgressMode()}\n .value=${progressValue}\n .viewBoxSize=${48}\n .strokeWidth=${4}\n ></obc-circular-progress>\n\n <div class=\"circular-content\">${this.renderCircularContent()}</div>\n </div>\n `;\n }\n\n private renderCircularContent() {\n if (this.progressiveIndeterminate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">${Math.round(this.value)}</span>\n ${this.showUnit\n ? html`<span class=\"circular-unit\">%</span>`\n : nothing}\n </div>\n `;\n }\n\n if (this.circularState === CircularProgressState.determinate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">${Math.round(this.value)}</span>\n ${this.showUnit\n ? html`<span class=\"circular-unit\">%</span>`\n : nothing}\n </div>\n `;\n } else if (this.circularState === CircularProgressState.indeterminate) {\n return html`\n <div class=\"circular-label-container\">\n <span class=\"circular-value\">\n <slot name=\"icon\">...</slot>\n </span>\n </div>\n `;\n } else {\n return html`\n <div class=\"circular-icon-container\">\n <slot name=\"icon\">\n <obi-placeholder></obi-placeholder>\n </slot>\n </div>\n `;\n }\n }\n\n private renderLinearProgress() {\n const clampedValue = Math.max(0, Math.min(100, this.value));\n const progressWidth = `${clampedValue}%`;\n const barClasses = {\n bar: true,\n 'priority-regular': this.priority === Priority.regular,\n };\n\n return html`\n <div class=\"wrapper\">\n ${this.showValue ? this.renderLabel() : ''}\n\n <div class=${classMap(barClasses)}>\n ${this.mode === ProgressBarMode.determinate\n ? html`\n <div\n class=\"loaded\"\n style=${styleMap({width: progressWidth})}\n ></div>\n `\n : html` <div class=\"indeterminate-track\"></div> `}\n </div>\n\n ${this.hasDescription\n ? html`\n <div class=\"description-container\">\n <span class=\"description-text\">${this.description}</span>\n </div>\n `\n : nothing}\n </div>\n `;\n }\n\n private renderLabel() {\n if (this.mode === ProgressBarMode.determinate) {\n return html`\n <div class=\"label-container\">\n <div class=\"value-frame\">\n <span class=\"value-number\">${Math.round(this.value)}</span>\n <span class=\"value-unit\">%</span>\n </div>\n ${this.showState\n ? html` <span class=\"state\">${this.stateLabel}</span> `\n : nothing}\n </div>\n `;\n } else {\n return html`\n <div class=\"label-container\">\n <span class=\"loading-text\">Loading</span>\n </div>\n `;\n }\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-progress-bar': ObcProgressBar;\n }\n}\n"],"names":["ProgressBarType","ProgressBarMode","CircularProgressState"],"mappings":";;;;;;;;;;;;;;;;;;;AAYO,IAAK,oCAAAA,qBAAL;AACLA,mBAAA,QAAA,IAAS;AACTA,mBAAA,UAAA,IAAW;AAFD,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAKL,IAAK,oCAAAC,qBAAL;AACLA,mBAAA,aAAA,IAAc;AACdA,mBAAA,eAAA,IAAgB;AAFN,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAKL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,aAAA,IAAc;AACdA,yBAAA,eAAA,IAAgB;AAChBA,yBAAA,MAAA,IAAO;AAHG,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAuEL,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,OAAwB;AAKxB,SAAA,OAAwB;AAMxB,SAAA,gBACxB;AAKwB,SAAA,WAAqB,SAAS;AAE9B,SAAA,QAAQ;AAKP,SAAA,YAAY;AAKZ,SAAA,WAAW;AAKX,SAAA,iBAAiB;AAKlB,SAAA,cAAc;AAQb,SAAA,YAAY;AAKb,SAAA,aAAa;AAMZ,SAAA,2BAA2B;AAAA,EAAA;AAAA,EAE7C,SAAS;AAChB,QAAI,KAAK,SAAS,YAA0B;AAC1C,aAAO,KAAK,uBAAA;AAAA,IACd;AAEA,WAAO,KAAK,qBAAA;AAAA,EACd;AAAA,EAEQ,0BAAgD;AACtD,QAAI,KAAK,0BAA0B;AACjC,aAAO,qBAAqB;AAAA,IAC9B;AACA,QAAI,KAAK,kBAAkB,QAA4B;AACrD,aAAO,qBAAqB;AAAA,IAC9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CgB,WAAA,kBAAA,CAAA;AAKD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAzCb,eAyCe,WAAA,eAAA,CAAA;AAQC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAjDd,eAiDgB,WAAA,aAAA,CAAA;AAKD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAtDb,eAsDe,WAAA,cAAA,CAAA;AAMC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA5Dd,eA4DgB,WAAA,4BAAA,CAAA;AA5DhB,iBAAN,gBAAA;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB,cAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-full-bundle",
3
- "version": "2.0.0-next.130",
3
+ "version": "2.0.0-next.131",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,155 @@
1
+ import type {Meta, StoryObj} from '@storybook/web-components-vite';
2
+ import {html} from 'lit';
3
+ import './modal-window.js';
4
+ import {ObcModalWindowSize} from './modal-window.js';
5
+ import '../../icons/icon-placeholder.js';
6
+
7
+ const meta = {
8
+ title: 'Application Components/Containers/Modal Window/Sizing',
9
+ component: 'obc-modal-window',
10
+ tags: ['autodocs', '6.0'],
11
+ parameters: {
12
+ layout: 'padded',
13
+ docs: {
14
+ description: {
15
+ component: `By default \`obc-modal-window\` is as tall as its content,
16
+ capped at \`90vh\`. To size it externally, set the
17
+ \`--obc-modal-window-height\` custom property on the element — a fixed value,
18
+ or \`100%\` to follow a host element sized by its container. The \`90vh\` cap
19
+ always applies and the content area scrolls when the content does not fit.
20
+
21
+ Every frame below is 349 × 360 px, outlined.`,
22
+ },
23
+ },
24
+ },
25
+ } satisfies Meta;
26
+
27
+ export default meta;
28
+ type Story = StoryObj;
29
+
30
+ const FRAME = 'width: 349px; height: 360px; outline: 1px dashed #d0021b;';
31
+ const FILLED = 'position: relative; width: 100%; height: 100%;';
32
+
33
+ const filledBody = html`
34
+ <div slot="content" style=${FILLED}>
35
+ <div
36
+ style="position: absolute; inset: 0; padding: 16px; background: rgba(0, 122, 255, 0.12);"
37
+ >
38
+ Body content, sized by the modal.
39
+ </div>
40
+ </div>
41
+ `;
42
+
43
+ const naturalBody = html`
44
+ <div
45
+ slot="content"
46
+ style="padding: 16px; background: rgba(0, 122, 255, 0.12);"
47
+ >
48
+ Body content at its natural height.
49
+ </div>
50
+ `;
51
+
52
+ const modal = (style: string, body = filledBody) => html`
53
+ <obc-modal-window
54
+ style=${style}
55
+ .size=${ObcModalWindowSize.Small}
56
+ .hasOptionalAction=${false}
57
+ .hasLeadingIcon=${true}
58
+ >
59
+ <obi-placeholder slot="leading-icon"></obi-placeholder>
60
+ <span slot="title">Modal Title</span>
61
+ ${body}
62
+ <span slot="cancel-label">Cancel</span>
63
+ <span slot="done-label">Done</span>
64
+ </obc-modal-window>
65
+ `;
66
+
67
+ const labelled = (label: string, content: unknown) => html`
68
+ <div style="display: flex; flex-direction: column; gap: 8px;">
69
+ <span style="font: 12px/1.4 sans-serif;">${label}</span>
70
+ ${content}
71
+ </div>
72
+ `;
73
+
74
+ const row = (...cells: unknown[]) => html`
75
+ <div style="display: flex; gap: 32px; align-items: flex-start;">${cells}</div>
76
+ `;
77
+
78
+ export const ContentHeightByDefault: Story = {
79
+ render: () =>
80
+ row(
81
+ labelled(
82
+ 'Plain frame — content height',
83
+ html`<div style=${FRAME}>${modal('', naturalBody)}</div>`
84
+ ),
85
+ labelled(
86
+ 'Flex frame — still content height',
87
+ html`<div style="${FRAME} display: flex;">
88
+ ${modal('', naturalBody)}
89
+ </div>`
90
+ )
91
+ ),
92
+ parameters: {
93
+ docs: {
94
+ description: {
95
+ story: `Without \`--obc-modal-window-height\` the modal keeps its
96
+ content height, also when a flex container stretches the host element. Nothing
97
+ an ancestor does can change the modal's height implicitly.`,
98
+ },
99
+ },
100
+ },
101
+ };
102
+
103
+ export const FixedHeight: Story = {
104
+ render: () =>
105
+ row(
106
+ labelled(
107
+ '--obc-modal-window-height: 360px',
108
+ html`<div style=${FRAME}>
109
+ ${modal('--obc-modal-window-height: 360px;')}
110
+ </div>`
111
+ ),
112
+ labelled(
113
+ 'Default for comparison',
114
+ html`<div style=${FRAME}>${modal('')}</div>`
115
+ )
116
+ ),
117
+ parameters: {
118
+ docs: {
119
+ description: {
120
+ story: `A fixed \`--obc-modal-window-height\` sizes the modal exactly.
121
+ The body takes whatever the title bar and the action row leave, with no fixed
122
+ heights anywhere, and slotted content of \`height: 100%\` fills it. Values
123
+ taller than the viewport are still capped at \`90vh\`.`,
124
+ },
125
+ },
126
+ },
127
+ };
128
+
129
+ export const FillContainer: Story = {
130
+ render: () =>
131
+ row(
132
+ labelled(
133
+ 'Flex frame + --obc-modal-window-height: 100%',
134
+ html`<div style="${FRAME} display: flex;">
135
+ ${modal('--obc-modal-window-height: 100%;')}
136
+ </div>`
137
+ ),
138
+ labelled(
139
+ 'Block frame + height: 100% on the element',
140
+ html`<div style=${FRAME}>
141
+ ${modal('height: 100%; --obc-modal-window-height: 100%;')}
142
+ </div>`
143
+ )
144
+ ),
145
+ parameters: {
146
+ docs: {
147
+ description: {
148
+ story: `\`--obc-modal-window-height: 100%\` makes the modal follow the
149
+ host element's height: let a flex container stretch the host, or give the
150
+ element an explicit \`height\`. Use this when the surrounding layout owns the
151
+ modal's size.`,
152
+ },
153
+ },
154
+ },
155
+ };
@@ -2,6 +2,10 @@
2
2
  box-sizing: border-box;
3
3
  }
4
4
 
5
+ :host {
6
+ display: block;
7
+ }
8
+
5
9
  .wrapper {
6
10
  box-sizing: border-box;
7
11
  background: var(--container-background-color);
@@ -13,6 +17,7 @@
13
17
  display: flex;
14
18
  flex-direction: column;
15
19
  width: 100%;
20
+ height: var(--obc-modal-window-height, auto);
16
21
  max-height: 90vh;
17
22
  }
18
23
 
@@ -54,6 +54,13 @@ export enum ObcModalWindowSize {
54
54
  * - `done-click`: Fired when the done button is clicked.
55
55
  * - `option-click`: Fired when the optional action button is clicked.
56
56
  *
57
+ * ### Sizing
58
+ * By default the modal is as tall as its content, capped at `90vh`. To give it
59
+ * an explicit height, set the `--obc-modal-window-height` custom property on
60
+ * the element — either a fixed value (`--obc-modal-window-height: 360px`) or
61
+ * `100%` to fill a host element that is sized by its container. The `90vh` cap
62
+ * always applies, and the content area scrolls when the content does not fit.
63
+ *
57
64
  * ### Example:
58
65
  * ```html
59
66
  * <obc-modal-window size="medium" hasLeadingIcon>
@@ -78,6 +85,7 @@ export enum ObcModalWindowSize {
78
85
  * @slot option-label - Slot for the label of the optional action button (shown when `hasOptionalAction` is true)
79
86
  * @slot cancel-label - Slot for the label of the cancel button (shown when `hasCancelAction` is true)
80
87
  * @slot done-label - Slot for the label of the done button
88
+ * @cssprop [--obc-modal-window-height=auto] - Height of the modal window. Defaults to content height (capped at 90vh); set a fixed value or `100%` to size the modal externally.
81
89
  * @stable
82
90
  */
83
91
  @customElement('obc-modal-window')
@@ -77,6 +77,10 @@
77
77
  transition: width 0.3s ease-in-out;
78
78
  }
79
79
 
80
+ .bar.priority-regular .loaded {
81
+ background-color: var(--instrument-regular-secondary-color);
82
+ }
83
+
80
84
  .indeterminate-track {
81
85
  position: absolute;
82
86
  top: 0;
@@ -88,6 +92,10 @@
88
92
  animation: indeterminate-slide 1.5s ease-in-out infinite;
89
93
  }
90
94
 
95
+ .bar.priority-regular .indeterminate-track {
96
+ background-color: var(--instrument-regular-secondary-color);
97
+ }
98
+
91
99
  @keyframes indeterminate-slide {
92
100
  0% {
93
101
  transform: translateX(-100%);