@oicl/openbridge-webcomponents 2.2.0-next.1 → 2.2.0-next.3
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.
- package/bundle/openbridge-webcomponents.bundle.js +42 -16
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +99 -13
- package/dist/components/alert-button/alert-button.d.ts +11 -2
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +5 -1
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-button-item/alert-button-item.d.ts +11 -1
- package/dist/components/alert-button-item/alert-button-item.d.ts.map +1 -1
- package/dist/components/alert-button-item/alert-button-item.js +3 -1
- package/dist/components/alert-button-item/alert-button-item.js.map +1 -1
- package/dist/components/alert-counter-item/alert-counter-item.d.ts +7 -4
- package/dist/components/alert-counter-item/alert-counter-item.d.ts.map +1 -1
- package/dist/components/alert-counter-item/alert-counter-item.js +2 -4
- package/dist/components/alert-counter-item/alert-counter-item.js.map +1 -1
- package/dist/components/badge/badge.css.js +7 -0
- package/dist/components/badge/badge.css.js.map +1 -1
- package/dist/components/top-bar/top-bar.css.js +2 -2
- package/dist/components/top-bar/top-bar.css.js.map +1 -1
- package/dist/components/top-bar/top-bar.d.ts +23 -8
- package/dist/components/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/top-bar/top-bar.js +25 -9
- package/dist/components/top-bar/top-bar.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -59956,7 +59956,7 @@
|
|
|
59956
59956
|
"declarations": [
|
|
59957
59957
|
{
|
|
59958
59958
|
"kind": "class",
|
|
59959
|
-
"description": "`<obc-alert-button-item>` – The bell button that shows the alert state and count.\n\nShows the alert status as a bell in the style of the given alert type, with\nan optional counter, or as a global counter: one badge per severity, then\nthe bell and the total. `obc-alert-button` renders the item next to its\nsilence button; use the item on its own where no silence button is needed.\n\n---\n\n### Features\n- **Variants (`type`):** `flat` (icon only), `normal` (bordered, icon and\n counter) and `enhanced` (filled in the severity colour).\n- **Alert types:** `alarm`, `warning`, `caution` and the `level-*` family;\n `nAlerts` of 0 shows the idle bell.\n- **Counter:** `counter` shows `nAlerts` next to the bell, except in `flat`.\n- **Global counter:** `globalCounter` shows the per-severity `counts` as\n badges, then the bell and `nAlerts`, always in the normal style.\n- **Flashing:** `blinking` flashes the bell at the tempo `flashingSpeed`\n resolves (#1224).\n- **Fill height:** `fillHeight` stretches the visible button to the host\n height, as the tall `obc-alert-button` does.\n\n---\n\n### Usage Guidelines\n- Keep `nAlerts` and `counts` consistent; the item shows both as given.\n- The generated label reads e.g. \"Alerts, 12, 2 Alarm, 4 Warning,\n 6 Caution\"; an `aria-label` on the host replaces it. A visually hidden\n polite live region repeats that name, so a change of counts is announced\n without the button holding focus; the name attribute alone would change\n silently.\n- A native button, so Enter and Space activate it (APG button pattern).\n- A parent that joins another button to the item's end sets the\n `data-group-item-not-last` attribute on the host.\n- **TODO(designer):** the Figma file draws the flat item's hover, active and\n focused variants at 20 % opacity; the item uses the standard flat states.\n- **TODO(designer):** the Figma file defines no flashing for the global\n counter, so it never flashes.\n\n---\n\n### Example\n\n```html\n<obc-alert-button-item alertType=\"alarm\" nAlerts=\"3\" counter blinking></obc-alert-button-item>\n<obc-alert-button-item\n globalCounter\n nAlerts=\"12\"\n .counts=${{countAlarm: 2, countWarning: 4, countCaution: 6}}\n></obc-alert-button-item>\n```",
|
|
59959
|
+
"description": "`<obc-alert-button-item>` – The bell button that shows the alert state and count.\n\nShows the alert status as a bell in the style of the given alert type, with\nan optional counter, or as a global counter: one badge per severity, then\nthe bell and the total. `obc-alert-button` renders the item next to its\nsilence button; use the item on its own where no silence button is needed.\n\n---\n\n### Features\n- **Variants (`type`):** `flat` (icon only), `normal` (bordered, icon and\n counter) and `enhanced` (filled in the severity colour).\n- **Alert types:** `alarm`, `warning`, `caution` and the `level-*` family;\n `nAlerts` of 0 shows the idle bell.\n- **Counter:** `counter` shows `nAlerts` next to the bell, except in `flat`.\n- **Global counter:** `globalCounter` shows the per-severity `counts` as\n badges, then the bell and `nAlerts`, always in the normal style;\n `globalCounterType` picks filled badges or the severity shapes.\n- **Flashing:** `blinking` flashes the bell at the tempo `flashingSpeed`\n resolves (#1224).\n- **Fill height:** `fillHeight` stretches the visible button to the host\n height, as the tall `obc-alert-button` does.\n\n---\n\n### Usage Guidelines\n- Keep `nAlerts` and `counts` consistent; the item shows both as given.\n- The generated label reads e.g. \"Alerts, 12, 2 Alarm, 4 Warning,\n 6 Caution\"; an `aria-label` on the host replaces it. A visually hidden\n polite live region repeats that name, so a change of counts is announced\n without the button holding focus; the name attribute alone would change\n silently.\n- A native button, so Enter and Space activate it (APG button pattern).\n- A parent that joins another button to the item's end sets the\n `data-group-item-not-last` attribute on the host.\n- **TODO(designer):** the Figma file draws the flat item's hover, active and\n focused variants at 20 % opacity; the item uses the standard flat states.\n- **TODO(designer):** the Figma file defines no flashing for the global\n counter, so it never flashes.\n\n---\n\n### Example\n\n```html\n<obc-alert-button-item alertType=\"alarm\" nAlerts=\"3\" counter blinking></obc-alert-button-item>\n<obc-alert-button-item\n globalCounter\n nAlerts=\"12\"\n .counts=${{countAlarm: 2, countWarning: 4, countCaution: 6}}\n></obc-alert-button-item>\n```",
|
|
59960
59960
|
"name": "ObcAlertButtonItem",
|
|
59961
59961
|
"members": [
|
|
59962
59962
|
{
|
|
@@ -60022,6 +60022,20 @@
|
|
|
60022
60022
|
"description": "Shows the per-severity counts, the bell and the total instead of a single alert status.",
|
|
60023
60023
|
"attribute": "globalCounter"
|
|
60024
60024
|
},
|
|
60025
|
+
{
|
|
60026
|
+
"kind": "field",
|
|
60027
|
+
"name": "globalCounterType",
|
|
60028
|
+
"type": {
|
|
60029
|
+
"text": "ObcAlertCounterItemType"
|
|
60030
|
+
},
|
|
60031
|
+
"description": "How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n\nAvailable when `globalCounter==true`.",
|
|
60032
|
+
"attribute": "globalCounterType",
|
|
60033
|
+
"availableWhen": "globalCounter==true",
|
|
60034
|
+
"availableWhenIf": {
|
|
60035
|
+
"arg": "globalCounter",
|
|
60036
|
+
"truthy": true
|
|
60037
|
+
}
|
|
60038
|
+
},
|
|
60025
60039
|
{
|
|
60026
60040
|
"kind": "field",
|
|
60027
60041
|
"name": "counts",
|
|
@@ -60210,6 +60224,14 @@
|
|
|
60210
60224
|
"description": "Shows the per-severity counts, the bell and the total instead of a single alert status.",
|
|
60211
60225
|
"fieldName": "globalCounter"
|
|
60212
60226
|
},
|
|
60227
|
+
{
|
|
60228
|
+
"name": "globalCounterType",
|
|
60229
|
+
"type": {
|
|
60230
|
+
"text": "ObcAlertCounterItemType"
|
|
60231
|
+
},
|
|
60232
|
+
"description": "How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n\nAvailable when `globalCounter==true`.",
|
|
60233
|
+
"fieldName": "globalCounterType"
|
|
60234
|
+
},
|
|
60213
60235
|
{
|
|
60214
60236
|
"name": "shelvedCount",
|
|
60215
60237
|
"type": {
|
|
@@ -60288,7 +60310,7 @@
|
|
|
60288
60310
|
"declarations": [
|
|
60289
60311
|
{
|
|
60290
60312
|
"kind": "class",
|
|
60291
|
-
"description": "`<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n\nThis component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n\nAppears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions. The bell itself is an `obc-alert-button-item`; use the item directly where no silence button or breakpoints are needed, or for its global counter.\n\n## Features\n\n- **Variants:**\n - **Flat:** Minimal, icon-only button for space-constrained layouts.\n - **Normal:** Standard button with icon and optional alert counter.\n - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n- **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n- **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n- **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them.\n- **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n- **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n- **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n- **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n\n## Usage Guidelines\n\nUse `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n\n- Use the counter to show the number of active alerts when relevant.\n- Use the silence button to provide a quick mute action, but only when space allows.\n- Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n- The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n\n**TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n\n**TODO(designer):** The Figma Alert button has no flat Global counter, so below `flatMaxBreakpointPx` the button shows the flat bell without the counts.\n\n## Events\n\n- `click-alert` – Fired when the main alert button is clicked.\n- `click-silence` – Fired when the silence button is clicked.\n\n## Best Practices & Constraints\n\n- Only show the counter when there are active alerts and the button is not in flat mode.\n- The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n- Blinking should be used sparingly to avoid overwhelming the user.\n- Use the large variant for touch interfaces or when the button needs to stand out.\n\n## Example\n\n```html\n<obc-alert-button\n nAlerts=\"3\"\n alertType=\"alarm\"\n type=\"enhanced\"\n counter\n showSilenceButton\n blinking\n large\n flatMaxBreakpointPx=\"600\"\n silenceButtonMinBreakpointPx=\"600\"\n></obc-alert-button>\n```\n\nIn this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.",
|
|
60313
|
+
"description": "`<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n\nThis component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n\nAppears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions. The bell itself is an `obc-alert-button-item`; use the item directly where no silence button or breakpoints are needed, or for its global counter.\n\n## Features\n\n- **Variants:**\n - **Flat:** Minimal, icon-only button for space-constrained layouts.\n - **Normal:** Standard button with icon and optional alert counter.\n - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n- **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n- **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n- **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them; `globalCounterType` picks filled badges or the severity shapes.\n- **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n- **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n- **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n- **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n\n## Usage Guidelines\n\nUse `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n\n- Use the counter to show the number of active alerts when relevant.\n- Use the silence button to provide a quick mute action, but only when space allows.\n- Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n- The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n\n**TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n\n**TODO(designer):** The Figma Alert button has no flat Global counter, so below `flatMaxBreakpointPx` the button shows the flat bell without the counts.\n\n## Events\n\n- `click-alert` – Fired when the main alert button is clicked.\n- `click-silence` – Fired when the silence button is clicked.\n\n## Best Practices & Constraints\n\n- Only show the counter when there are active alerts and the button is not in flat mode.\n- The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n- Blinking should be used sparingly to avoid overwhelming the user.\n- Use the large variant for touch interfaces or when the button needs to stand out.\n\n## Example\n\n```html\n<obc-alert-button\n nAlerts=\"3\"\n alertType=\"alarm\"\n type=\"enhanced\"\n counter\n showSilenceButton\n blinking\n large\n flatMaxBreakpointPx=\"600\"\n silenceButtonMinBreakpointPx=\"600\"\n></obc-alert-button>\n```\n\nIn this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.",
|
|
60292
60314
|
"name": "ObcAlertButton",
|
|
60293
60315
|
"members": [
|
|
60294
60316
|
{
|
|
@@ -60371,6 +60393,20 @@
|
|
|
60371
60393
|
"description": "Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell.",
|
|
60372
60394
|
"attribute": "globalCounter"
|
|
60373
60395
|
},
|
|
60396
|
+
{
|
|
60397
|
+
"kind": "field",
|
|
60398
|
+
"name": "globalCounterType",
|
|
60399
|
+
"type": {
|
|
60400
|
+
"text": "ObcAlertCounterItemType"
|
|
60401
|
+
},
|
|
60402
|
+
"description": "How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n\nAvailable when `globalCounter==true`.",
|
|
60403
|
+
"attribute": "globalCounterType",
|
|
60404
|
+
"availableWhen": "globalCounter==true",
|
|
60405
|
+
"availableWhenIf": {
|
|
60406
|
+
"arg": "globalCounter",
|
|
60407
|
+
"truthy": true
|
|
60408
|
+
}
|
|
60409
|
+
},
|
|
60374
60410
|
{
|
|
60375
60411
|
"kind": "field",
|
|
60376
60412
|
"name": "counts",
|
|
@@ -60567,6 +60603,14 @@
|
|
|
60567
60603
|
"description": "Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell.",
|
|
60568
60604
|
"fieldName": "globalCounter"
|
|
60569
60605
|
},
|
|
60606
|
+
{
|
|
60607
|
+
"name": "globalCounterType",
|
|
60608
|
+
"type": {
|
|
60609
|
+
"text": "ObcAlertCounterItemType"
|
|
60610
|
+
},
|
|
60611
|
+
"description": "How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n\nAvailable when `globalCounter==true`.",
|
|
60612
|
+
"fieldName": "globalCounterType"
|
|
60613
|
+
},
|
|
60570
60614
|
{
|
|
60571
60615
|
"name": "shelvedCount",
|
|
60572
60616
|
"type": {
|
|
@@ -60629,6 +60673,14 @@
|
|
|
60629
60673
|
"module": "src/components/alert-button/alert-button.ts"
|
|
60630
60674
|
}
|
|
60631
60675
|
},
|
|
60676
|
+
{
|
|
60677
|
+
"kind": "js",
|
|
60678
|
+
"name": "ObcAlertCounterItemType",
|
|
60679
|
+
"declaration": {
|
|
60680
|
+
"name": "ObcAlertCounterItemType",
|
|
60681
|
+
"module": "src/components/alert-button/alert-button.ts"
|
|
60682
|
+
}
|
|
60683
|
+
},
|
|
60632
60684
|
{
|
|
60633
60685
|
"kind": "js",
|
|
60634
60686
|
"name": "ObcAlertButton",
|
|
@@ -60653,7 +60705,7 @@
|
|
|
60653
60705
|
"declarations": [
|
|
60654
60706
|
{
|
|
60655
60707
|
"kind": "class",
|
|
60656
|
-
"description": "`<obc-alert-counter-item>` – A row of alert counts, one badge per severity.\n\nRenders a large `obc-badge` for every severity with a count above zero, most\nsevere first, followed by an optional shelved count. Nothing renders when\nnothing is counted.\n\n---\n\n### Features\n- **Two types:** `badges` draws filled badges in the severity colour;\n `alert-level` draws flat badges with the severity glyph.\n- **Every severity:** `counts` takes the whole `AlertType` vocabulary,\n including the `level-*` family, ordered by `ALERT_SEVERITY_PRIORITY`.\n- **Shelved count:** `shelvedCount` adds a neutral badge
|
|
60708
|
+
"description": "`<obc-alert-counter-item>` – A row of alert counts, one badge per severity.\n\nRenders a large `obc-badge` for every severity with a count above zero, most\nsevere first, followed by an optional shelved count. Nothing renders when\nnothing is counted.\n\n---\n\n### Features\n- **Two types:** `badges` draws filled badges in the severity colour;\n `alert-level` draws flat badges with the severity glyph.\n- **Every severity:** `counts` takes the whole `AlertType` vocabulary,\n including the `level-*` family, ordered by `ALERT_SEVERITY_PRIORITY`.\n- **Shelved count:** `shelvedCount` adds a neutral badge with the shelf icon\n at the end.\n- **Accessible summary:** the row is announced as one image labelled with\n the counts, e.g. \"2 Alarm, 4 Warning, 6 Caution\".\n\n---\n\n### Usage Guidelines\n- Show how many alerts are outstanding per severity in a compact space;\n `obc-alert-button-item` nests the counter for its global counter.\n- Pass the counts as one object: `.counts=${{countAlarm: 2, countWarning: 4}}`.\n- The counter is display-only: it renders no button and fires no events.\n- For a framed per-subsystem summary with a label, see\n `obc-alert-subsystem-counter`.\n- **TODO(designer):** the Figma component also has an Unacked counter type;\n how its icons map to counts is not defined yet.\n- **TODO(designer):** the Figma component draws alarm, warning and caution;\n critical and diagnostic use the `level-critical` and `level-diagnostic`\n badges of `obc-badge` (#1389).\n\n---\n\n### Example\n\n```html\n<obc-alert-counter-item\n .counts=${{countAlarm: 2, countWarning: 4, countCaution: 6}}\n shelvedCount=\"9\"\n></obc-alert-counter-item>\n```",
|
|
60657
60709
|
"name": "ObcAlertCounterItem",
|
|
60658
60710
|
"members": [
|
|
60659
60711
|
{
|
|
@@ -60681,7 +60733,7 @@
|
|
|
60681
60733
|
"text": "number"
|
|
60682
60734
|
},
|
|
60683
60735
|
"default": "0",
|
|
60684
|
-
"description": "Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero.",
|
|
60736
|
+
"description": "Number of shelved alerts, shown as a neutral badge with the shelf icon after the severities; hidden at zero.",
|
|
60685
60737
|
"attribute": "shelvedCount"
|
|
60686
60738
|
}
|
|
60687
60739
|
],
|
|
@@ -60700,7 +60752,7 @@
|
|
|
60700
60752
|
"text": "number"
|
|
60701
60753
|
},
|
|
60702
60754
|
"default": "0",
|
|
60703
|
-
"description": "Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero.",
|
|
60755
|
+
"description": "Number of shelved alerts, shown as a neutral badge with the shelf icon after the severities; hidden at zero.",
|
|
60704
60756
|
"fieldName": "shelvedCount"
|
|
60705
60757
|
}
|
|
60706
60758
|
],
|
|
@@ -91318,8 +91370,18 @@
|
|
|
91318
91370
|
"declarations": [
|
|
91319
91371
|
{
|
|
91320
91372
|
"kind": "class",
|
|
91321
|
-
"description": "`<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n\nProvides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n\nAppears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n\n## Features\n- **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n- **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n- **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n- **App Title & Page Name:** Displays the current application and page context.\n- **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n- **Command Button Slot:** Slot for inserting a primary command/action button.\n- **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n- **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n- **User/Profile Button:** Optional user icon for profile/account actions.\n- **Apps Button:** Optional button for accessing additional applications or modules.\n- **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n- **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n- **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n- **Tall Variant:** Optional increased height for touch or accessibility needs.\n- **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n\n## Variants\n- **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n- **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n- **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n- **Tall:** Increases the height of the bar for improved touch targets.\n\n## Usage Guidelines\nUse `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n\n- Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n- Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n- Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n- Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n- Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n\n**TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n\n## Slots\n\n| Slot Name | Renders When... | Purpose |\n|------------------|---------------------------------|----------------------------------------------------------------|\n| `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n| `command-button` | Always (if provided) | Primary command or action button for the current context. |\n| `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n| `clock` | Always (if provided) | Clock component for displaying the current time. |\n\n## Events\n- `menu-button-clicked` – Fired when the menu button is clicked.\n- `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n- `apps-button-clicked` – Fired when the apps button is clicked.\n- `
|
|
91373
|
+
"description": "`<obc-top-bar>` – A responsive top navigation bar component for application layouts.\n\nProvides a flexible, highly configurable top bar for application interfaces, supporting navigation, context display, quick actions, and status indicators. The top bar adapts to screen size and can show or hide elements such as menu, app icon, breadcrumbs, user/profile, clock, and alert notifications.\n\nAppears at the top of the UI, organizing primary navigation and contextual actions in a single, persistent region. Designed for use as the main app bar or header in multi-pane or dashboard-style layouts.\n\n## Features\n- **Configurable Sections:** Supports left and right-aligned groups for navigation, context, and actions.\n- **Menu Button:** Optional menu button for opening navigation drawers or sidebars; can be styled as wide or regular.\n- **App Icon Slot:** Customizable slot for displaying an application or brand icon.\n- **App Title & Page Name:** Displays the current application and page context.\n- **Breadcrumbs:** Optional breadcrumb navigation for hierarchical context (in settings mode).\n- **Command Button Slot:** Slot for inserting a primary command/action button.\n- **Alert/Notification Area:** Slot for alert indicators, notification badges, or custom alert components.\n- **Dimming Button:** Optional button for toggling display modes (e.g., day/night).\n- **User/Profile Button:** Optional user icon for profile/account actions.\n- **Apps Button:** Optional button for accessing additional applications or modules.\n- **Clock & Date:** Optional digital clock and date display, responsive to screen size.\n- **Responsive Layout:** Multiple breakpoint properties to control visibility and layout of elements based on viewport width.\n- **Settings Mode:** Special mode with close, back, and forward navigation, breadcrumbs, and app title.\n- **Tall Variant:** Optional increased height for touch or accessibility needs.\n- **Inactive State:** Disables interactive elements and visually de-emphasizes the bar.\n\n## Variants\n- **Regular:** Standard top bar with menu, app icon, title, page name, and action slots.\n- **Settings:** Shows close, back, forward buttons, breadcrumbs, and app title for configuration or settings screens.\n- **Inactive:** Visually muted and disables interaction (e.g., when the app is locked or in a modal state).\n- **Tall:** Increases the height of the bar for improved touch targets.\n\n## Usage Guidelines\nUse `<obc-top-bar>` as the persistent header for your application, providing navigation, context, and quick access to key actions or status. Configure which elements appear via boolean properties and slots. Adjust breakpoint properties to control responsive behavior for each section.\n\n- Place navigation, branding, and context (title, breadcrumbs) on the left; actions, alerts, and status (clock, user, apps) on the right.\n- Use the `settings` property for configuration or setup screens to enable close/back/forward navigation and breadcrumbs.\n- Use the `inactive` property to visually disable the bar and its actions when the app is not interactive.\n- Insert custom icons or buttons using the `app-icon` and `command-button` slots.\n- Use the `alerts` slot to display alert indicators, notification badges, or custom alert components.\n\n**TODO(designer):** Clarify recommended combinations of visible elements for different app contexts (e.g., when to show both user and apps buttons, or best practices for alert placement).\n\n## Slots\n\n| Slot Name | Renders When... | Purpose |\n|------------------|---------------------------------|----------------------------------------------------------------|\n| `app-icon` | `showAppIcon` is true | Custom icon representing the application or brand. |\n| `command-button` | Always (if provided) | Primary command or action button for the current context. |\n| `alerts` | Always (if provided) | Area for alert indicators, notification badges, or alert items.|\n| `clock` | Always (if provided) | Clock component for displaying the current time. |\n\n## Events\n- `menu-button-clicked` – Fired when the menu button is clicked.\n- `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.\n- `apps-button-clicked` – Fired when the apps button is clicked.\n- `more-button-clicked` – Fired when the more button is clicked.\n- `left-more-button-clicked` – Deprecated alias of `more-button-clicked`, fired with it; removed in 4.0.0.\n- `user-button-clicked` – Fired when the user/profile button is clicked.\n- `close` – Fired in settings mode when the close button is clicked.\n- `back` – Fired in settings mode when the back button is clicked.\n- `forward` – Fired in settings mode when the forward button is clicked.\n- `emergency-brightness-start` – Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.\n- `emergency-brightness-stop` – Fired when the menu button is released.\n\n## Keyboard\nEvery control in the bar is its own tab stop and activates on `Enter` and\n`Space`. The bar is a navigation landmark, not an APG toolbar: its controls\nare separate components and slotted consumer content, so a roving tabindex\nacross them is deliberately not implemented. The emergency-brightness hold\nis a pointer gesture only; from the keyboard the menu button opens the menu.\n\n## Best Practices and Constraints\n- Only show interactive elements relevant to the current context to avoid clutter.\n- Use the `alerts` slot for transient or critical notifications; persistent alerts may require a different component.\n- For accessibility, give all interactive elements labels and focus handling.\n- Adjust breakpoint properties to optimize the layout for different device sizes.\n- In settings mode, use breadcrumbs to provide clear navigation context.\n\n## Example\n\n```html\n<obc-top-bar\n appTitle=\"My App\"\n pageName=\"Dashboard\"\n showAppsButton\n showDimmingButton\n showClock\n showUserButton\n showAppIcon\n>\n <obi-placeholder slot=\"app-icon\"></obi-placeholder>\n <obc-command-button slot=\"command-button\"></obc-command-button>\n <obc-topbar-message-item slot=\"alerts\"></obc-topbar-message-item>\n <obc-clock slot=\"clock\"></obc-clock>\n</obc-top-bar>\n```",
|
|
91322
91374
|
"name": "ObcTopBar",
|
|
91375
|
+
"cssParts": [
|
|
91376
|
+
{
|
|
91377
|
+
"description": "The more button shown below the breakpoints.",
|
|
91378
|
+
"name": "more-button"
|
|
91379
|
+
},
|
|
91380
|
+
{
|
|
91381
|
+
"description": "Deprecated alias of the `more-button` part; removed in 4.0.0.",
|
|
91382
|
+
"name": "left-more-button"
|
|
91383
|
+
}
|
|
91384
|
+
],
|
|
91323
91385
|
"slots": [
|
|
91324
91386
|
{
|
|
91325
91387
|
"description": "Custom icon representing the application or brand (shown when `showAppIcon` is true)",
|
|
@@ -91406,19 +91468,28 @@
|
|
|
91406
91468
|
},
|
|
91407
91469
|
{
|
|
91408
91470
|
"kind": "field",
|
|
91409
|
-
"name": "
|
|
91471
|
+
"name": "moreButtonActivated",
|
|
91410
91472
|
"type": {
|
|
91411
91473
|
"text": "boolean"
|
|
91412
91474
|
},
|
|
91413
91475
|
"default": "false",
|
|
91414
|
-
"description": "Highlights the
|
|
91415
|
-
"attribute": "
|
|
91476
|
+
"description": "Highlights the more button as active.\n\nAvailable when `inactive==false`.",
|
|
91477
|
+
"attribute": "moreButtonActivated",
|
|
91416
91478
|
"availableWhen": "inactive==false",
|
|
91417
91479
|
"availableWhenIf": {
|
|
91418
91480
|
"arg": "inactive",
|
|
91419
91481
|
"truthy": false
|
|
91420
91482
|
}
|
|
91421
91483
|
},
|
|
91484
|
+
{
|
|
91485
|
+
"kind": "field",
|
|
91486
|
+
"name": "leftMoreButtonActivated",
|
|
91487
|
+
"type": {
|
|
91488
|
+
"text": "boolean | undefined"
|
|
91489
|
+
},
|
|
91490
|
+
"deprecated": "Use `moreButtonActivated`. Removed in 4.0.0.",
|
|
91491
|
+
"attribute": "leftMoreButtonActivated"
|
|
91492
|
+
},
|
|
91422
91493
|
{
|
|
91423
91494
|
"kind": "field",
|
|
91424
91495
|
"name": "userButtonActivated",
|
|
@@ -91619,7 +91690,7 @@
|
|
|
91619
91690
|
},
|
|
91620
91691
|
{
|
|
91621
91692
|
"kind": "method",
|
|
91622
|
-
"name": "
|
|
91693
|
+
"name": "moreButtonClicked",
|
|
91623
91694
|
"privacy": "private"
|
|
91624
91695
|
},
|
|
91625
91696
|
{
|
|
@@ -91723,12 +91794,19 @@
|
|
|
91723
91794
|
},
|
|
91724
91795
|
"description": "Fired when the apps button is clicked"
|
|
91725
91796
|
},
|
|
91797
|
+
{
|
|
91798
|
+
"name": "more-button-clicked",
|
|
91799
|
+
"type": {
|
|
91800
|
+
"text": "CustomEvent"
|
|
91801
|
+
},
|
|
91802
|
+
"description": "Fired when the more button is clicked"
|
|
91803
|
+
},
|
|
91726
91804
|
{
|
|
91727
91805
|
"name": "left-more-button-clicked",
|
|
91728
91806
|
"type": {
|
|
91729
91807
|
"text": "CustomEvent"
|
|
91730
91808
|
},
|
|
91731
|
-
"description": "Fired
|
|
91809
|
+
"description": "Deprecated: listen to `more-button-clicked` instead. Fired together with it; removed in 4.0.0."
|
|
91732
91810
|
},
|
|
91733
91811
|
{
|
|
91734
91812
|
"name": "user-button-clicked",
|
|
@@ -91832,12 +91910,20 @@
|
|
|
91832
91910
|
"fieldName": "appsButtonActivated"
|
|
91833
91911
|
},
|
|
91834
91912
|
{
|
|
91835
|
-
"name": "
|
|
91913
|
+
"name": "moreButtonActivated",
|
|
91836
91914
|
"type": {
|
|
91837
91915
|
"text": "boolean"
|
|
91838
91916
|
},
|
|
91839
91917
|
"default": "false",
|
|
91840
|
-
"description": "Highlights the
|
|
91918
|
+
"description": "Highlights the more button as active.\n\nAvailable when `inactive==false`.",
|
|
91919
|
+
"fieldName": "moreButtonActivated"
|
|
91920
|
+
},
|
|
91921
|
+
{
|
|
91922
|
+
"name": "leftMoreButtonActivated",
|
|
91923
|
+
"type": {
|
|
91924
|
+
"text": "boolean | undefined"
|
|
91925
|
+
},
|
|
91926
|
+
"deprecated": "Use `moreButtonActivated`. Removed in 4.0.0.",
|
|
91841
91927
|
"fieldName": "leftMoreButtonActivated"
|
|
91842
91928
|
},
|
|
91843
91929
|
{
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { ObcAlertButtonType } from '../alert-button-item/alert-button-item.js';
|
|
3
|
+
import { ObcAlertCounterItemType } from '../alert-counter-item/alert-counter-item.js';
|
|
3
4
|
import { AlertType, FlashingSpeed, AlertCounts } from '../../types.js';
|
|
4
5
|
import '../../icons/icon-notification.js';
|
|
5
6
|
import '../../icons/icon-notification-advice.js';
|
|
6
7
|
import '../../icons/icon-notification-advice-active.js';
|
|
7
8
|
import '../../icons/icon-silence-iec.js';
|
|
8
9
|
import '../alert-button-item/alert-button-item.js';
|
|
9
|
-
export { ObcAlertButtonType };
|
|
10
|
+
export { ObcAlertButtonType, ObcAlertCounterItemType };
|
|
10
11
|
/**
|
|
11
12
|
* `<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.
|
|
12
13
|
*
|
|
@@ -22,7 +23,7 @@ export { ObcAlertButtonType };
|
|
|
22
23
|
* - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.
|
|
23
24
|
* - **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.
|
|
24
25
|
* - **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).
|
|
25
|
-
* - **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them.
|
|
26
|
+
* - **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them; `globalCounterType` picks filled badges or the severity shapes.
|
|
26
27
|
* - **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.
|
|
27
28
|
* - **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).
|
|
28
29
|
* - **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.
|
|
@@ -80,6 +81,8 @@ export { ObcAlertButtonType };
|
|
|
80
81
|
* @availableWhen silenceButtonDisabled showSilenceButton==true
|
|
81
82
|
* @property counter - Shows the alert counter when there are active alerts and the button is not flat.
|
|
82
83
|
* @property globalCounter - Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell.
|
|
84
|
+
* @property globalCounterType - How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
85
|
+
* @availableWhen globalCounterType globalCounter==true
|
|
83
86
|
* @property counts - Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
84
87
|
* @availableWhen counts globalCounter==true
|
|
85
88
|
* @property shelvedCount - Number of shelved alerts, shown after the global counter badges; hidden at zero.
|
|
@@ -116,6 +119,12 @@ export declare class ObcAlertButton extends LitElement {
|
|
|
116
119
|
counter: boolean;
|
|
117
120
|
/** Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell. */
|
|
118
121
|
globalCounter: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
124
|
+
*
|
|
125
|
+
* Available when `globalCounter==true`.
|
|
126
|
+
*/
|
|
127
|
+
globalCounterType: ObcAlertCounterItemType;
|
|
119
128
|
/**
|
|
120
129
|
* Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
121
130
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-button.d.ts","sourceRoot":"","sources":["../../../src/components/alert-button/alert-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yCAAyC,CAAC;AACjD,OAAO,gDAAgD,CAAC;AACxD,OAAO,iCAAiC,CAAC;AACzC,OAAO,2CAA2C,CAAC;AACnD,OAAO,EAAC,kBAAkB,EAAC,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG1E,OAAO,EAAC,kBAA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D;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -6,6 +6,7 @@ import "../../icons/icon-notification-advice.js";
|
|
|
6
6
|
import "../../icons/icon-notification.js";
|
|
7
7
|
import "../../icons/icon-silence-iec.js";
|
|
8
8
|
import alert_button_default from "./alert-button.css.js";
|
|
9
|
+
import { ObcAlertCounterItemType } from "../alert-counter-item/alert-counter-item.js";
|
|
9
10
|
import { ObcAlertButtonType } from "../alert-button-item/alert-button-item.js";
|
|
10
11
|
import { localized, msg } from "@lit/localize";
|
|
11
12
|
import { LitElement, html, nothing, unsafeCSS } from "lit";
|
|
@@ -22,6 +23,7 @@ var ObcAlertButton = class ObcAlertButton extends LitElement {
|
|
|
22
23
|
this.silenceButtonDisabled = false;
|
|
23
24
|
this.counter = false;
|
|
24
25
|
this.globalCounter = false;
|
|
26
|
+
this.globalCounterType = ObcAlertCounterItemType.Badges;
|
|
25
27
|
this.counts = {};
|
|
26
28
|
this.shelvedCount = 0;
|
|
27
29
|
this.blinking = false;
|
|
@@ -65,6 +67,7 @@ var ObcAlertButton = class ObcAlertButton extends LitElement {
|
|
|
65
67
|
.nAlerts=${this.nAlerts}
|
|
66
68
|
.counter=${this.counter}
|
|
67
69
|
.globalCounter=${this.globalCounter && this.activeType !== ObcAlertButtonType.Flat}
|
|
70
|
+
.globalCounterType=${this.globalCounterType}
|
|
68
71
|
.counts=${this.counts}
|
|
69
72
|
.shelvedCount=${this.shelvedCount}
|
|
70
73
|
.blinking=${this.blinking}
|
|
@@ -100,6 +103,7 @@ __decorate([property({ type: Boolean })], ObcAlertButton.prototype, "showSilence
|
|
|
100
103
|
__decorate([property({ type: Boolean })], ObcAlertButton.prototype, "silenceButtonDisabled", void 0);
|
|
101
104
|
__decorate([property({ type: Boolean })], ObcAlertButton.prototype, "counter", void 0);
|
|
102
105
|
__decorate([property({ type: Boolean })], ObcAlertButton.prototype, "globalCounter", void 0);
|
|
106
|
+
__decorate([property({ type: String })], ObcAlertButton.prototype, "globalCounterType", void 0);
|
|
103
107
|
__decorate([property({
|
|
104
108
|
type: Object,
|
|
105
109
|
attribute: false
|
|
@@ -112,6 +116,6 @@ __decorate([property({ type: Number })], ObcAlertButton.prototype, "silenceButto
|
|
|
112
116
|
__decorate([state()], ObcAlertButton.prototype, "width", void 0);
|
|
113
117
|
ObcAlertButton = __decorate([customElement("obc-alert-button"), localized()], ObcAlertButton);
|
|
114
118
|
//#endregion
|
|
115
|
-
export { ObcAlertButton, ObcAlertButtonType };
|
|
119
|
+
export { ObcAlertButton, ObcAlertButtonType, ObcAlertCounterItemType };
|
|
116
120
|
|
|
117
121
|
//# sourceMappingURL=alert-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-button.js","names":[],"sources":["../../../src/components/alert-button/alert-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {localized, msg} from '@lit/localize';\nimport compentStyle from './alert-button.css?inline';\nimport '../../icons/icon-notification.js';\nimport '../../icons/icon-notification-advice.js';\nimport '../../icons/icon-notification-advice-active.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../alert-button-item/alert-button-item.js';\nimport {ObcAlertButtonType} from '../alert-button-item/alert-button-item.js';\nimport {AlertType, FlashingSpeed, type AlertCounts} from '../../types.js';\nimport {customElement} from '../../decorator.js';\n\nexport {ObcAlertButtonType};\n\n/**\n * `<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n *\n * This component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n *\n * Appears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions. The bell itself is an `obc-alert-button-item`; use the item directly where no silence button or breakpoints are needed, or for its global counter.\n *\n * ## Features\n *\n * - **Variants:**\n * - **Flat:** Minimal, icon-only button for space-constrained layouts.\n * - **Normal:** Standard button with icon and optional alert counter.\n * - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n * - **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n * - **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n * - **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them.\n * - **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n * - **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n * - **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n * - **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n *\n * - Use the counter to show the number of active alerts when relevant.\n * - Use the silence button to provide a quick mute action, but only when space allows.\n * - Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n * - The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n *\n * **TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n *\n * **TODO(designer):** The Figma Alert button has no flat Global counter, so below `flatMaxBreakpointPx` the button shows the flat bell without the counts.\n *\n * ## Events\n *\n * - `click-alert` – Fired when the main alert button is clicked.\n * - `click-silence` – Fired when the silence button is clicked.\n *\n * ## Best Practices & Constraints\n *\n * - Only show the counter when there are active alerts and the button is not in flat mode.\n * - The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n * - Blinking should be used sparingly to avoid overwhelming the user.\n * - Use the large variant for touch interfaces or when the button needs to stand out.\n *\n * ## Example\n *\n * ```html\n * <obc-alert-button\n * nAlerts=\"3\"\n * alertType=\"alarm\"\n * type=\"enhanced\"\n * counter\n * showSilenceButton\n * blinking\n * large\n * flatMaxBreakpointPx=\"600\"\n * silenceButtonMinBreakpointPx=\"600\"\n * ></obc-alert-button>\n * ```\n *\n * In this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.\n *\n * @property nAlerts - Number of active alerts shown in the counter; 0 shows the idle state.\n * @property alertType - Alert type that selects the icon and colours: `alarm`, `warning`, `caution`, a `level-*` severity, or unset for the idle state.\n * @property type - Visual variant: `flat` (icon only), `normal` (default, icon and optional counter) or `enhanced` (emphasized for high-priority alerts).\n * @property large - Increases the button height and padding for touch-friendly or prominent use.\n * @property showSilenceButton - Shows the silence button when the width is at least `silenceButtonMinBreakpointPx` and the button is not flat.\n * @property silenceButtonDisabled - Disables the silence button when true.\n * @availableWhen silenceButtonDisabled showSilenceButton==true\n * @property counter - Shows the alert counter when there are active alerts and the button is not flat.\n * @property globalCounter - Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell.\n * @property counts - Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).\n * @availableWhen counts globalCounter==true\n * @property shelvedCount - Number of shelved alerts, shown after the global counter badges; hidden at zero.\n * @availableWhen shelvedCount globalCounter==true\n * @property blinking - Flashes the bell for active alerts of a flashing alert type (never for caution).\n * @property flashingSpeed - Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.\n * @availableWhen flashingSpeed blinking==true\n * @property flatMaxBreakpointPx - Window width in px below which a `normal` or `enhanced` button switches to flat mode.\n * @availableWhen flatMaxBreakpointPx type!=flat\n * @property silenceButtonMinBreakpointPx - Minimum window width in px for showing the silence button.\n * @availableWhen silenceButtonMinBreakpointPx showSilenceButton==true\n * @fires {CustomEvent<void>} click-alert - Fired when the main alert button is clicked.\n * @fires {CustomEvent<void>} click-silence - Fired when the silence button is clicked.\n * @stable\n */\n@customElement('obc-alert-button')\n@localized()\nexport class ObcAlertButton extends LitElement {\n @property({type: Number}) nAlerts = 0;\n @property({type: String}) alertType?: AlertType;\n @property({type: String}) type = ObcAlertButtonType.Normal;\n @property({type: Boolean}) large = false;\n @property({type: Boolean}) showSilenceButton = false;\n @property({type: Boolean}) silenceButtonDisabled = false;\n @property({type: Boolean}) counter = false;\n @property({type: Boolean}) globalCounter = false;\n @property({type: Object, attribute: false}) counts: AlertCounts = {};\n @property({type: Number}) shelvedCount = 0;\n @property({type: Boolean}) blinking = false;\n @property({type: String}) flashingSpeed: FlashingSpeed =\n FlashingSpeed.Default;\n @property({type: Number}) flatMaxBreakpointPx = 0;\n @property({type: Number}) silenceButtonMinBreakpointPx = 0;\n\n @state() private width = window.innerWidth;\n\n private resizeListener = () => {\n this.width = window.innerWidth;\n };\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('resize', this.resizeListener);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('resize', this.resizeListener);\n super.disconnectedCallback();\n }\n\n private get activeType(): ObcAlertButtonType {\n if (this.type === ObcAlertButtonType.Flat) {\n return ObcAlertButtonType.Flat;\n }\n if (this.width < this.flatMaxBreakpointPx) {\n return ObcAlertButtonType.Flat;\n }\n return this.type;\n }\n\n private get showSilenceButtonDynamic(): boolean {\n return (\n this.showSilenceButton &&\n this.width >= this.silenceButtonMinBreakpointPx &&\n this.activeType !== ObcAlertButtonType.Flat\n );\n }\n\n override render() {\n const showSilence = this.showSilenceButtonDynamic;\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`type-${this.activeType}`]: true,\n large: this.large,\n })}\n >\n <obc-alert-button-item\n .type=${this.activeType}\n .alertType=${this.alertType}\n .nAlerts=${this.nAlerts}\n .counter=${this.counter}\n .globalCounter=${\n this.globalCounter && this.activeType !== ObcAlertButtonType.Flat\n }\n .counts=${this.counts}\n .shelvedCount=${this.shelvedCount}\n .blinking=${this.blinking}\n .flashingSpeed=${this.flashingSpeed}\n .fillHeight=${this.large}\n ?data-group-item-not-last=${showSilence}\n @click=${() => this.dispatchEvent(new CustomEvent('click-alert'))}\n ></obc-alert-button-item>\n ${\n showSilence\n ? html`\n <button\n class=\"silence-button\"\n aria-label=${msg('Silence')}\n @click=${() =>\n this.dispatchEvent(new CustomEvent('click-silence'))}\n ?disabled=${this.silenceButtonDisabled}\n >\n <div class=\"visible-wrapper\">\n <obi-silence-iec class=\"icon\"></obi-silence-iec>\n </div>\n </button>\n `\n : nothing\n }\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button': ObcAlertButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AA0GO,IAAM,iBAAN,MAAM,uBAAuB,WAAW;;;EACT,KAAA,UAAA;EAEH,KAAA,OAAA,mBAAmB;EACjB,KAAA,QAAA;EACY,KAAA,oBAAA;EACI,KAAA,wBAAA;EACd,KAAA,UAAA;EACM,KAAA,gBAAA;EACuB,KAAA,SAAA,CAAC;EAC1B,KAAA,eAAA;EACH,KAAA,WAAA;EAEpC,KAAA,gBAAA,cAAc;EACgC,KAAA,sBAAA;EACS,KAAA,+BAAA;EAEhC,KAAA,QAAA,OAAO;EAED,KAAA,uBAAA;GAC7B,KAAK,QAAQ,OAAO;EACtB;;CAEA,oBAA6B;EAC3B,MAAM,kBAAkB;EACxB,OAAO,iBAAiB,UAAU,KAAK,cAAc;CACvD;CAEA,uBAAgC;EAC9B,OAAO,oBAAoB,UAAU,KAAK,cAAc;EACxD,MAAM,qBAAqB;CAC7B;CAEA,IAAY,aAAiC;EAC3C,IAAI,KAAK,SAAS,mBAAmB,MACnC,OAAO,mBAAmB;EAE5B,IAAI,KAAK,QAAQ,KAAK,qBACpB,OAAO,mBAAmB;EAE5B,OAAO,KAAK;CACd;CAEA,IAAY,2BAAoC;EAC9C,OACE,KAAK,qBACL,KAAK,SAAS,KAAK,gCACnB,KAAK,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A,GAAA,eAAA,WAAA,WAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,eAAA,WAAA,iBAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAK,CAAC,CAAA,GAAA,eAAA,WAAA,UAAA,KAAA,CAAA;AACzC,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,gBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,eAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,iBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,uBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,gCAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,MAAM,CAAA,GAAA,eAAA,WAAA,SAAA,KAAA,CAAA;AAnBR,iBAAA,WAAA,CAAA,cAAc,kBAAkB,GAChC,UAAU,CAAA,GAAA,cAAA"}
|
|
1
|
+
{"version":3,"file":"alert-button.js","names":[],"sources":["../../../src/components/alert-button/alert-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {localized, msg} from '@lit/localize';\nimport compentStyle from './alert-button.css?inline';\nimport '../../icons/icon-notification.js';\nimport '../../icons/icon-notification-advice.js';\nimport '../../icons/icon-notification-advice-active.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../alert-button-item/alert-button-item.js';\nimport {ObcAlertButtonType} from '../alert-button-item/alert-button-item.js';\nimport {ObcAlertCounterItemType} from '../alert-counter-item/alert-counter-item.js';\nimport {AlertType, FlashingSpeed, type AlertCounts} from '../../types.js';\nimport {customElement} from '../../decorator.js';\n\nexport {ObcAlertButtonType, ObcAlertCounterItemType};\n\n/**\n * `<obc-alert-button>` – A compact, icon-based button for displaying alert or notification status and count.\n *\n * This component provides a visual indicator for active alerts or notifications, supporting different alert types (such as alarm, warning, or caution) and an optional counter badge. It can also include a secondary \"silence\" action button for muting alerts, adapting its layout responsively for different screen widths.\n *\n * Appears in toolbars or notification areas to give users a quick overview of alert status and provide direct access to alert-related actions. The bell itself is an `obc-alert-button-item`; use the item directly where no silence button or breakpoints are needed, or for its global counter.\n *\n * ## Features\n *\n * - **Variants:**\n * - **Flat:** Minimal, icon-only button for space-constrained layouts.\n * - **Normal:** Standard button with icon and optional alert counter.\n * - **Enhanced:** Visually prominent button for high-priority alerts, with accent styling.\n * - **Alert Types:** Supports `alarm`, `warning`, `caution`, or no alert (idle). Icon and color adapt to the alert type.\n * - **Alert Counter:** Optional badge displays the number of active alerts (except in flat mode).\n * - **Global Counter:** `globalCounter` shows the per-severity `counts` and an optional `shelvedCount` before the bell and the total, as `obc-alert-button-item` draws them; `globalCounterType` picks filled badges or the severity shapes.\n * - **Silence Button:** Optional secondary button to mute or silence alerts, shown when enabled and at sufficient width.\n * - **Blinking Animation:** Can animate (blink) to draw attention to active alerts (except for caution type).\n * - **Responsive Layout:** Automatically switches to flat mode below a configurable width, and hides the silence button below another configurable width.\n * - **Large Size Option:** Increases button height and padding for touch-friendly or prominent use.\n *\n * ## Usage Guidelines\n *\n * Use `<obc-alert-button>` to provide a persistent, easily accessible indicator of alert or notification status. Ideal for toolbars, headers, or notification panels where users need to be aware of active alerts and may need to silence them quickly.\n *\n * - Use the counter to show the number of active alerts when relevant.\n * - Use the silence button to provide a quick mute action, but only when space allows.\n * - Choose the variant (`flat`, `normal`, `enhanced`) based on available space and the importance of the alert.\n * - The blinking feature should be reserved for urgent or high-priority alerts to avoid unnecessary distraction.\n *\n * **TODO(designer):** Confirm if there are recommended default behaviors for auto-blinking, and if there are any design constraints for when to use each variant.\n *\n * **TODO(designer):** The Figma Alert button has no flat Global counter, so below `flatMaxBreakpointPx` the button shows the flat bell without the counts.\n *\n * ## Events\n *\n * - `click-alert` – Fired when the main alert button is clicked.\n * - `click-silence` – Fired when the silence button is clicked.\n *\n * ## Best Practices & Constraints\n *\n * - Only show the counter when there are active alerts and the button is not in flat mode.\n * - The silence button is only visible if enabled, the width is above the minimum breakpoint, and the button is not flat.\n * - Blinking should be used sparingly to avoid overwhelming the user.\n * - Use the large variant for touch interfaces or when the button needs to stand out.\n *\n * ## Example\n *\n * ```html\n * <obc-alert-button\n * nAlerts=\"3\"\n * alertType=\"alarm\"\n * type=\"enhanced\"\n * counter\n * showSilenceButton\n * blinking\n * large\n * flatMaxBreakpointPx=\"600\"\n * silenceButtonMinBreakpointPx=\"600\"\n * ></obc-alert-button>\n * ```\n *\n * In this example, the button shows an alarm icon, a counter badge with \"3\", is styled as enhanced, blinks to indicate urgency, and includes a silence button if the width allows.\n *\n * @property nAlerts - Number of active alerts shown in the counter; 0 shows the idle state.\n * @property alertType - Alert type that selects the icon and colours: `alarm`, `warning`, `caution`, a `level-*` severity, or unset for the idle state.\n * @property type - Visual variant: `flat` (icon only), `normal` (default, icon and optional counter) or `enhanced` (emphasized for high-priority alerts).\n * @property large - Increases the button height and padding for touch-friendly or prominent use.\n * @property showSilenceButton - Shows the silence button when the width is at least `silenceButtonMinBreakpointPx` and the button is not flat.\n * @property silenceButtonDisabled - Disables the silence button when true.\n * @availableWhen silenceButtonDisabled showSilenceButton==true\n * @property counter - Shows the alert counter when there are active alerts and the button is not flat.\n * @property globalCounter - Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell.\n * @property globalCounterType - How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n * @availableWhen globalCounterType globalCounter==true\n * @property counts - Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).\n * @availableWhen counts globalCounter==true\n * @property shelvedCount - Number of shelved alerts, shown after the global counter badges; hidden at zero.\n * @availableWhen shelvedCount globalCounter==true\n * @property blinking - Flashes the bell for active alerts of a flashing alert type (never for caution).\n * @property flashingSpeed - Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.\n * @availableWhen flashingSpeed blinking==true\n * @property flatMaxBreakpointPx - Window width in px below which a `normal` or `enhanced` button switches to flat mode.\n * @availableWhen flatMaxBreakpointPx type!=flat\n * @property silenceButtonMinBreakpointPx - Minimum window width in px for showing the silence button.\n * @availableWhen silenceButtonMinBreakpointPx showSilenceButton==true\n * @fires {CustomEvent<void>} click-alert - Fired when the main alert button is clicked.\n * @fires {CustomEvent<void>} click-silence - Fired when the silence button is clicked.\n * @stable\n */\n@customElement('obc-alert-button')\n@localized()\nexport class ObcAlertButton extends LitElement {\n @property({type: Number}) nAlerts = 0;\n @property({type: String}) alertType?: AlertType;\n @property({type: String}) type = ObcAlertButtonType.Normal;\n @property({type: Boolean}) large = false;\n @property({type: Boolean}) showSilenceButton = false;\n @property({type: Boolean}) silenceButtonDisabled = false;\n @property({type: Boolean}) counter = false;\n @property({type: Boolean}) globalCounter = false;\n @property({type: String}) globalCounterType: ObcAlertCounterItemType =\n ObcAlertCounterItemType.Badges;\n @property({type: Object, attribute: false}) counts: AlertCounts = {};\n @property({type: Number}) shelvedCount = 0;\n @property({type: Boolean}) blinking = false;\n @property({type: String}) flashingSpeed: FlashingSpeed =\n FlashingSpeed.Default;\n @property({type: Number}) flatMaxBreakpointPx = 0;\n @property({type: Number}) silenceButtonMinBreakpointPx = 0;\n\n @state() private width = window.innerWidth;\n\n private resizeListener = () => {\n this.width = window.innerWidth;\n };\n\n override connectedCallback() {\n super.connectedCallback();\n window.addEventListener('resize', this.resizeListener);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('resize', this.resizeListener);\n super.disconnectedCallback();\n }\n\n private get activeType(): ObcAlertButtonType {\n if (this.type === ObcAlertButtonType.Flat) {\n return ObcAlertButtonType.Flat;\n }\n if (this.width < this.flatMaxBreakpointPx) {\n return ObcAlertButtonType.Flat;\n }\n return this.type;\n }\n\n private get showSilenceButtonDynamic(): boolean {\n return (\n this.showSilenceButton &&\n this.width >= this.silenceButtonMinBreakpointPx &&\n this.activeType !== ObcAlertButtonType.Flat\n );\n }\n\n override render() {\n const showSilence = this.showSilenceButtonDynamic;\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [`type-${this.activeType}`]: true,\n large: this.large,\n })}\n >\n <obc-alert-button-item\n .type=${this.activeType}\n .alertType=${this.alertType}\n .nAlerts=${this.nAlerts}\n .counter=${this.counter}\n .globalCounter=${\n this.globalCounter && this.activeType !== ObcAlertButtonType.Flat\n }\n .globalCounterType=${this.globalCounterType}\n .counts=${this.counts}\n .shelvedCount=${this.shelvedCount}\n .blinking=${this.blinking}\n .flashingSpeed=${this.flashingSpeed}\n .fillHeight=${this.large}\n ?data-group-item-not-last=${showSilence}\n @click=${() => this.dispatchEvent(new CustomEvent('click-alert'))}\n ></obc-alert-button-item>\n ${\n showSilence\n ? html`\n <button\n class=\"silence-button\"\n aria-label=${msg('Silence')}\n @click=${() =>\n this.dispatchEvent(new CustomEvent('click-silence'))}\n ?disabled=${this.silenceButtonDisabled}\n >\n <div class=\"visible-wrapper\">\n <obi-silence-iec class=\"icon\"></obi-silence-iec>\n </div>\n </button>\n `\n : nothing\n }\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button': ObcAlertButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6GO,IAAM,iBAAN,MAAM,uBAAuB,WAAW;;;EACT,KAAA,UAAA;EAEH,KAAA,OAAA,mBAAmB;EACjB,KAAA,QAAA;EACY,KAAA,oBAAA;EACI,KAAA,wBAAA;EACd,KAAA,UAAA;EAC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AAA,iBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,uBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,eAAA,WAAA,gCAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,MAAM,CAAA,GAAA,eAAA,WAAA,SAAA,KAAA,CAAA;AArBR,iBAAA,WAAA,CAAA,cAAc,kBAAkB,GAChC,UAAU,CAAA,GAAA,cAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { ObcAlertCounterItemType } from '../alert-counter-item/alert-counter-item.js';
|
|
2
3
|
import { AlertType, FlashingSpeed, AlertCounts, ResolvedFlashingSpeed } from '../../types.js';
|
|
3
4
|
import { FlashingController } from '../../palettes/flashing-controller.js';
|
|
4
5
|
import '../../icons/icon-alerts.js';
|
|
@@ -38,7 +39,8 @@ export declare enum ObcAlertButtonType {
|
|
|
38
39
|
* `nAlerts` of 0 shows the idle bell.
|
|
39
40
|
* - **Counter:** `counter` shows `nAlerts` next to the bell, except in `flat`.
|
|
40
41
|
* - **Global counter:** `globalCounter` shows the per-severity `counts` as
|
|
41
|
-
* badges, then the bell and `nAlerts`, always in the normal style
|
|
42
|
+
* badges, then the bell and `nAlerts`, always in the normal style;
|
|
43
|
+
* `globalCounterType` picks filled badges or the severity shapes.
|
|
42
44
|
* - **Flashing:** `blinking` flashes the bell at the tempo `flashingSpeed`
|
|
43
45
|
* resolves (#1224).
|
|
44
46
|
* - **Fill height:** `fillHeight` stretches the visible button to the host
|
|
@@ -82,6 +84,8 @@ export declare enum ObcAlertButtonType {
|
|
|
82
84
|
* @property counter - Shows `nAlerts` next to the bell (not in `flat`).
|
|
83
85
|
* @availableWhen counter globalCounter==false
|
|
84
86
|
* @property globalCounter - Shows the per-severity counts, the bell and the total instead of a single alert status.
|
|
87
|
+
* @property globalCounterType - How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
88
|
+
* @availableWhen globalCounterType globalCounter==true
|
|
85
89
|
* @property counts - Alert count per severity for the global counter badges.
|
|
86
90
|
* @availableWhen counts globalCounter==true
|
|
87
91
|
* @property shelvedCount - Number of shelved alerts, shown after the global counter badges.
|
|
@@ -118,6 +122,12 @@ export declare class ObcAlertButtonItem extends LitElement {
|
|
|
118
122
|
counter: boolean;
|
|
119
123
|
/** Shows the per-severity counts, the bell and the total instead of a single alert status. */
|
|
120
124
|
globalCounter: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
127
|
+
*
|
|
128
|
+
* Available when `globalCounter==true`.
|
|
129
|
+
*/
|
|
130
|
+
globalCounterType: ObcAlertCounterItemType;
|
|
121
131
|
/**
|
|
122
132
|
* Alert count per severity for the global counter badges.
|
|
123
133
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-button-item.d.ts","sourceRoot":"","sources":["../../../src/components/alert-button-item/alert-button-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,4BAA4B,CAAC;AACpC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,0CAA0C,CAAC;AAClD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AACpD,OAAO,mDAAmD,CAAC;AAC3D,OAAO,qDAAqD,CAAC;AAC7D,OAAO,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"alert-button-item.d.ts","sourceRoot":"","sources":["../../../src/components/alert-button-item/alert-button-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,OAAO,4BAA4B,CAAC;AACpC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,0CAA0C,CAAC;AAClD,OA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,EAAE,kBAAkB,CAAC;KAC7C;CACF"}
|
|
@@ -37,6 +37,7 @@ var ObcAlertButtonItem = class ObcAlertButtonItem extends LitElement {
|
|
|
37
37
|
this.nAlerts = 0;
|
|
38
38
|
this.counter = false;
|
|
39
39
|
this.globalCounter = false;
|
|
40
|
+
this.globalCounterType = ObcAlertCounterItemType.Badges;
|
|
40
41
|
this.counts = {};
|
|
41
42
|
this.shelvedCount = 0;
|
|
42
43
|
this.blinking = false;
|
|
@@ -96,7 +97,7 @@ var ObcAlertButtonItem = class ObcAlertButtonItem extends LitElement {
|
|
|
96
97
|
renderCounts() {
|
|
97
98
|
if (rankAlertCounts(this.counts).length === 0 && this.shelvedCount <= 0) return nothing;
|
|
98
99
|
return html`<obc-alert-counter-item
|
|
99
|
-
.type=${
|
|
100
|
+
.type=${this.globalCounterType}
|
|
100
101
|
.counts=${this.counts}
|
|
101
102
|
.shelvedCount=${this.shelvedCount}
|
|
102
103
|
></obc-alert-counter-item>`;
|
|
@@ -146,6 +147,7 @@ __decorate([property({ type: String })], ObcAlertButtonItem.prototype, "alertTyp
|
|
|
146
147
|
__decorate([property({ type: Number })], ObcAlertButtonItem.prototype, "nAlerts", void 0);
|
|
147
148
|
__decorate([property({ type: Boolean })], ObcAlertButtonItem.prototype, "counter", void 0);
|
|
148
149
|
__decorate([property({ type: Boolean })], ObcAlertButtonItem.prototype, "globalCounter", void 0);
|
|
150
|
+
__decorate([property({ type: String })], ObcAlertButtonItem.prototype, "globalCounterType", void 0);
|
|
149
151
|
__decorate([property({
|
|
150
152
|
type: Object,
|
|
151
153
|
attribute: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-button-item.js","names":[],"sources":["../../../src/components/alert-button-item/alert-button-item.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {localized, msg} from '@lit/localize';\nimport componentStyle from './alert-button-item.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-alerts-alarm-twotone.js';\nimport '../../icons/icon-alerts-warning-twotone.js';\nimport '../../icons/icon-alerts-caution-twotone.js';\nimport '../../manual-icon/icon-alerts-critical-twotone.js';\nimport '../../manual-icon/icon-alerts-diagnostic-twotone.js';\nimport '../alert-counter-item/alert-counter-item.js';\nimport {ObcAlertCounterItemType} from '../alert-counter-item/alert-counter-item.js';\nimport {\n AlertType,\n FlashingSpeed,\n type AlertCounts,\n type ResolvedFlashingSpeed,\n} from '../../types.js';\nimport {\n AlertFlashPhase,\n AlertTwotoneComponent,\n alertCountsLabel,\n alertTypeLabel,\n getAlertTwotoneComponent,\n rankAlertCounts,\n resolveFlashingSpeed,\n} from '../../alert-severity.js';\nimport {FlashingController} from '../../palettes/flashing-controller.js';\n\n/**\n * `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.\n *\n * - `flat`: Minimal, icon-only button for compact spaces.\n * - `normal`: Standard button with icon and optional counter.\n * - `enhanced`: Emphasized button with additional styling for high-priority alerts.\n */\nexport enum ObcAlertButtonType {\n Flat = 'flat',\n Normal = 'normal',\n Enhanced = 'enhanced',\n}\n\n/**\n * `<obc-alert-button-item>` – The bell button that shows the alert state and count.\n *\n * Shows the alert status as a bell in the style of the given alert type, with\n * an optional counter, or as a global counter: one badge per severity, then\n * the bell and the total. `obc-alert-button` renders the item next to its\n * silence button; use the item on its own where no silence button is needed.\n *\n * ---\n *\n * ### Features\n * - **Variants (`type`):** `flat` (icon only), `normal` (bordered, icon and\n * counter) and `enhanced` (filled in the severity colour).\n * - **Alert types:** `alarm`, `warning`, `caution` and the `level-*` family;\n * `nAlerts` of 0 shows the idle bell.\n * - **Counter:** `counter` shows `nAlerts` next to the bell, except in `flat`.\n * - **Global counter:** `globalCounter` shows the per-severity `counts` as\n * badges, then the bell and `nAlerts`, always in the normal style.\n * - **Flashing:** `blinking` flashes the bell at the tempo `flashingSpeed`\n * resolves (#1224).\n * - **Fill height:** `fillHeight` stretches the visible button to the host\n * height, as the tall `obc-alert-button` does.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Keep `nAlerts` and `counts` consistent; the item shows both as given.\n * - The generated label reads e.g. \"Alerts, 12, 2 Alarm, 4 Warning,\n * 6 Caution\"; an `aria-label` on the host replaces it. A visually hidden\n * polite live region repeats that name, so a change of counts is announced\n * without the button holding focus; the name attribute alone would change\n * silently.\n * - A native button, so Enter and Space activate it (APG button pattern).\n * - A parent that joins another button to the item's end sets the\n * `data-group-item-not-last` attribute on the host.\n * - **TODO(designer):** the Figma file draws the flat item's hover, active and\n * focused variants at 20 % opacity; the item uses the standard flat states.\n * - **TODO(designer):** the Figma file defines no flashing for the global\n * counter, so it never flashes.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-alert-button-item alertType=\"alarm\" nAlerts=\"3\" counter blinking></obc-alert-button-item>\n * <obc-alert-button-item\n * globalCounter\n * nAlerts=\"12\"\n * .counts=${{countAlarm: 2, countWarning: 4, countCaution: 6}}\n * ></obc-alert-button-item>\n * ```\n *\n * @property type - Visual variant: `flat` (icon only), `normal` (default, bordered with the counter) or `enhanced` (filled in the severity colour).\n * @availableWhen type globalCounter==false\n * @property alertType - Alert type that selects the icon and colours: `alarm`, `warning`, `caution` or a `level-*` severity.\n * @availableWhen alertType globalCounter==false\n * @property nAlerts - Number of active alerts; 0 shows the idle bell and hides the counter.\n * @property counter - Shows `nAlerts` next to the bell (not in `flat`).\n * @availableWhen counter globalCounter==false\n * @property globalCounter - Shows the per-severity counts, the bell and the total instead of a single alert status.\n * @property counts - Alert count per severity for the global counter badges.\n * @availableWhen counts globalCounter==true\n * @property shelvedCount - Number of shelved alerts, shown after the global counter badges.\n * @availableWhen shelvedCount globalCounter==true\n * @property blinking - Flashes the bell while there are active alerts of a flashing alert type.\n * @availableWhen blinking globalCounter==false\n * @property flashingSpeed - Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.\n * @availableWhen flashingSpeed blinking==true\n * @property fillHeight - Stretches the visible button to the host height instead of the 32 px visual target.\n * @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.\n * @fires click - Fired when the button is clicked.\n * @experimental\n */\n@customElement('obc-alert-button-item')\n@localized()\nexport class ObcAlertButtonItem extends LitElement {\n @property({type: String}) type: ObcAlertButtonType =\n ObcAlertButtonType.Normal;\n @property({type: String}) alertType?: AlertType;\n @property({type: Number}) nAlerts = 0;\n @property({type: Boolean}) counter = false;\n @property({type: Boolean}) globalCounter = false;\n @property({type: Object, attribute: false}) counts: AlertCounts = {};\n @property({type: Number}) shelvedCount = 0;\n @property({type: Boolean}) blinking = false;\n @property({type: String}) flashingSpeed: FlashingSpeed =\n FlashingSpeed.Default;\n @property({type: Boolean}) fillHeight = false;\n\n // Reactive so a consumer changing the name re-renders the shadow button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n protected readonly flashing = new FlashingController(\n this,\n () => this.resolvedFlashingSpeed\n );\n\n get resolvedFlashingSpeed(): ResolvedFlashingSpeed {\n if (\n this.globalCounter ||\n !this.blinking ||\n this.nAlerts <= 0 ||\n this.alertType === undefined\n ) {\n return FlashingSpeed.Fixed;\n }\n return resolveFlashingSpeed(\n this.flashingSpeed,\n this.alertType,\n AlertFlashPhase.Active\n );\n }\n\n private get accessibleName(): string {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n const parts = [msg('Alerts')];\n if (this.nAlerts > 0) {\n parts.push(String(this.nAlerts));\n }\n if (this.globalCounter) {\n const breakdown = alertCountsLabel(this.counts, this.shelvedCount);\n if (breakdown) {\n parts.push(breakdown);\n }\n } else if (this.nAlerts > 0 && this.alertType) {\n parts.push(alertTypeLabel(this.alertType));\n }\n return parts.join(', ');\n }\n\n private renderTwotoneIcon() {\n const twotone = this.alertType\n ? getAlertTwotoneComponent(this.alertType)\n : AlertTwotoneComponent.Caution;\n switch (twotone) {\n case AlertTwotoneComponent.Critical:\n return html`<obi-alerts-critical-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-critical-twotone>`;\n case AlertTwotoneComponent.Diagnostic:\n return html`<obi-alerts-diagnostic-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-diagnostic-twotone>`;\n case AlertTwotoneComponent.Warning:\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n case AlertTwotoneComponent.Caution:\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n default:\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n }\n }\n\n /** The blink layer shows the opposite of the steady layer in each flash. */\n private renderIcon(styleType: ObcAlertButtonType, blinkLayer: boolean) {\n if (this.nAlerts === 0) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n const enhanced = styleType === ObcAlertButtonType.Enhanced;\n if (blinkLayer) {\n return enhanced\n ? this.renderTwotoneIcon()\n : html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n return enhanced || this.globalCounter\n ? html`<obi-alerts-active class=\"icon\"></obi-alerts-active>`\n : this.renderTwotoneIcon();\n }\n\n private renderCount() {\n return html`<span class=\"count\">${this.nAlerts}</span>`;\n }\n\n private renderCounts() {\n if (rankAlertCounts(this.counts).length === 0 && this.shelvedCount <= 0) {\n return nothing;\n }\n return html`<obc-alert-counter-item\n .type=${ObcAlertCounterItemType.Badges}\n .counts=${this.counts}\n .shelvedCount=${this.shelvedCount}\n ></obc-alert-counter-item>`;\n }\n\n override render() {\n const styleType = this.globalCounter\n ? ObcAlertButtonType.Normal\n : this.type;\n const showCount =\n this.nAlerts > 0 &&\n (this.globalCounter ||\n (this.counter && styleType !== ObcAlertButtonType.Flat));\n const tempo = this.resolvedFlashingSpeed;\n return html`\n <button\n class=${classMap({\n 'alert-button': true,\n [`type-${styleType}`]: true,\n [`alert-type-${this.alertType ?? 'none'}`]: true,\n counter: showCount && !this.globalCounter,\n 'global-counter': this.globalCounter,\n 'fill-height': this.fillHeight,\n [`flash-${tempo}`]: true,\n })}\n aria-label=${this.accessibleName}\n >\n ${\n tempo === FlashingSpeed.Fixed\n ? nothing\n : html`<div class=\"blink\" aria-hidden=\"true\">\n <div class=\"content\">\n ${this.renderIcon(styleType, true)}\n ${showCount ? this.renderCount() : nothing}\n </div>\n </div>`\n }\n <div class=\"visible-wrapper\">\n ${this.globalCounter ? this.renderCounts() : nothing}\n <div class=\"content\">\n ${this.renderIcon(styleType, false)}\n ${showCount ? this.renderCount() : nothing}\n </div>\n </div>\n </button>\n <span class=\"announcement\" aria-live=\"polite\" aria-atomic=\"true\"\n >${this.accessibleName}</span\n >\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button-item': ObcAlertButtonItem;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAY,qBAAL,yBAAA,oBAAA;CACL,mBAAA,UAAA;CACA,mBAAA,YAAA;CACA,mBAAA,cAAA;;AACF,EAAA,CAAA,CAAA;AA8EO,IAAM,qBAAN,MAAM,2BAA2B,WAAW;;;;EAIb,KAAA,UAAA;EACC,KAAA,UAAA;EACM,KAAA,gBAAA;EACuB,KAAA,SAAA,CAAC;EAC1B,KAAA,eAAA;EACH,KAAA,WAAA;EAEpC,KAAA,gBAAA,cAAc;EACwB,KAAA,aAAA;EAIJ,KAAA,YAAA;EAEN,KAAA,WAAA,IAAI,mBAChC,YACM,KAAK,qBACb;;CAEA,IAAI,wBAA+C;EACjD,IACE,KAAK,iBACL,CAAC,KAAK,YACN,KAAK,WAAW,KAChB,KAAK,cAAc,KAAA,GAEnB,OAAO,cAAc;EAEvB,OAAO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S,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mBAAA,WAAA,gBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,mBAAA,WAAA,YAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mBAAA,WAAA,iBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,mBAAA,WAAA,cAAA,KAAA,CAAA;AAGxB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,mBAAA,WAAA,aAAA,KAAA,CAAA;AAjBlD,qBAAA,WAAA,CAAA,cAAc,uBAAuB,GACrC,UAAU,CAAA,GAAA,kBAAA"}
|
|
1
|
+
{"version":3,"file":"alert-button-item.js","names":[],"sources":["../../../src/components/alert-button-item/alert-button-item.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {localized, msg} from '@lit/localize';\nimport componentStyle from './alert-button-item.css?inline';\nimport {customElement} from '../../decorator.js';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-alerts-alarm-twotone.js';\nimport '../../icons/icon-alerts-warning-twotone.js';\nimport '../../icons/icon-alerts-caution-twotone.js';\nimport '../../manual-icon/icon-alerts-critical-twotone.js';\nimport '../../manual-icon/icon-alerts-diagnostic-twotone.js';\nimport '../alert-counter-item/alert-counter-item.js';\nimport {ObcAlertCounterItemType} from '../alert-counter-item/alert-counter-item.js';\nimport {\n AlertType,\n FlashingSpeed,\n type AlertCounts,\n type ResolvedFlashingSpeed,\n} from '../../types.js';\nimport {\n AlertFlashPhase,\n AlertTwotoneComponent,\n alertCountsLabel,\n alertTypeLabel,\n getAlertTwotoneComponent,\n rankAlertCounts,\n resolveFlashingSpeed,\n} from '../../alert-severity.js';\nimport {FlashingController} from '../../palettes/flashing-controller.js';\n\n/**\n * `ObcAlertButtonType` – Enum for alert button visual and behavioral variants.\n *\n * - `flat`: Minimal, icon-only button for compact spaces.\n * - `normal`: Standard button with icon and optional counter.\n * - `enhanced`: Emphasized button with additional styling for high-priority alerts.\n */\nexport enum ObcAlertButtonType {\n Flat = 'flat',\n Normal = 'normal',\n Enhanced = 'enhanced',\n}\n\n/**\n * `<obc-alert-button-item>` – The bell button that shows the alert state and count.\n *\n * Shows the alert status as a bell in the style of the given alert type, with\n * an optional counter, or as a global counter: one badge per severity, then\n * the bell and the total. `obc-alert-button` renders the item next to its\n * silence button; use the item on its own where no silence button is needed.\n *\n * ---\n *\n * ### Features\n * - **Variants (`type`):** `flat` (icon only), `normal` (bordered, icon and\n * counter) and `enhanced` (filled in the severity colour).\n * - **Alert types:** `alarm`, `warning`, `caution` and the `level-*` family;\n * `nAlerts` of 0 shows the idle bell.\n * - **Counter:** `counter` shows `nAlerts` next to the bell, except in `flat`.\n * - **Global counter:** `globalCounter` shows the per-severity `counts` as\n * badges, then the bell and `nAlerts`, always in the normal style;\n * `globalCounterType` picks filled badges or the severity shapes.\n * - **Flashing:** `blinking` flashes the bell at the tempo `flashingSpeed`\n * resolves (#1224).\n * - **Fill height:** `fillHeight` stretches the visible button to the host\n * height, as the tall `obc-alert-button` does.\n *\n * ---\n *\n * ### Usage Guidelines\n * - Keep `nAlerts` and `counts` consistent; the item shows both as given.\n * - The generated label reads e.g. \"Alerts, 12, 2 Alarm, 4 Warning,\n * 6 Caution\"; an `aria-label` on the host replaces it. A visually hidden\n * polite live region repeats that name, so a change of counts is announced\n * without the button holding focus; the name attribute alone would change\n * silently.\n * - A native button, so Enter and Space activate it (APG button pattern).\n * - A parent that joins another button to the item's end sets the\n * `data-group-item-not-last` attribute on the host.\n * - **TODO(designer):** the Figma file draws the flat item's hover, active and\n * focused variants at 20 % opacity; the item uses the standard flat states.\n * - **TODO(designer):** the Figma file defines no flashing for the global\n * counter, so it never flashes.\n *\n * ---\n *\n * ### Example\n *\n * ```html\n * <obc-alert-button-item alertType=\"alarm\" nAlerts=\"3\" counter blinking></obc-alert-button-item>\n * <obc-alert-button-item\n * globalCounter\n * nAlerts=\"12\"\n * .counts=${{countAlarm: 2, countWarning: 4, countCaution: 6}}\n * ></obc-alert-button-item>\n * ```\n *\n * @property type - Visual variant: `flat` (icon only), `normal` (default, bordered with the counter) or `enhanced` (filled in the severity colour).\n * @availableWhen type globalCounter==false\n * @property alertType - Alert type that selects the icon and colours: `alarm`, `warning`, `caution` or a `level-*` severity.\n * @availableWhen alertType globalCounter==false\n * @property nAlerts - Number of active alerts; 0 shows the idle bell and hides the counter.\n * @property counter - Shows `nAlerts` next to the bell (not in `flat`).\n * @availableWhen counter globalCounter==false\n * @property globalCounter - Shows the per-severity counts, the bell and the total instead of a single alert status.\n * @property globalCounterType - How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).\n * @availableWhen globalCounterType globalCounter==true\n * @property counts - Alert count per severity for the global counter badges.\n * @availableWhen counts globalCounter==true\n * @property shelvedCount - Number of shelved alerts, shown after the global counter badges.\n * @availableWhen shelvedCount globalCounter==true\n * @property blinking - Flashes the bell while there are active alerts of a flashing alert type.\n * @availableWhen blinking globalCounter==false\n * @property flashingSpeed - Flash tempo while `blinking` is on: `default` resolves from `alertType`, `fast`, `slow`, `very-slow` force a tempo, `fixed` never flashes.\n * @availableWhen flashingSpeed blinking==true\n * @property fillHeight - Stretches the visible button to the host height instead of the 32 px visual target.\n * @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.\n * @fires click - Fired when the button is clicked.\n * @experimental\n */\n@customElement('obc-alert-button-item')\n@localized()\nexport class ObcAlertButtonItem extends LitElement {\n @property({type: String}) type: ObcAlertButtonType =\n ObcAlertButtonType.Normal;\n @property({type: String}) alertType?: AlertType;\n @property({type: Number}) nAlerts = 0;\n @property({type: Boolean}) counter = false;\n @property({type: Boolean}) globalCounter = false;\n @property({type: String}) globalCounterType: ObcAlertCounterItemType =\n ObcAlertCounterItemType.Badges;\n @property({type: Object, attribute: false}) counts: AlertCounts = {};\n @property({type: Number}) shelvedCount = 0;\n @property({type: Boolean}) blinking = false;\n @property({type: String}) flashingSpeed: FlashingSpeed =\n FlashingSpeed.Default;\n @property({type: Boolean}) fillHeight = false;\n\n // Reactive so a consumer changing the name re-renders the shadow button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n protected readonly flashing = new FlashingController(\n this,\n () => this.resolvedFlashingSpeed\n );\n\n get resolvedFlashingSpeed(): ResolvedFlashingSpeed {\n if (\n this.globalCounter ||\n !this.blinking ||\n this.nAlerts <= 0 ||\n this.alertType === undefined\n ) {\n return FlashingSpeed.Fixed;\n }\n return resolveFlashingSpeed(\n this.flashingSpeed,\n this.alertType,\n AlertFlashPhase.Active\n );\n }\n\n private get accessibleName(): string {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n const parts = [msg('Alerts')];\n if (this.nAlerts > 0) {\n parts.push(String(this.nAlerts));\n }\n if (this.globalCounter) {\n const breakdown = alertCountsLabel(this.counts, this.shelvedCount);\n if (breakdown) {\n parts.push(breakdown);\n }\n } else if (this.nAlerts > 0 && this.alertType) {\n parts.push(alertTypeLabel(this.alertType));\n }\n return parts.join(', ');\n }\n\n private renderTwotoneIcon() {\n const twotone = this.alertType\n ? getAlertTwotoneComponent(this.alertType)\n : AlertTwotoneComponent.Caution;\n switch (twotone) {\n case AlertTwotoneComponent.Critical:\n return html`<obi-alerts-critical-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-critical-twotone>`;\n case AlertTwotoneComponent.Diagnostic:\n return html`<obi-alerts-diagnostic-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-diagnostic-twotone>`;\n case AlertTwotoneComponent.Warning:\n return html`<obi-alerts-warning-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-warning-twotone>`;\n case AlertTwotoneComponent.Caution:\n return html`<obi-alerts-caution-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-caution-twotone>`;\n default:\n return html`<obi-alerts-alarm-twotone\n useCssColor\n class=\"icon\"\n ></obi-alerts-alarm-twotone>`;\n }\n }\n\n /** The blink layer shows the opposite of the steady layer in each flash. */\n private renderIcon(styleType: ObcAlertButtonType, blinkLayer: boolean) {\n if (this.nAlerts === 0) {\n return html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n const enhanced = styleType === ObcAlertButtonType.Enhanced;\n if (blinkLayer) {\n return enhanced\n ? this.renderTwotoneIcon()\n : html`<obi-alerts class=\"icon\"></obi-alerts>`;\n }\n return enhanced || this.globalCounter\n ? html`<obi-alerts-active class=\"icon\"></obi-alerts-active>`\n : this.renderTwotoneIcon();\n }\n\n private renderCount() {\n return html`<span class=\"count\">${this.nAlerts}</span>`;\n }\n\n private renderCounts() {\n if (rankAlertCounts(this.counts).length === 0 && this.shelvedCount <= 0) {\n return nothing;\n }\n return html`<obc-alert-counter-item\n .type=${this.globalCounterType}\n .counts=${this.counts}\n .shelvedCount=${this.shelvedCount}\n ></obc-alert-counter-item>`;\n }\n\n override render() {\n const styleType = this.globalCounter\n ? ObcAlertButtonType.Normal\n : this.type;\n const showCount =\n this.nAlerts > 0 &&\n (this.globalCounter ||\n (this.counter && styleType !== ObcAlertButtonType.Flat));\n const tempo = this.resolvedFlashingSpeed;\n return html`\n <button\n class=${classMap({\n 'alert-button': true,\n [`type-${styleType}`]: true,\n [`alert-type-${this.alertType ?? 'none'}`]: true,\n counter: showCount && !this.globalCounter,\n 'global-counter': this.globalCounter,\n 'fill-height': this.fillHeight,\n [`flash-${tempo}`]: true,\n })}\n aria-label=${this.accessibleName}\n >\n ${\n tempo === FlashingSpeed.Fixed\n ? nothing\n : html`<div class=\"blink\" aria-hidden=\"true\">\n <div class=\"content\">\n ${this.renderIcon(styleType, true)}\n ${showCount ? this.renderCount() : nothing}\n </div>\n </div>`\n }\n <div class=\"visible-wrapper\">\n ${this.globalCounter ? this.renderCounts() : nothing}\n <div class=\"content\">\n ${this.renderIcon(styleType, false)}\n ${showCount ? this.renderCount() : nothing}\n </div>\n </div>\n </button>\n <span class=\"announcement\" aria-live=\"polite\" aria-atomic=\"true\"\n >${this.accessibleName}</span\n >\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-button-item': ObcAlertButtonItem;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAY,qBAAL,yBAAA,oBAAA;CACL,mBAAA,UAAA;CACA,mBAAA,YAAA;CACA,mBAAA,cAAA;;AACF,EAAA,CAAA,CAAA;AAiFO,IAAM,qBAAN,MAAM,2BAA2B,WAAW;;;;EAIb,KAAA,UAAA;EACC,KAAA,UAAA;EACM,KAAA,gBAAA;EAEzC,KAAA,oBAAA,wBAAwB;EACwC,KAAA,SAAA,CAAC;EAC1B,KAAA,eAAA;EACH,KAAA,WAAA;EAEpC,KAAA,gBAAA,cAAc;EACwB,KAAA,aAAA;EAIJ,KAAA,YAAA;EAEN,KAAA,WAAA,IAAI,mBAChC,YACM,KAAK,qBACb;;CAEA,IAAI,wBAA+C;EACjD,IACE,KAAK,iBACL,CAAC,KAAK,YACN,KAAK,WAAW,KAChB,KAAK,cAAc,KAAA,GAEnB,OAAO,cAAc;EAEvB,OAAO,qBACL,KAAK,eACL,KAAK,WACL,gBAAgB,MAClB;CACF;CAEA,IAAY,iBAAyB;EACnC,IAAI,KAAK,WACP,OAAO,KAAK;EAEd,MAAM,QAAQ,CAAC,IAAI,QAAQ,CAAC;EAC5B,IAAI,KAAK,UAAU,GACjB,MAAM,KAAK,OAAO,KAAK,OAAO,CAAC;EAEjC,IAAI,KAAK,eAAe;GACtB,MAAM,YAAY,iBAAiB,KAAK,QAAQ,KA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