@oicl/openbridge-webcomponents 2.0.0-next.148 → 2.0.0-next.149
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 +119 -42
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +269 -8
- package/dist/components/icon-button/icon-button.d.ts +3 -0
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +6 -0
- package/dist/components/icon-button/icon-button.js.map +1 -1
- package/dist/components/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/top-bar/top-bar.js +8 -0
- package/dist/components/top-bar/top-bar.js.map +1 -1
- package/dist/generated/locales/es-419.d.ts +11 -1
- package/dist/generated/locales/es-419.d.ts.map +1 -1
- package/dist/generated/locales/es-419.js +11 -1
- package/dist/generated/locales/es-419.js.map +1 -1
- package/dist/generated/locales/fi-FI.d.ts +11 -1
- package/dist/generated/locales/fi-FI.d.ts.map +1 -1
- package/dist/generated/locales/fi-FI.js +11 -1
- package/dist/generated/locales/fi-FI.js.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.d.ts +8 -8
- package/dist/integration-systems/integration-bar/integration-bar.d.ts.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.js +13 -1
- package/dist/integration-systems/integration-bar/integration-bar.js.map +1 -1
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.d.ts +112 -7
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.d.ts.map +1 -1
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js +99 -41
- package/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -64492,6 +64492,16 @@
|
|
|
64492
64492
|
"default": "true",
|
|
64493
64493
|
"description": "If false, and cornerLeft or cornerRight is true, the divider is not shown."
|
|
64494
64494
|
},
|
|
64495
|
+
{
|
|
64496
|
+
"kind": "field",
|
|
64497
|
+
"name": "ariaLabel",
|
|
64498
|
+
"type": {
|
|
64499
|
+
"text": "string | null"
|
|
64500
|
+
},
|
|
64501
|
+
"default": "null",
|
|
64502
|
+
"description": "Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.",
|
|
64503
|
+
"attribute": "aria-label"
|
|
64504
|
+
},
|
|
64495
64505
|
{
|
|
64496
64506
|
"kind": "field",
|
|
64497
64507
|
"name": "progressSpinner",
|
|
@@ -64584,6 +64594,15 @@
|
|
|
64584
64594
|
"default": "false",
|
|
64585
64595
|
"description": "If true, displays a label below the icon using the `label` slot.",
|
|
64586
64596
|
"fieldName": "hasLabel"
|
|
64597
|
+
},
|
|
64598
|
+
{
|
|
64599
|
+
"name": "aria-label",
|
|
64600
|
+
"type": {
|
|
64601
|
+
"text": "string | null"
|
|
64602
|
+
},
|
|
64603
|
+
"default": "null",
|
|
64604
|
+
"description": "Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.",
|
|
64605
|
+
"fieldName": "ariaLabel"
|
|
64587
64606
|
}
|
|
64588
64607
|
],
|
|
64589
64608
|
"superclass": {
|
|
@@ -85750,7 +85769,7 @@
|
|
|
85750
85769
|
"declarations": [
|
|
85751
85770
|
{
|
|
85752
85771
|
"kind": "class",
|
|
85753
|
-
"description": "",
|
|
85772
|
+
"description": "`<obc-integration-bar-dropdown>` – A compact top-level integration header with a dropdown selector, status fields and system action buttons.",
|
|
85754
85773
|
"name": "ObcIntegrationBarDropdown",
|
|
85755
85774
|
"slots": [
|
|
85756
85775
|
{
|
|
@@ -85794,6 +85813,7 @@
|
|
|
85794
85813
|
"text": "boolean"
|
|
85795
85814
|
},
|
|
85796
85815
|
"default": "false",
|
|
85816
|
+
"description": "Home button at the left end of the bar.",
|
|
85797
85817
|
"attribute": "showHomeButton"
|
|
85798
85818
|
},
|
|
85799
85819
|
{
|
|
@@ -85803,7 +85823,38 @@
|
|
|
85803
85823
|
"text": "boolean"
|
|
85804
85824
|
},
|
|
85805
85825
|
"default": "false",
|
|
85806
|
-
"
|
|
85826
|
+
"description": "Pressed styling for the home button.\n\nAvailable when `showHomeButton==true`.",
|
|
85827
|
+
"attribute": "homeButtonActivated",
|
|
85828
|
+
"availableWhen": "showHomeButton==true",
|
|
85829
|
+
"availableWhenIf": {
|
|
85830
|
+
"arg": "showHomeButton",
|
|
85831
|
+
"truthy": true
|
|
85832
|
+
}
|
|
85833
|
+
},
|
|
85834
|
+
{
|
|
85835
|
+
"kind": "field",
|
|
85836
|
+
"name": "showLinkButton",
|
|
85837
|
+
"type": {
|
|
85838
|
+
"text": "boolean"
|
|
85839
|
+
},
|
|
85840
|
+
"default": "false",
|
|
85841
|
+
"description": "Link button, between home and the selector.",
|
|
85842
|
+
"attribute": "showLinkButton"
|
|
85843
|
+
},
|
|
85844
|
+
{
|
|
85845
|
+
"kind": "field",
|
|
85846
|
+
"name": "linkButtonActivated",
|
|
85847
|
+
"type": {
|
|
85848
|
+
"text": "boolean"
|
|
85849
|
+
},
|
|
85850
|
+
"default": "false",
|
|
85851
|
+
"description": "Pressed styling for the link button.\n\nAvailable when `showLinkButton==true`.",
|
|
85852
|
+
"attribute": "linkButtonActivated",
|
|
85853
|
+
"availableWhen": "showLinkButton==true",
|
|
85854
|
+
"availableWhenIf": {
|
|
85855
|
+
"arg": "showLinkButton",
|
|
85856
|
+
"truthy": true
|
|
85857
|
+
}
|
|
85807
85858
|
},
|
|
85808
85859
|
{
|
|
85809
85860
|
"kind": "field",
|
|
@@ -85812,8 +85863,34 @@
|
|
|
85812
85863
|
"text": "boolean"
|
|
85813
85864
|
},
|
|
85814
85865
|
"default": "false",
|
|
85866
|
+
"description": "Renders the `clock` slot at the right end.",
|
|
85815
85867
|
"attribute": "showClock"
|
|
85816
85868
|
},
|
|
85869
|
+
{
|
|
85870
|
+
"kind": "field",
|
|
85871
|
+
"name": "showAlertButton",
|
|
85872
|
+
"type": {
|
|
85873
|
+
"text": "boolean"
|
|
85874
|
+
},
|
|
85875
|
+
"default": "false",
|
|
85876
|
+
"description": "Alert button, first in the right-hand group.",
|
|
85877
|
+
"attribute": "showAlertButton"
|
|
85878
|
+
},
|
|
85879
|
+
{
|
|
85880
|
+
"kind": "field",
|
|
85881
|
+
"name": "alertButtonActivated",
|
|
85882
|
+
"type": {
|
|
85883
|
+
"text": "boolean"
|
|
85884
|
+
},
|
|
85885
|
+
"default": "false",
|
|
85886
|
+
"description": "Pressed styling for the alert button.\n\nAvailable when `showAlertButton==true`.",
|
|
85887
|
+
"attribute": "alertButtonActivated",
|
|
85888
|
+
"availableWhen": "showAlertButton==true",
|
|
85889
|
+
"availableWhenIf": {
|
|
85890
|
+
"arg": "showAlertButton",
|
|
85891
|
+
"truthy": true
|
|
85892
|
+
}
|
|
85893
|
+
},
|
|
85817
85894
|
{
|
|
85818
85895
|
"kind": "field",
|
|
85819
85896
|
"name": "showNotificationButton",
|
|
@@ -85821,6 +85898,7 @@
|
|
|
85821
85898
|
"text": "boolean"
|
|
85822
85899
|
},
|
|
85823
85900
|
"default": "false",
|
|
85901
|
+
"description": "Notification button, after the alert button.",
|
|
85824
85902
|
"attribute": "showNotificationButton"
|
|
85825
85903
|
},
|
|
85826
85904
|
{
|
|
@@ -85830,7 +85908,13 @@
|
|
|
85830
85908
|
"text": "boolean"
|
|
85831
85909
|
},
|
|
85832
85910
|
"default": "false",
|
|
85833
|
-
"
|
|
85911
|
+
"description": "Pressed styling; the count badge only appears in this state.\n\nAvailable when `showNotificationButton==true`.",
|
|
85912
|
+
"attribute": "notificationButtonActivated",
|
|
85913
|
+
"availableWhen": "showNotificationButton==true",
|
|
85914
|
+
"availableWhenIf": {
|
|
85915
|
+
"arg": "showNotificationButton",
|
|
85916
|
+
"truthy": true
|
|
85917
|
+
}
|
|
85834
85918
|
},
|
|
85835
85919
|
{
|
|
85836
85920
|
"kind": "field",
|
|
@@ -85839,7 +85923,9 @@
|
|
|
85839
85923
|
"text": "number"
|
|
85840
85924
|
},
|
|
85841
85925
|
"default": "0",
|
|
85842
|
-
"
|
|
85926
|
+
"description": "Number drawn in the count badge.\n\nAvailable when `showNotificationButton==true && showNotificationCount==true && notificationButtonActivated==true`.",
|
|
85927
|
+
"attribute": "notificationCount",
|
|
85928
|
+
"availableWhen": "showNotificationButton==true && showNotificationCount==true && notificationButtonActivated==true"
|
|
85843
85929
|
},
|
|
85844
85930
|
{
|
|
85845
85931
|
"kind": "field",
|
|
@@ -85848,7 +85934,34 @@
|
|
|
85848
85934
|
"text": "boolean"
|
|
85849
85935
|
},
|
|
85850
85936
|
"default": "false",
|
|
85851
|
-
"
|
|
85937
|
+
"description": "Draws the count badge on the notification button.\n\nAvailable when `showNotificationButton==true && notificationButtonActivated==true`.",
|
|
85938
|
+
"attribute": "showNotificationCount",
|
|
85939
|
+
"availableWhen": "showNotificationButton==true && notificationButtonActivated==true"
|
|
85940
|
+
},
|
|
85941
|
+
{
|
|
85942
|
+
"kind": "field",
|
|
85943
|
+
"name": "showScreenButton",
|
|
85944
|
+
"type": {
|
|
85945
|
+
"text": "boolean"
|
|
85946
|
+
},
|
|
85947
|
+
"default": "false",
|
|
85948
|
+
"description": "Screen button, after the notification button.",
|
|
85949
|
+
"attribute": "showScreenButton"
|
|
85950
|
+
},
|
|
85951
|
+
{
|
|
85952
|
+
"kind": "field",
|
|
85953
|
+
"name": "screenButtonActivated",
|
|
85954
|
+
"type": {
|
|
85955
|
+
"text": "boolean"
|
|
85956
|
+
},
|
|
85957
|
+
"default": "false",
|
|
85958
|
+
"description": "Pressed styling for the screen button.\n\nAvailable when `showScreenButton==true`.",
|
|
85959
|
+
"attribute": "screenButtonActivated",
|
|
85960
|
+
"availableWhen": "showScreenButton==true",
|
|
85961
|
+
"availableWhenIf": {
|
|
85962
|
+
"arg": "showScreenButton",
|
|
85963
|
+
"truthy": true
|
|
85964
|
+
}
|
|
85852
85965
|
},
|
|
85853
85966
|
{
|
|
85854
85967
|
"kind": "field",
|
|
@@ -85857,6 +85970,7 @@
|
|
|
85857
85970
|
"text": "boolean"
|
|
85858
85971
|
},
|
|
85859
85972
|
"default": "false",
|
|
85973
|
+
"description": "User button, last before the clock.",
|
|
85860
85974
|
"attribute": "showUserButton"
|
|
85861
85975
|
},
|
|
85862
85976
|
{
|
|
@@ -85866,7 +85980,13 @@
|
|
|
85866
85980
|
"text": "boolean"
|
|
85867
85981
|
},
|
|
85868
85982
|
"default": "false",
|
|
85869
|
-
"
|
|
85983
|
+
"description": "Pressed styling for the user button.\n\nAvailable when `showUserButton==true`.",
|
|
85984
|
+
"attribute": "userButtonActivated",
|
|
85985
|
+
"availableWhen": "showUserButton==true",
|
|
85986
|
+
"availableWhenIf": {
|
|
85987
|
+
"arg": "showUserButton",
|
|
85988
|
+
"truthy": true
|
|
85989
|
+
}
|
|
85870
85990
|
},
|
|
85871
85991
|
{
|
|
85872
85992
|
"kind": "field",
|
|
@@ -85875,6 +85995,7 @@
|
|
|
85875
85995
|
"text": "boolean"
|
|
85876
85996
|
},
|
|
85877
85997
|
"default": "false",
|
|
85998
|
+
"description": "Dimming button, between system and user.",
|
|
85878
85999
|
"attribute": "showDimmingButton"
|
|
85879
86000
|
},
|
|
85880
86001
|
{
|
|
@@ -85884,7 +86005,13 @@
|
|
|
85884
86005
|
"text": "boolean"
|
|
85885
86006
|
},
|
|
85886
86007
|
"default": "false",
|
|
85887
|
-
"
|
|
86008
|
+
"description": "Pressed styling for the dimming button.\n\nAvailable when `showDimmingButton==true`.",
|
|
86009
|
+
"attribute": "dimmingButtonActivated",
|
|
86010
|
+
"availableWhen": "showDimmingButton==true",
|
|
86011
|
+
"availableWhenIf": {
|
|
86012
|
+
"arg": "showDimmingButton",
|
|
86013
|
+
"truthy": true
|
|
86014
|
+
}
|
|
85888
86015
|
},
|
|
85889
86016
|
{
|
|
85890
86017
|
"kind": "field",
|
|
@@ -85893,6 +86020,7 @@
|
|
|
85893
86020
|
"text": "boolean"
|
|
85894
86021
|
},
|
|
85895
86022
|
"default": "false",
|
|
86023
|
+
"description": "System button, after the screen button.",
|
|
85896
86024
|
"attribute": "showSystemButton"
|
|
85897
86025
|
},
|
|
85898
86026
|
{
|
|
@@ -85902,7 +86030,13 @@
|
|
|
85902
86030
|
"text": "boolean"
|
|
85903
86031
|
},
|
|
85904
86032
|
"default": "false",
|
|
85905
|
-
"
|
|
86033
|
+
"description": "Pressed styling for the system button.\n\nAvailable when `showSystemButton==true`.",
|
|
86034
|
+
"attribute": "systemButtonActivated",
|
|
86035
|
+
"availableWhen": "showSystemButton==true",
|
|
86036
|
+
"availableWhenIf": {
|
|
86037
|
+
"arg": "showSystemButton",
|
|
86038
|
+
"truthy": true
|
|
86039
|
+
}
|
|
85906
86040
|
},
|
|
85907
86041
|
{
|
|
85908
86042
|
"kind": "field",
|
|
@@ -85911,12 +86045,50 @@
|
|
|
85911
86045
|
"text": "number"
|
|
85912
86046
|
},
|
|
85913
86047
|
"default": "0",
|
|
86048
|
+
"description": "How many `status-icon-N`/`status-label-N` slot pairs are rendered.",
|
|
85914
86049
|
"attribute": "nStatusFields"
|
|
85915
86050
|
},
|
|
85916
86051
|
{
|
|
85917
86052
|
"kind": "method",
|
|
85918
86053
|
"name": "renderStatusFields",
|
|
85919
86054
|
"privacy": "private"
|
|
86055
|
+
},
|
|
86056
|
+
{
|
|
86057
|
+
"kind": "method",
|
|
86058
|
+
"name": "renderIconButton",
|
|
86059
|
+
"privacy": "private",
|
|
86060
|
+
"parameters": [
|
|
86061
|
+
{
|
|
86062
|
+
"name": "name",
|
|
86063
|
+
"type": {
|
|
86064
|
+
"text": "string"
|
|
86065
|
+
}
|
|
86066
|
+
},
|
|
86067
|
+
{
|
|
86068
|
+
"name": "activated",
|
|
86069
|
+
"type": {
|
|
86070
|
+
"text": "boolean"
|
|
86071
|
+
}
|
|
86072
|
+
},
|
|
86073
|
+
{
|
|
86074
|
+
"name": "label",
|
|
86075
|
+
"type": {
|
|
86076
|
+
"text": "string"
|
|
86077
|
+
}
|
|
86078
|
+
},
|
|
86079
|
+
{
|
|
86080
|
+
"name": "icon",
|
|
86081
|
+
"type": {
|
|
86082
|
+
"text": "TemplateResult"
|
|
86083
|
+
}
|
|
86084
|
+
},
|
|
86085
|
+
{
|
|
86086
|
+
"name": "onClick",
|
|
86087
|
+
"type": {
|
|
86088
|
+
"text": "() => void"
|
|
86089
|
+
}
|
|
86090
|
+
}
|
|
86091
|
+
]
|
|
85920
86092
|
}
|
|
85921
86093
|
],
|
|
85922
86094
|
"events": [
|
|
@@ -85927,6 +86099,20 @@
|
|
|
85927
86099
|
},
|
|
85928
86100
|
"description": "Fired when the home button is clicked"
|
|
85929
86101
|
},
|
|
86102
|
+
{
|
|
86103
|
+
"name": "link-button-clicked",
|
|
86104
|
+
"type": {
|
|
86105
|
+
"text": "CustomEvent"
|
|
86106
|
+
},
|
|
86107
|
+
"description": "Fired when the link button is clicked"
|
|
86108
|
+
},
|
|
86109
|
+
{
|
|
86110
|
+
"name": "alert-button-clicked",
|
|
86111
|
+
"type": {
|
|
86112
|
+
"text": "CustomEvent"
|
|
86113
|
+
},
|
|
86114
|
+
"description": "Fired when the alert button is clicked"
|
|
86115
|
+
},
|
|
85930
86116
|
{
|
|
85931
86117
|
"name": "notification-button-clicked",
|
|
85932
86118
|
"type": {
|
|
@@ -85934,6 +86120,13 @@
|
|
|
85934
86120
|
},
|
|
85935
86121
|
"description": "Fired when the notification button is clicked"
|
|
85936
86122
|
},
|
|
86123
|
+
{
|
|
86124
|
+
"name": "screen-button-clicked",
|
|
86125
|
+
"type": {
|
|
86126
|
+
"text": "CustomEvent"
|
|
86127
|
+
},
|
|
86128
|
+
"description": "Fired when the screen button is clicked"
|
|
86129
|
+
},
|
|
85937
86130
|
{
|
|
85938
86131
|
"name": "system-button-clicked",
|
|
85939
86132
|
"type": {
|
|
@@ -85963,6 +86156,7 @@
|
|
|
85963
86156
|
"text": "boolean"
|
|
85964
86157
|
},
|
|
85965
86158
|
"default": "false",
|
|
86159
|
+
"description": "Home button at the left end of the bar.",
|
|
85966
86160
|
"fieldName": "showHomeButton"
|
|
85967
86161
|
},
|
|
85968
86162
|
{
|
|
@@ -85971,22 +86165,61 @@
|
|
|
85971
86165
|
"text": "boolean"
|
|
85972
86166
|
},
|
|
85973
86167
|
"default": "false",
|
|
86168
|
+
"description": "Pressed styling for the home button.\n\nAvailable when `showHomeButton==true`.",
|
|
85974
86169
|
"fieldName": "homeButtonActivated"
|
|
85975
86170
|
},
|
|
86171
|
+
{
|
|
86172
|
+
"name": "showLinkButton",
|
|
86173
|
+
"type": {
|
|
86174
|
+
"text": "boolean"
|
|
86175
|
+
},
|
|
86176
|
+
"default": "false",
|
|
86177
|
+
"description": "Link button, between home and the selector.",
|
|
86178
|
+
"fieldName": "showLinkButton"
|
|
86179
|
+
},
|
|
86180
|
+
{
|
|
86181
|
+
"name": "linkButtonActivated",
|
|
86182
|
+
"type": {
|
|
86183
|
+
"text": "boolean"
|
|
86184
|
+
},
|
|
86185
|
+
"default": "false",
|
|
86186
|
+
"description": "Pressed styling for the link button.\n\nAvailable when `showLinkButton==true`.",
|
|
86187
|
+
"fieldName": "linkButtonActivated"
|
|
86188
|
+
},
|
|
85976
86189
|
{
|
|
85977
86190
|
"name": "showClock",
|
|
85978
86191
|
"type": {
|
|
85979
86192
|
"text": "boolean"
|
|
85980
86193
|
},
|
|
85981
86194
|
"default": "false",
|
|
86195
|
+
"description": "Renders the `clock` slot at the right end.",
|
|
85982
86196
|
"fieldName": "showClock"
|
|
85983
86197
|
},
|
|
86198
|
+
{
|
|
86199
|
+
"name": "showAlertButton",
|
|
86200
|
+
"type": {
|
|
86201
|
+
"text": "boolean"
|
|
86202
|
+
},
|
|
86203
|
+
"default": "false",
|
|
86204
|
+
"description": "Alert button, first in the right-hand group.",
|
|
86205
|
+
"fieldName": "showAlertButton"
|
|
86206
|
+
},
|
|
86207
|
+
{
|
|
86208
|
+
"name": "alertButtonActivated",
|
|
86209
|
+
"type": {
|
|
86210
|
+
"text": "boolean"
|
|
86211
|
+
},
|
|
86212
|
+
"default": "false",
|
|
86213
|
+
"description": "Pressed styling for the alert button.\n\nAvailable when `showAlertButton==true`.",
|
|
86214
|
+
"fieldName": "alertButtonActivated"
|
|
86215
|
+
},
|
|
85984
86216
|
{
|
|
85985
86217
|
"name": "showNotificationButton",
|
|
85986
86218
|
"type": {
|
|
85987
86219
|
"text": "boolean"
|
|
85988
86220
|
},
|
|
85989
86221
|
"default": "false",
|
|
86222
|
+
"description": "Notification button, after the alert button.",
|
|
85990
86223
|
"fieldName": "showNotificationButton"
|
|
85991
86224
|
},
|
|
85992
86225
|
{
|
|
@@ -85995,6 +86228,7 @@
|
|
|
85995
86228
|
"text": "boolean"
|
|
85996
86229
|
},
|
|
85997
86230
|
"default": "false",
|
|
86231
|
+
"description": "Pressed styling; the count badge only appears in this state.\n\nAvailable when `showNotificationButton==true`.",
|
|
85998
86232
|
"fieldName": "notificationButtonActivated"
|
|
85999
86233
|
},
|
|
86000
86234
|
{
|
|
@@ -86003,6 +86237,7 @@
|
|
|
86003
86237
|
"text": "number"
|
|
86004
86238
|
},
|
|
86005
86239
|
"default": "0",
|
|
86240
|
+
"description": "Number drawn in the count badge.\n\nAvailable when `showNotificationButton==true && showNotificationCount==true && notificationButtonActivated==true`.",
|
|
86006
86241
|
"fieldName": "notificationCount"
|
|
86007
86242
|
},
|
|
86008
86243
|
{
|
|
@@ -86011,14 +86246,34 @@
|
|
|
86011
86246
|
"text": "boolean"
|
|
86012
86247
|
},
|
|
86013
86248
|
"default": "false",
|
|
86249
|
+
"description": "Draws the count badge on the notification button.\n\nAvailable when `showNotificationButton==true && notificationButtonActivated==true`.",
|
|
86014
86250
|
"fieldName": "showNotificationCount"
|
|
86015
86251
|
},
|
|
86252
|
+
{
|
|
86253
|
+
"name": "showScreenButton",
|
|
86254
|
+
"type": {
|
|
86255
|
+
"text": "boolean"
|
|
86256
|
+
},
|
|
86257
|
+
"default": "false",
|
|
86258
|
+
"description": "Screen button, after the notification button.",
|
|
86259
|
+
"fieldName": "showScreenButton"
|
|
86260
|
+
},
|
|
86261
|
+
{
|
|
86262
|
+
"name": "screenButtonActivated",
|
|
86263
|
+
"type": {
|
|
86264
|
+
"text": "boolean"
|
|
86265
|
+
},
|
|
86266
|
+
"default": "false",
|
|
86267
|
+
"description": "Pressed styling for the screen button.\n\nAvailable when `showScreenButton==true`.",
|
|
86268
|
+
"fieldName": "screenButtonActivated"
|
|
86269
|
+
},
|
|
86016
86270
|
{
|
|
86017
86271
|
"name": "showUserButton",
|
|
86018
86272
|
"type": {
|
|
86019
86273
|
"text": "boolean"
|
|
86020
86274
|
},
|
|
86021
86275
|
"default": "false",
|
|
86276
|
+
"description": "User button, last before the clock.",
|
|
86022
86277
|
"fieldName": "showUserButton"
|
|
86023
86278
|
},
|
|
86024
86279
|
{
|
|
@@ -86027,6 +86282,7 @@
|
|
|
86027
86282
|
"text": "boolean"
|
|
86028
86283
|
},
|
|
86029
86284
|
"default": "false",
|
|
86285
|
+
"description": "Pressed styling for the user button.\n\nAvailable when `showUserButton==true`.",
|
|
86030
86286
|
"fieldName": "userButtonActivated"
|
|
86031
86287
|
},
|
|
86032
86288
|
{
|
|
@@ -86035,6 +86291,7 @@
|
|
|
86035
86291
|
"text": "boolean"
|
|
86036
86292
|
},
|
|
86037
86293
|
"default": "false",
|
|
86294
|
+
"description": "Dimming button, between system and user.",
|
|
86038
86295
|
"fieldName": "showDimmingButton"
|
|
86039
86296
|
},
|
|
86040
86297
|
{
|
|
@@ -86043,6 +86300,7 @@
|
|
|
86043
86300
|
"text": "boolean"
|
|
86044
86301
|
},
|
|
86045
86302
|
"default": "false",
|
|
86303
|
+
"description": "Pressed styling for the dimming button.\n\nAvailable when `showDimmingButton==true`.",
|
|
86046
86304
|
"fieldName": "dimmingButtonActivated"
|
|
86047
86305
|
},
|
|
86048
86306
|
{
|
|
@@ -86051,6 +86309,7 @@
|
|
|
86051
86309
|
"text": "boolean"
|
|
86052
86310
|
},
|
|
86053
86311
|
"default": "false",
|
|
86312
|
+
"description": "System button, after the screen button.",
|
|
86054
86313
|
"fieldName": "showSystemButton"
|
|
86055
86314
|
},
|
|
86056
86315
|
{
|
|
@@ -86059,6 +86318,7 @@
|
|
|
86059
86318
|
"text": "boolean"
|
|
86060
86319
|
},
|
|
86061
86320
|
"default": "false",
|
|
86321
|
+
"description": "Pressed styling for the system button.\n\nAvailable when `showSystemButton==true`.",
|
|
86062
86322
|
"fieldName": "systemButtonActivated"
|
|
86063
86323
|
},
|
|
86064
86324
|
{
|
|
@@ -86067,6 +86327,7 @@
|
|
|
86067
86327
|
"text": "number"
|
|
86068
86328
|
},
|
|
86069
86329
|
"default": "0",
|
|
86330
|
+
"description": "How many `status-icon-N`/`status-label-N` slot pairs are rendered.",
|
|
86070
86331
|
"fieldName": "nStatusFields"
|
|
86071
86332
|
}
|
|
86072
86333
|
],
|
|
@@ -89,6 +89,7 @@ export declare enum IconButtonVariant {
|
|
|
89
89
|
* If undefined, no progress indicator is shown.
|
|
90
90
|
* @property hasLabel - If true, displays a label below the icon using the `label` slot.
|
|
91
91
|
* @property showDivider - If false, and cornerLeft or cornerRight is true, the divider is not shown.
|
|
92
|
+
* @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.
|
|
92
93
|
* @slot - Icon slot (default): Place an icon such as <obi-search> here.
|
|
93
94
|
* @slot label - Optional label shown below the icon when `hasLabel` is true.
|
|
94
95
|
* @fires click - Fired when the button is clicked (if not disabled).
|
|
@@ -120,6 +121,8 @@ export declare class ObcIconButton extends LitElement {
|
|
|
120
121
|
hasLabel: boolean;
|
|
121
122
|
/** If false, and cornerLeft or cornerRight is true, the divider is not shown. */
|
|
122
123
|
showDivider: boolean;
|
|
124
|
+
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
125
|
+
ariaLabel: string | null;
|
|
123
126
|
get progressSpinner(): import('lit-html').TemplateResult<1> | typeof nothing;
|
|
124
127
|
render(): import('lit-html').TemplateResult<1>;
|
|
125
128
|
static styles: import('lit').CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAQ,OAAO,EAAY,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAQ,OAAO,EAAY,MAAM,KAAK,CAAC;AAQzD;;;;;;GAMG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,qBACa,aAAc,SAAQ,UAAU;IAC3C;;;;;OAKG;IACuB,OAAO,EAAE,iBAAiB,CACzB;IAEA,SAAS,UAAS;IAElB,UAAU,UAAS;IAEnB,WAAW,UAAS;IAEpB,WAAW,UAAS;IAEpB,IAAI,UAAS;IAEb,QAAQ,UAAS;IAElB,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAa;IAExC,QAAQ,EAAE,OAAO,CAAS;IAER,WAAW,UAAQ;IAIvD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEzC,IAAI,eAAe,0DAoDlB;IAEQ,MAAM;IAkCf,OAAgB,MAAM,0BAAwB;CAC/C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|
|
@@ -2,6 +2,7 @@ import { unsafeCSS, LitElement, nothing, html } from "lit";
|
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
3
|
import iconStyle from "./icon-button.css.js";
|
|
4
4
|
import { classMap } from "lit/directives/class-map.js";
|
|
5
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
6
|
import { customElement } from "../../decorator.js";
|
|
6
7
|
import { degToRad } from "../../svghelpers/math.js";
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
@@ -34,6 +35,7 @@ let ObcIconButton = class extends LitElement {
|
|
|
34
35
|
this.progress = void 0;
|
|
35
36
|
this.hasLabel = false;
|
|
36
37
|
this.showDivider = true;
|
|
38
|
+
this.ariaLabel = null;
|
|
37
39
|
}
|
|
38
40
|
get progressSpinner() {
|
|
39
41
|
if (this.progress === void 0) {
|
|
@@ -104,6 +106,7 @@ let ObcIconButton = class extends LitElement {
|
|
|
104
106
|
"hide-divider": !this.showDivider
|
|
105
107
|
})}
|
|
106
108
|
?disabled=${this.disabled}
|
|
109
|
+
aria-label=${ifDefined(this.ariaLabel ?? void 0)}
|
|
107
110
|
part="wrapper"
|
|
108
111
|
>
|
|
109
112
|
${this.progress !== void 0 ? this.progressSpinner : nothing}
|
|
@@ -150,6 +153,9 @@ __decorateClass([
|
|
|
150
153
|
__decorateClass([
|
|
151
154
|
property({ type: Boolean, attribute: false })
|
|
152
155
|
], ObcIconButton.prototype, "showDivider", 2);
|
|
156
|
+
__decorateClass([
|
|
157
|
+
property({ type: String, attribute: "aria-label" })
|
|
158
|
+
], ObcIconButton.prototype, "ariaLabel", 2);
|
|
153
159
|
ObcIconButton = __decorateClass([
|
|
154
160
|
customElement("obc-icon-button")
|
|
155
161
|
], ObcIconButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sources":["../../../src/components/icon-button/icon-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport iconStyle from './icon-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {degToRad} from '../../svghelpers/math.js';\n\n/**\n * The available visual variants for `<obc-icon-button>`.\n * - `normal`: Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n */\nexport enum IconButtonVariant {\n normal = 'normal',\n raised = 'raised',\n flat = 'flat',\n integration = 'integration',\n}\n\n/**\n * `<obc-icon-button>` – An icon-only or icon-with-label button for quick actions.\n *\n * Provides a compact, visually prominent button that displays an icon (and optionally a label) for triggering actions. Commonly used for toolbars, navigation, or contextual actions where space is limited and a recognizable icon can represent the function.\n *\n * Appears as a circular or rounded button with configurable visual styles, supporting progress indication and various layout adaptations.\n *\n * ## Features\n * - **Variants:**\n * - `normal` (default): Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n * - **Progress Indicator:**\n * - Shows a circular progress spinner overlay when the `progress` property is set (0–100). Useful for indicating loading or ongoing actions.\n * - **Label Support:**\n * - Optionally displays a text label below the icon when `hasLabel` is true and content is provided in the `label` slot.\n * - **Corner Alignment:**\n * - `cornerLeft` and `cornerRight` adjust the button's border radius and alignment for seamless placement at the start or end of a container.\n * - **Active State:**\n * - `activated` visually highlights the button as selected or toggled.\n * - `activeColor` applies an accent color for emphasis.\n * - **Wide Mode:**\n * - `wide` increases the button's width for easier touch targets or visual balance.\n * - **Disabled State:**\n * - `disabled` prevents interaction and visually dims the button.\n *\n * ## Usage Guidelines\n * - Use `obc-icon-button` for actions represented by icons, such as toolbars, navigation, or quick-access commands.\n * - Add a label (with `hasLabel` and the `label` slot) when clarity is needed or when icons alone may not be universally understood.\n * - Use the progress indicator for actions that take time, such as uploads or background processes.\n * - Prefer the `normal` variant for most cases; use `raised` to draw attention, and `flat` for less prominent or inline actions.\n * - For grouped or edge-aligned layouts, use `cornerLeft` or `cornerRight` to visually merge with container edges.\n * - Avoid using icon buttons for destructive or critical actions unless paired with clear feedback.\n * - **TODO(designer):** Clarify recommended icon sizes and when to use label vs. icon-only.\n *\n * ## Slots\n * | Slot Name | Renders When... | Purpose |\n * |-----------|---------------------|----------------------------------------------|\n * | (default) | Always | The icon to display (e.g., `<obi-search>`) |\n * | label | If `hasLabel` is set | Optional label text below the icon |\n *\n * ## Events\n * - Emits a standard `click` event (`onClick` handler in framework wrappers) when activated.\n *\n * ## Best Practices\n * - Ensure icons are clear and universally recognizable.\n * - For accessibility, provide an `aria-label` or descriptive label for the button's action.\n * - When using the progress indicator, avoid showing it for very short actions to prevent visual flicker.\n *\n * ## Example:\n * ```\n * <obc-icon-button variant=\"normal\">\n * <obi-search></obi-search>\n * </obc-icon-button>\n *\n * <obc-icon-button variant=\"normal\" hasLabel>\n * <obi-arrow></obi-arrow>\n * <span slot=\"label\">Next</span>\n * </obc-icon-button>\n * ```\n *\n * @property activated - Whether the button is in an activated (selected/toggled) state.\n * Visually highlights the button to indicate selection.\n * @property cornerLeft - If true, aligns the button to the left edge and removes left border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property cornerRight - If true, aligns the button to the right edge and removes right border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property activeColor - Applies an accent color to the button for emphasis.\n * Used to visually distinguish active or important actions.\n * @property wide - Increases the button's width for larger touch targets or visual balance.\n * @property disabled - Disables the button, preventing user interaction and dimming its appearance.\n * @property progress - Shows a circular progress indicator overlay when set (0–100).\n * Use to indicate ongoing actions or loading states.\n * If undefined, no progress indicator is shown.\n * @property hasLabel - If true, displays a label below the icon using the `label` slot.\n * @property showDivider - If false, and cornerLeft or cornerRight is true, the divider is not shown.\n * @slot - Icon slot (default): Place an icon such as <obi-search> here.\n * @slot label - Optional label shown below the icon when `hasLabel` is true.\n * @fires click - Fired when the button is clicked (if not disabled).\n * @stable\n */\n@customElement('obc-icon-button')\nexport class ObcIconButton extends LitElement {\n /**\n * Visual style of the button.\n * - `normal`: Standard appearance (default).\n * - `raised`: Elevated with shadow.\n * - `flat`: Minimal, backgroundless style.\n */\n @property({type: String}) variant: IconButtonVariant =\n IconButtonVariant.normal;\n\n @property({type: Boolean}) activated = false;\n\n @property({type: Boolean}) cornerLeft = false;\n\n @property({type: Boolean}) cornerRight = false;\n\n @property({type: Boolean}) activeColor = false;\n\n @property({type: Boolean}) wide = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Number}) progress: undefined | number = undefined;\n\n @property({type: Boolean}) hasLabel: boolean = false;\n\n @property({type: Boolean, attribute: false}) showDivider = true;\n\n get progressSpinner() {\n if (this.progress === undefined) {\n return nothing;\n }\n if (this.progress === 100) {\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"#325B9A\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n </svg>\n </div>`;\n }\n const angleRad = degToRad(this.progress * 0.95 * 3.6);\n const x = 20 + 18 * Math.sin(angleRad);\n const y = 20 - 18 * Math.cos(angleRad);\n const largeArcFlag = angleRad > Math.PI ? 1 : 0;\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"var(--container-backdrop-color)\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n <path\n d=\"M18 2 A18 18 0 ${largeArcFlag} 1 ${x} ${y}\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>`;\n }\n\n override render() {\n return html`\n <button\n class=${classMap({\n wrapper: true,\n ['variant-' + this.variant]: true,\n activated: this.activated,\n 'corner-left': this.cornerLeft,\n 'corner-right': this.cornerRight,\n 'active-color': this.activeColor,\n 'has-label': this.hasLabel,\n wide: this.wide,\n progress: this.progress !== undefined,\n 'hide-divider': !this.showDivider,\n })}\n ?disabled=${this.disabled}\n part=\"wrapper\"\n >\n ${this.progress !== undefined ? this.progressSpinner : nothing}\n <div class=\"visible-wrapper\" part=\"visible-wrapper\">\n <div class=\"icon\" part=\"icon\">\n <slot></slot>\n </div>\n </div>\n ${this.hasLabel\n ? html`<div class=\"label\" part=\"label\">\n <slot name=\"label\"></slot>\n </div>`\n : nothing}\n </button>\n `;\n }\n\n static override styles = unsafeCSS(iconStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-icon-button': ObcIconButton;\n }\n}\n"],"names":["IconButtonVariant"],"mappings":";;;;;;;;;;;;;;;;AAcO,IAAK,sCAAAA,uBAAL;AACLA,qBAAA,QAAA,IAAS;AACTA,qBAAA,QAAA,IAAS;AACTA,qBAAA,MAAA,IAAO;AACPA,qBAAA,aAAA,IAAc;AAJJ,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AA0FL,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AAOqB,SAAA,UACxB;AAEyB,SAAA,YAAY;AAEZ,SAAA,aAAa;AAEb,SAAA,cAAc;AAEd,SAAA,cAAc;AAEd,SAAA,OAAO;AAEP,SAAA,WAAW;AAEZ,SAAA,WAA+B;AAE9B,SAAA,WAAoB;AAEF,SAAA,cAAc;AAAA,EAAA;AAAA,EAE3D,IAAI,kBAAkB;AACpB,QAAI,KAAK,aAAa,QAAW;AAC/B,aAAO;AAAA,IACT;AACA,QAAI,KAAK,aAAa,KAAK;AACzB,aAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAA,GAZd,cAYgB,WAAA,cAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAdd,cAcgB,WAAA,eAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhBd,cAgBgB,WAAA,eAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlBd,cAkBgB,WAAA,QAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GApBd,cAoBgB,WAAA,YAAA,CAAA;AAED,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAtBb,cAsBe,WAAA,YAAA,CAAA;AAEC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAxBd,cAwBgB,WAAA,YAAA,CAAA;AAEkB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GA1BhC,cA0BkC,WAAA,eAAA,CAAA;AA1BlC,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
|
|
1
|
+
{"version":3,"file":"icon-button.js","sources":["../../../src/components/icon-button/icon-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport iconStyle from './icon-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {customElement} from '../../decorator.js';\nimport {degToRad} from '../../svghelpers/math.js';\n\n/**\n * The available visual variants for `<obc-icon-button>`.\n * - `normal`: Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n */\nexport enum IconButtonVariant {\n normal = 'normal',\n raised = 'raised',\n flat = 'flat',\n integration = 'integration',\n}\n\n/**\n * `<obc-icon-button>` – An icon-only or icon-with-label button for quick actions.\n *\n * Provides a compact, visually prominent button that displays an icon (and optionally a label) for triggering actions. Commonly used for toolbars, navigation, or contextual actions where space is limited and a recognizable icon can represent the function.\n *\n * Appears as a circular or rounded button with configurable visual styles, supporting progress indication and various layout adaptations.\n *\n * ## Features\n * - **Variants:**\n * - `normal` (default): Standard appearance for most use cases.\n * - `raised`: Adds elevation/shadow for prominence.\n * - `flat`: Minimal, backgroundless style for subtle actions.\n * - `integration`: For use in Integration Bar components\n * - **Progress Indicator:**\n * - Shows a circular progress spinner overlay when the `progress` property is set (0–100). Useful for indicating loading or ongoing actions.\n * - **Label Support:**\n * - Optionally displays a text label below the icon when `hasLabel` is true and content is provided in the `label` slot.\n * - **Corner Alignment:**\n * - `cornerLeft` and `cornerRight` adjust the button's border radius and alignment for seamless placement at the start or end of a container.\n * - **Active State:**\n * - `activated` visually highlights the button as selected or toggled.\n * - `activeColor` applies an accent color for emphasis.\n * - **Wide Mode:**\n * - `wide` increases the button's width for easier touch targets or visual balance.\n * - **Disabled State:**\n * - `disabled` prevents interaction and visually dims the button.\n *\n * ## Usage Guidelines\n * - Use `obc-icon-button` for actions represented by icons, such as toolbars, navigation, or quick-access commands.\n * - Add a label (with `hasLabel` and the `label` slot) when clarity is needed or when icons alone may not be universally understood.\n * - Use the progress indicator for actions that take time, such as uploads or background processes.\n * - Prefer the `normal` variant for most cases; use `raised` to draw attention, and `flat` for less prominent or inline actions.\n * - For grouped or edge-aligned layouts, use `cornerLeft` or `cornerRight` to visually merge with container edges.\n * - Avoid using icon buttons for destructive or critical actions unless paired with clear feedback.\n * - **TODO(designer):** Clarify recommended icon sizes and when to use label vs. icon-only.\n *\n * ## Slots\n * | Slot Name | Renders When... | Purpose |\n * |-----------|---------------------|----------------------------------------------|\n * | (default) | Always | The icon to display (e.g., `<obi-search>`) |\n * | label | If `hasLabel` is set | Optional label text below the icon |\n *\n * ## Events\n * - Emits a standard `click` event (`onClick` handler in framework wrappers) when activated.\n *\n * ## Best Practices\n * - Ensure icons are clear and universally recognizable.\n * - For accessibility, provide an `aria-label` or descriptive label for the button's action.\n * - When using the progress indicator, avoid showing it for very short actions to prevent visual flicker.\n *\n * ## Example:\n * ```\n * <obc-icon-button variant=\"normal\">\n * <obi-search></obi-search>\n * </obc-icon-button>\n *\n * <obc-icon-button variant=\"normal\" hasLabel>\n * <obi-arrow></obi-arrow>\n * <span slot=\"label\">Next</span>\n * </obc-icon-button>\n * ```\n *\n * @property activated - Whether the button is in an activated (selected/toggled) state.\n * Visually highlights the button to indicate selection.\n * @property cornerLeft - If true, aligns the button to the left edge and removes left border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property cornerRight - If true, aligns the button to the right edge and removes right border radius.\n * Useful for grouping or edge-aligned layouts.\n * @property activeColor - Applies an accent color to the button for emphasis.\n * Used to visually distinguish active or important actions.\n * @property wide - Increases the button's width for larger touch targets or visual balance.\n * @property disabled - Disables the button, preventing user interaction and dimming its appearance.\n * @property progress - Shows a circular progress indicator overlay when set (0–100).\n * Use to indicate ongoing actions or loading states.\n * If undefined, no progress indicator is shown.\n * @property hasLabel - If true, displays a label below the icon using the `label` slot.\n * @property showDivider - If false, and cornerLeft or cornerRight is true, the divider is not shown.\n * @property ariaLabel - Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary.\n * @slot - Icon slot (default): Place an icon such as <obi-search> here.\n * @slot label - Optional label shown below the icon when `hasLabel` is true.\n * @fires click - Fired when the button is clicked (if not disabled).\n * @stable\n */\n@customElement('obc-icon-button')\nexport class ObcIconButton extends LitElement {\n /**\n * Visual style of the button.\n * - `normal`: Standard appearance (default).\n * - `raised`: Elevated with shadow.\n * - `flat`: Minimal, backgroundless style.\n */\n @property({type: String}) variant: IconButtonVariant =\n IconButtonVariant.normal;\n\n @property({type: Boolean}) activated = false;\n\n @property({type: Boolean}) cornerLeft = false;\n\n @property({type: Boolean}) cornerRight = false;\n\n @property({type: Boolean}) activeColor = false;\n\n @property({type: Boolean}) wide = false;\n\n @property({type: Boolean}) disabled = false;\n\n @property({type: Number}) progress: undefined | number = undefined;\n\n @property({type: Boolean}) hasLabel: boolean = false;\n\n @property({type: Boolean, attribute: false}) showDivider = true;\n\n // Reactive so a consumer swapping the name (Play → Pause) re-renders the shadow button.\n @property({type: String, attribute: 'aria-label'})\n override ariaLabel: string | null = null;\n\n get progressSpinner() {\n if (this.progress === undefined) {\n return nothing;\n }\n if (this.progress === 100) {\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"#325B9A\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n </svg>\n </div>`;\n }\n const angleRad = degToRad(this.progress * 0.95 * 3.6);\n const x = 20 + 18 * Math.sin(angleRad);\n const y = 20 - 18 * Math.cos(angleRad);\n const largeArcFlag = angleRad > Math.PI ? 1 : 0;\n return html`<div class=\"progress-spinner\">\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"20\"\n cy=\"20\"\n r=\"18\"\n stroke=\"var(--container-backdrop-color)\"\n stroke-width=\"4\"\n fill=\"none\"\n />\n <path\n d=\"M18 2 A18 18 0 ${largeArcFlag} 1 ${x} ${y}\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>`;\n }\n\n override render() {\n return html`\n <button\n class=${classMap({\n wrapper: true,\n ['variant-' + this.variant]: true,\n activated: this.activated,\n 'corner-left': this.cornerLeft,\n 'corner-right': this.cornerRight,\n 'active-color': this.activeColor,\n 'has-label': this.hasLabel,\n wide: this.wide,\n progress: this.progress !== undefined,\n 'hide-divider': !this.showDivider,\n })}\n ?disabled=${this.disabled}\n aria-label=${ifDefined(this.ariaLabel ?? undefined)}\n part=\"wrapper\"\n >\n ${this.progress !== undefined ? this.progressSpinner : nothing}\n <div class=\"visible-wrapper\" part=\"visible-wrapper\">\n <div class=\"icon\" part=\"icon\">\n <slot></slot>\n </div>\n </div>\n ${this.hasLabel\n ? html`<div class=\"label\" part=\"label\">\n <slot name=\"label\"></slot>\n </div>`\n : nothing}\n </button>\n `;\n }\n\n static override styles = unsafeCSS(iconStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-icon-button': ObcIconButton;\n }\n}\n"],"names":["IconButtonVariant"],"mappings":";;;;;;;;;;;;;;;;;AAeO,IAAK,sCAAAA,uBAAL;AACLA,qBAAA,QAAA,IAAS;AACTA,qBAAA,QAAA,IAAS;AACTA,qBAAA,MAAA,IAAO;AACPA,qBAAA,aAAA,IAAc;AAJJ,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AA2FL,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AAOqB,SAAA,UACxB;AAEyB,SAAA,YAAY;AAEZ,SAAA,aAAa;AAEb,SAAA,cAAc;AAEd,SAAA,cAAc;AAEd,SAAA,OAAO;AAEP,SAAA,WAAW;AAEZ,SAAA,WAA+B;AAE9B,SAAA,WAAoB;AAEF,SAAA,cAAc;AAI3D,SAAS,YAA2B;AAAA,EAAA;AAAA,EAEpC,IAAI,kBAAkB;AACpB,QAAI,KAAK,aAAa,QAAW;AAC/B,aAAO;AAAA,IACT;AACA,QAAI,KAAK,aAAa,KAAK;AACzB,aAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkBT;AACA,UAAM,WAAW,SAAS,KAAK,WAAW,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AA,GAZd,cAYgB,WAAA,cAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAdd,cAcgB,WAAA,eAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhBd,cAgBgB,WAAA,eAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlBd,cAkBgB,WAAA,QAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GApBd,cAoBgB,WAAA,YAAA,CAAA;AAED,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAtBb,cAsBe,WAAA,YAAA,CAAA;AAEC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAxBd,cAwBgB,WAAA,YAAA,CAAA;AAEkB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GA1BhC,cA0BkC,WAAA,eAAA,CAAA;AAIpC,gBAAA;AAAA,EADR,SAAS,EAAC,MAAM,QAAQ,WAAW,cAAa;AAAA,GA7BtC,cA8BF,WAAA,aAAA,CAAA;AA9BE,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/top-bar/top-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/top-bar/top-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,OAAO,+BAA+B,CAAC;AACvC,OAAO,mB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