@omicronenergy/oscd-ui 0.0.2 → 0.0.4

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.
Files changed (232) hide show
  1. package/app-bar/OscdAppBar.d.ts +45 -0
  2. package/app-bar/OscdAppBar.js +142 -0
  3. package/app-bar/OscdAppBar.js.map +1 -0
  4. package/app-bar/OscdAppBar.stories.d.ts +10 -0
  5. package/app-bar/OscdAppBar.stories.js +85 -0
  6. package/app-bar/OscdAppBar.stories.js.map +1 -0
  7. package/app-bar/oscd-app-bar.d.ts +12 -0
  8. package/app-bar/oscd-app-bar.js +14 -0
  9. package/app-bar/oscd-app-bar.js.map +1 -0
  10. package/button/OscdButton.stories.d.ts +7 -0
  11. package/button/OscdButton.stories.js +60 -0
  12. package/button/OscdButton.stories.js.map +1 -0
  13. package/button/OscdFilledButton.d.ts +40 -0
  14. package/button/OscdFilledButton.js +42 -0
  15. package/button/OscdFilledButton.js.map +1 -0
  16. package/button/OscdFilledButton.spec.d.ts +6 -0
  17. package/button/OscdFilledButton.spec.js +75 -0
  18. package/button/OscdFilledButton.spec.js.map +1 -0
  19. package/button/OscdOutlinedButton.d.ts +42 -0
  20. package/button/OscdOutlinedButton.js +34 -0
  21. package/button/OscdOutlinedButton.js.map +1 -0
  22. package/button/OscdTextButton.d.ts +40 -0
  23. package/button/OscdTextButton.js +32 -0
  24. package/button/OscdTextButton.js.map +1 -0
  25. package/button/oscd-filled-button.d.ts +2 -0
  26. package/button/oscd-filled-button.js +4 -0
  27. package/button/oscd-filled-button.js.map +1 -0
  28. package/button/oscd-outlined-button.d.ts +7 -0
  29. package/button/oscd-outlined-button.js +9 -0
  30. package/button/oscd-outlined-button.js.map +1 -0
  31. package/button/oscd-text-button.d.ts +7 -0
  32. package/button/oscd-text-button.js +9 -0
  33. package/button/oscd-text-button.js.map +1 -0
  34. package/dialog/OscdDialog.d.ts +47 -0
  35. package/dialog/OscdDialog.js +49 -0
  36. package/dialog/OscdDialog.js.map +1 -0
  37. package/dialog/OscdDialog.stories.d.ts +5 -0
  38. package/dialog/OscdDialog.stories.js +50 -0
  39. package/dialog/OscdDialog.stories.js.map +1 -0
  40. package/dialog/oscd-dialog.d.ts +2 -0
  41. package/dialog/oscd-dialog.js +4 -0
  42. package/dialog/oscd-dialog.js.map +1 -0
  43. package/divider/OscdDivider.d.ts +30 -0
  44. package/divider/OscdDivider.js +21 -0
  45. package/divider/OscdDivider.js.map +1 -0
  46. package/divider/OscdDivider.stories.d.ts +5 -0
  47. package/divider/OscdDivider.stories.js +28 -0
  48. package/divider/OscdDivider.stories.js.map +1 -0
  49. package/divider/oscd-divider.d.ts +2 -0
  50. package/divider/oscd-divider.js +4 -0
  51. package/divider/oscd-divider.js.map +1 -0
  52. package/elevation/OscdElevation.d.ts +28 -0
  53. package/elevation/OscdElevation.js +19 -0
  54. package/elevation/OscdElevation.js.map +1 -0
  55. package/elevation/oscd-elevation.d.ts +7 -0
  56. package/elevation/oscd-elevation.js +9 -0
  57. package/elevation/oscd-elevation.js.map +1 -0
  58. package/field/OscdFilledField.d.ts +24 -0
  59. package/field/OscdFilledField.js +16 -0
  60. package/field/OscdFilledField.js.map +1 -0
  61. package/field/OscdOutlinedField.d.ts +24 -0
  62. package/field/OscdOutlinedField.js +16 -0
  63. package/field/OscdOutlinedField.js.map +1 -0
  64. package/field/oscd-filled-field.d.ts +2 -0
  65. package/field/oscd-filled-field.js +4 -0
  66. package/field/oscd-filled-field.js.map +1 -0
  67. package/field/oscd-outlined-field.d.ts +2 -0
  68. package/field/oscd-outlined-field.js +4 -0
  69. package/field/oscd-outlined-field.js.map +1 -0
  70. package/icon/OscdIcon.d.ts +25 -0
  71. package/icon/OscdIcon.js +16 -0
  72. package/icon/OscdIcon.js.map +1 -0
  73. package/icon/OscdIcon.stories.d.ts +5 -0
  74. package/icon/OscdIcon.stories.js +54 -0
  75. package/icon/OscdIcon.stories.js.map +1 -0
  76. package/icon/oscd-icon.d.ts +2 -0
  77. package/icon/oscd-icon.js +4 -0
  78. package/icon/oscd-icon.js.map +1 -0
  79. package/iconbutton/OscdFilledIconButton.d.ts +44 -0
  80. package/iconbutton/OscdFilledIconButton.js +37 -0
  81. package/iconbutton/OscdFilledIconButton.js.map +1 -0
  82. package/iconbutton/OscdFilledTonalIconButton.d.ts +44 -0
  83. package/iconbutton/OscdFilledTonalIconButton.js +37 -0
  84. package/iconbutton/OscdFilledTonalIconButton.js.map +1 -0
  85. package/iconbutton/OscdIconButton.d.ts +43 -0
  86. package/iconbutton/OscdIconButton.js +36 -0
  87. package/iconbutton/OscdIconButton.js.map +1 -0
  88. package/iconbutton/OscdIconButton.stories.d.ts +7 -0
  89. package/iconbutton/OscdIconButton.stories.js +101 -0
  90. package/iconbutton/OscdIconButton.stories.js.map +1 -0
  91. package/iconbutton/OutlinedIconButton.d.ts +43 -0
  92. package/iconbutton/OutlinedIconButton.js +36 -0
  93. package/iconbutton/OutlinedIconButton.js.map +1 -0
  94. package/iconbutton/oscd-filled-icon-button.d.ts +2 -0
  95. package/iconbutton/oscd-filled-icon-button.js +4 -0
  96. package/iconbutton/oscd-filled-icon-button.js.map +1 -0
  97. package/iconbutton/oscd-filled-tonal-icon-button.d.ts +2 -0
  98. package/iconbutton/oscd-filled-tonal-icon-button.js +4 -0
  99. package/iconbutton/oscd-filled-tonal-icon-button.js.map +1 -0
  100. package/iconbutton/oscd-icon-button.d.ts +2 -0
  101. package/iconbutton/oscd-icon-button.js +4 -0
  102. package/iconbutton/oscd-icon-button.js.map +1 -0
  103. package/iconbutton/oscd-outlined-icon-button.d.ts +2 -0
  104. package/iconbutton/oscd-outlined-icon-button.js +4 -0
  105. package/iconbutton/oscd-outlined-icon-button.js.map +1 -0
  106. package/list/OscdList.d.ts +39 -0
  107. package/list/OscdList.js +44 -0
  108. package/list/OscdList.js.map +1 -0
  109. package/list/OscdList.stories.d.ts +5 -0
  110. package/list/OscdList.stories.js +30 -0
  111. package/list/OscdList.stories.js.map +1 -0
  112. package/list/OscdListItem.d.ts +59 -0
  113. package/list/OscdListItem.js +80 -0
  114. package/list/OscdListItem.js.map +1 -0
  115. package/list/oscd-list-item.d.ts +2 -0
  116. package/list/oscd-list-item.js +4 -0
  117. package/list/oscd-list-item.js.map +1 -0
  118. package/list/oscd-list.d.ts +2 -0
  119. package/list/oscd-list.js +4 -0
  120. package/list/oscd-list.js.map +1 -0
  121. package/menu/OscdMenu.d.ts +73 -0
  122. package/menu/OscdMenu.js +62 -0
  123. package/menu/OscdMenu.js.map +1 -0
  124. package/menu/OscdMenu.stories.d.ts +6 -0
  125. package/menu/OscdMenu.stories.js +55 -0
  126. package/menu/OscdMenu.stories.js.map +1 -0
  127. package/menu/OscdMenuItem.d.ts +37 -0
  128. package/menu/OscdMenuItem.js +26 -0
  129. package/menu/OscdMenuItem.js.map +1 -0
  130. package/menu/OscdMenuItem.stories.d.ts +5 -0
  131. package/menu/OscdMenuItem.stories.js +37 -0
  132. package/menu/OscdMenuItem.stories.js.map +1 -0
  133. package/menu/oscd-menu-item.d.ts +2 -0
  134. package/menu/oscd-menu-item.js +4 -0
  135. package/menu/oscd-menu-item.js.map +1 -0
  136. package/menu/oscd-menu.d.ts +1 -0
  137. package/menu/oscd-menu.js +4 -0
  138. package/menu/oscd-menu.js.map +1 -0
  139. package/navigation-drawer/OscdNavigationDrawer.d.ts +15 -0
  140. package/navigation-drawer/OscdNavigationDrawer.js +37 -0
  141. package/navigation-drawer/OscdNavigationDrawer.js.map +1 -0
  142. package/navigation-drawer/OscdNavigationDrawer.stories.d.ts +5 -0
  143. package/navigation-drawer/OscdNavigationDrawer.stories.js +97 -0
  144. package/navigation-drawer/OscdNavigationDrawer.stories.js.map +1 -0
  145. package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +15 -0
  146. package/navigation-drawer/OscdNavigationDrawerHeader.js +61 -0
  147. package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -0
  148. package/navigation-drawer/OscdNavigationDrawerHeader.stories.d.ts +5 -0
  149. package/navigation-drawer/OscdNavigationDrawerHeader.stories.js +35 -0
  150. package/navigation-drawer/OscdNavigationDrawerHeader.stories.js.map +1 -0
  151. package/navigation-drawer/oscd-navigation-drawer-header.d.ts +2 -0
  152. package/navigation-drawer/oscd-navigation-drawer-header.js +4 -0
  153. package/navigation-drawer/oscd-navigation-drawer-header.js.map +1 -0
  154. package/navigation-drawer/oscd-navigation-drawer.d.ts +7 -0
  155. package/navigation-drawer/oscd-navigation-drawer.js +4 -0
  156. package/navigation-drawer/oscd-navigation-drawer.js.map +1 -0
  157. package/package.json +3 -2
  158. package/select/OscdFilledSelect.d.ts +47 -0
  159. package/select/OscdFilledSelect.js +39 -0
  160. package/select/OscdFilledSelect.js.map +1 -0
  161. package/select/OscdFilledSelect.stories.d.ts +5 -0
  162. package/select/OscdFilledSelect.stories.js +29 -0
  163. package/select/OscdFilledSelect.stories.js.map +1 -0
  164. package/select/OscdOutlinedSelect.d.ts +47 -0
  165. package/select/OscdOutlinedSelect.js +39 -0
  166. package/select/OscdOutlinedSelect.js.map +1 -0
  167. package/select/OscdOutlinedSelect.stories.d.ts +5 -0
  168. package/select/OscdOutlinedSelect.stories.js +29 -0
  169. package/select/OscdOutlinedSelect.stories.js.map +1 -0
  170. package/select/OscdSelectOption.d.ts +51 -0
  171. package/select/OscdSelectOption.js +41 -0
  172. package/select/OscdSelectOption.js.map +1 -0
  173. package/select/oscd-filled-select.d.ts +2 -0
  174. package/select/oscd-filled-select.js +4 -0
  175. package/select/oscd-filled-select.js.map +1 -0
  176. package/select/oscd-outlined-select.d.ts +2 -0
  177. package/select/oscd-outlined-select.js +4 -0
  178. package/select/oscd-outlined-select.js.map +1 -0
  179. package/select/oscd-select-option.d.ts +2 -0
  180. package/select/oscd-select-option.js +4 -0
  181. package/select/oscd-select-option.js.map +1 -0
  182. package/tabs/OscdPrimaryTab.d.ts +26 -0
  183. package/tabs/OscdPrimaryTab.js +18 -0
  184. package/tabs/OscdPrimaryTab.js.map +1 -0
  185. package/tabs/OscdPrimaryTab.stories.d.ts +5 -0
  186. package/tabs/OscdPrimaryTab.stories.js +33 -0
  187. package/tabs/OscdPrimaryTab.stories.js.map +1 -0
  188. package/tabs/OscdSecondaryTab.d.ts +26 -0
  189. package/tabs/OscdSecondaryTab.js +18 -0
  190. package/tabs/OscdSecondaryTab.js.map +1 -0
  191. package/tabs/OscdSecondaryTab.stories.d.ts +5 -0
  192. package/tabs/OscdSecondaryTab.stories.js +33 -0
  193. package/tabs/OscdSecondaryTab.stories.js.map +1 -0
  194. package/tabs/OscdTabs.d.ts +26 -0
  195. package/tabs/OscdTabs.js +17 -0
  196. package/tabs/OscdTabs.js.map +1 -0
  197. package/tabs/OscdTabs.stories.d.ts +5 -0
  198. package/tabs/OscdTabs.stories.js +29 -0
  199. package/tabs/OscdTabs.stories.js.map +1 -0
  200. package/tabs/oscd-primary-tab.d.ts +2 -0
  201. package/tabs/oscd-primary-tab.js +4 -0
  202. package/tabs/oscd-primary-tab.js.map +1 -0
  203. package/tabs/oscd-secondary-tab.d.ts +2 -0
  204. package/tabs/oscd-secondary-tab.js +4 -0
  205. package/tabs/oscd-secondary-tab.js.map +1 -0
  206. package/tabs/oscd-tabs.d.ts +2 -0
  207. package/tabs/oscd-tabs.js +4 -0
  208. package/tabs/oscd-tabs.js.map +1 -0
  209. package/textfield/OscdFilledTextField.d.ts +31 -0
  210. package/textfield/OscdFilledTextField.js +30 -0
  211. package/textfield/OscdFilledTextField.js.map +1 -0
  212. package/textfield/OscdOutlinedTextField.d.ts +27 -0
  213. package/textfield/OscdOutlinedTextField.js +24 -0
  214. package/textfield/OscdOutlinedTextField.js.map +1 -0
  215. package/textfield/oscd-filled-text-field.d.ts +2 -0
  216. package/textfield/oscd-filled-text-field.js +4 -0
  217. package/textfield/oscd-filled-text-field.js.map +1 -0
  218. package/textfield/oscd-outlined-text-field.d.ts +2 -0
  219. package/textfield/oscd-outlined-text-field.js +4 -0
  220. package/textfield/oscd-outlined-text-field.js.map +1 -0
  221. package/theming/AllComponents.stories.d.ts +5 -0
  222. package/theming/AllComponents.stories.js +309 -0
  223. package/theming/AllComponents.stories.js.map +1 -0
  224. package/utils/storybook/getStorybookHelpers.d.ts +4 -0
  225. package/utils/storybook/getStorybookHelpers.js +53 -0
  226. package/utils/storybook/getStorybookHelpers.js.map +1 -0
  227. package/utils/storybook/scopedWcDecorator.d.ts +2 -0
  228. package/utils/storybook/scopedWcDecorator.js +27 -0
  229. package/utils/storybook/scopedWcDecorator.js.map +1 -0
  230. package/utils/storybook/themingDecorator.d.ts +17 -0
  231. package/utils/storybook/themingDecorator.js +100 -0
  232. package/utils/storybook/themingDecorator.js.map +1 -0
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { LitElement } from "lit";
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "oscd-app-bar": OscdAppBar;
15
+ }
16
+ }
17
+ /**
18
+ * @tag oscd-app-bar
19
+ * @class OscdAppBar
20
+ * @extends LitElement
21
+ * @summary A component that represents an app bar.
22
+ * @description
23
+ * The app bar is a top-level navigation component that displays information and actions relating to the current screen.
24
+ * It can contain a title, navigation icons, and action icons.
25
+ * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
26
+ * @slot actionStart - Slot for action icons at the start of the app bar.
27
+ * @slot title - Slot for the title of the app bar.
28
+ * @slot actionEnd - Slot for action icons at the end of the app bar.
29
+ * @slot Default - Slot for additional content in the app bar.
30
+ *
31
+ * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
32
+ * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
33
+ * @cssprop --oscd-app-bar-color - The color of the app bar.
34
+ * @cssprop --oscd-app-bar-background-color - The background color of the app bar.
35
+ * @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.
36
+ * @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.
37
+ * @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.
38
+ * @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.
39
+ * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
40
+ *
41
+ */
42
+ export declare class OscdAppBar extends LitElement {
43
+ static styles: import("lit").CSSResult;
44
+ render(): import("lit-html").TemplateResult<1>;
45
+ }
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { LitElement, html, css } from "lit";
12
+ /**
13
+ * @tag oscd-app-bar
14
+ * @class OscdAppBar
15
+ * @extends LitElement
16
+ * @summary A component that represents an app bar.
17
+ * @description
18
+ * The app bar is a top-level navigation component that displays information and actions relating to the current screen.
19
+ * It can contain a title, navigation icons, and action icons.
20
+ * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
21
+ * @slot actionStart - Slot for action icons at the start of the app bar.
22
+ * @slot title - Slot for the title of the app bar.
23
+ * @slot actionEnd - Slot for action icons at the end of the app bar.
24
+ * @slot Default - Slot for additional content in the app bar.
25
+ *
26
+ * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
27
+ * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
28
+ * @cssprop --oscd-app-bar-color - The color of the app bar.
29
+ * @cssprop --oscd-app-bar-background-color - The background color of the app bar.
30
+ * @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.
31
+ * @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.
32
+ * @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.
33
+ * @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.
34
+ * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
35
+ *
36
+ */
37
+ export class OscdAppBar extends LitElement {
38
+ static styles = css `
39
+ :host {
40
+ --md-elevation-level: var(--oscd-app-bar-elevation, 3);
41
+ --md-elevation-shadow-color: var(
42
+ --oscd-app-bar-shadow-color,
43
+ var(--md-sys-color-shadow, #000)
44
+ );
45
+ --app-bar-color: var(
46
+ --oscd-app-bar-color,
47
+ var(--md-sys-color-on-primary, #1d1b20)
48
+ );
49
+ --app-bar-background-color: var(
50
+ --oscd-app-bar-background-color,
51
+ var(--md-sys-color-primary, #fff)
52
+ );
53
+ --app-bar-title-font-family: var(
54
+ --oscd-app-bar-title-font-family,
55
+ var(
56
+ --md-sys-typescale-body-large-font,
57
+ var(--md-ref-typeface-plain, Roboto)
58
+ )
59
+ );
60
+ --app-bar-title-font-size: var(
61
+ --oscd-app-bar-title-font-size,
62
+ var(--md-sys-typescale-body-large-size, 1.25rem)
63
+ );
64
+ --app-bar-title-line-height: var(
65
+ --oscd-app-bar-title-line-height,
66
+ var(--md-sys-typescale-body-large-line-height, 2rem)
67
+ );
68
+ --app-bar-title-font-weight: var(
69
+ --oscd-app-bar-title-font-weight,
70
+ var(
71
+ --md-sys-typescale-body-large-weight,
72
+ var(--md-ref-typeface-weight-regular, 500)
73
+ )
74
+ );
75
+ --md-icon-button-icon-color: var(--app-bar-color);
76
+ }
77
+
78
+ header {
79
+ display: flex;
80
+ flex-direction: column;
81
+ flex-grow: 1;
82
+ position: sticky;
83
+ top: 0;
84
+ z-index: 4;
85
+ color: var(--app-bar-color);
86
+ background-color: var(--app-bar-background-color);
87
+ }
88
+
89
+ .main-header {
90
+ padding: 0 12px;
91
+ display: flex;
92
+ flex-grow: 1;
93
+ align-items: center;
94
+ height: 64px;
95
+ }
96
+
97
+ @media (max-width: 599px) {
98
+ .main-header {
99
+ height: 56px;
100
+ }
101
+ }
102
+
103
+ ::slotted([slot="title"]) {
104
+ display: flex;
105
+ align-items: center;
106
+ gap: 4px;
107
+ margin-left: 16px;
108
+ font-family: var(--app-bar-title-font-family);
109
+ font-size: var(--app-bar-title-font-size);
110
+ font-weight: var(--app-bar-title-font-weight);
111
+ line-height: var(--app-bar-title-line-height);
112
+ }
113
+
114
+ .sub-header {
115
+ display: flex;
116
+ width: 100%;
117
+ }
118
+
119
+ .spacer {
120
+ flex: 1;
121
+ }
122
+ `;
123
+ render() {
124
+ return html `
125
+ <header>
126
+ <div>
127
+ <!-- <md-elevation part="elevation"></md-elevation> -->
128
+ <div class="main-header">
129
+ <slot name="actionStart"></slot>
130
+ <slot name="title"></slot>
131
+ <span class="spacer"></span>
132
+ <slot name="actionEnd"></slot>
133
+ </div>
134
+ <div class="sub-header">
135
+ <slot></slot>
136
+ </div>
137
+ </div>
138
+ </header>
139
+ `;
140
+ }
141
+ }
142
+ //# sourceMappingURL=OscdAppBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdAppBar.js","sourceRoot":"","sources":["OscdAppBar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAO5C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAU,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoF3B,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;KAeV,CAAC;IACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { LitElement, html, css } from \"lit\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-app-bar\": OscdAppBar;\n }\n}\n/**\n * @tag oscd-app-bar\n * @class OscdAppBar\n * @extends LitElement\n * @summary A component that represents an app bar.\n * @description\n * The app bar is a top-level navigation component that displays information and actions relating to the current screen.\n * It can contain a title, navigation icons, and action icons.\n * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.\n * @slot actionStart - Slot for action icons at the start of the app bar.\n * @slot title - Slot for the title of the app bar.\n * @slot actionEnd - Slot for action icons at the end of the app bar.\n * @slot Default - Slot for additional content in the app bar.\n *\n * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.\n * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.\n * @cssprop --oscd-app-bar-color - The color of the app bar.\n * @cssprop --oscd-app-bar-background-color - The background color of the app bar.\n * @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.\n * @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.\n * @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.\n * @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.\n * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.\n *\n */\nexport class OscdAppBar extends LitElement {\n static override styles = css`\n :host {\n --md-elevation-level: var(--oscd-app-bar-elevation, 3);\n --md-elevation-shadow-color: var(\n --oscd-app-bar-shadow-color,\n var(--md-sys-color-shadow, #000)\n );\n --app-bar-color: var(\n --oscd-app-bar-color,\n var(--md-sys-color-on-primary, #1d1b20)\n );\n --app-bar-background-color: var(\n --oscd-app-bar-background-color,\n var(--md-sys-color-primary, #fff)\n );\n --app-bar-title-font-family: var(\n --oscd-app-bar-title-font-family,\n var(\n --md-sys-typescale-body-large-font,\n var(--md-ref-typeface-plain, Roboto)\n )\n );\n --app-bar-title-font-size: var(\n --oscd-app-bar-title-font-size,\n var(--md-sys-typescale-body-large-size, 1.25rem)\n );\n --app-bar-title-line-height: var(\n --oscd-app-bar-title-line-height,\n var(--md-sys-typescale-body-large-line-height, 2rem)\n );\n --app-bar-title-font-weight: var(\n --oscd-app-bar-title-font-weight,\n var(\n --md-sys-typescale-body-large-weight,\n var(--md-ref-typeface-weight-regular, 500)\n )\n );\n --md-icon-button-icon-color: var(--app-bar-color);\n }\n\n header {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n position: sticky;\n top: 0;\n z-index: 4;\n color: var(--app-bar-color);\n background-color: var(--app-bar-background-color);\n }\n\n .main-header {\n padding: 0 12px;\n display: flex;\n flex-grow: 1;\n align-items: center;\n height: 64px;\n }\n\n @media (max-width: 599px) {\n .main-header {\n height: 56px;\n }\n }\n\n ::slotted([slot=\"title\"]) {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 16px;\n font-family: var(--app-bar-title-font-family);\n font-size: var(--app-bar-title-font-size);\n font-weight: var(--app-bar-title-font-weight);\n line-height: var(--app-bar-title-line-height);\n }\n\n .sub-header {\n display: flex;\n width: 100%;\n }\n\n .spacer {\n flex: 1;\n }\n `;\n\n override render() {\n return html`\n <header>\n <div>\n <!-- <md-elevation part=\"elevation\"></md-elevation> -->\n <div class=\"main-header\">\n <slot name=\"actionStart\"></slot>\n <slot name=\"title\"></slot>\n <span class=\"spacer\"></span>\n <slot name=\"actionEnd\"></slot>\n </div>\n <div class=\"sub-header\">\n <slot></slot>\n </div>\n </div>\n </header>\n `;\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { TemplateResult } from "lit";
2
+ import type { Meta, StoryObj } from "@storybook/web-components";
3
+ import { OscdAppBar } from "./OscdAppBar.js";
4
+ declare const meta: Meta<OscdAppBar & {
5
+ subHeader: () => TemplateResult;
6
+ }>;
7
+ export default meta;
8
+ type Story = StoryObj;
9
+ export declare const Default: Story;
10
+ export declare const WithSubHeader: Story;
@@ -0,0 +1,85 @@
1
+ import { html } from "lit";
2
+ import { OscdAppBar } from "./OscdAppBar.js";
3
+ import { OscdList } from "list/OscdList";
4
+ import { OscdListItem } from "list/OscdListItem";
5
+ import { OscdIcon } from "icon/OscdIcon";
6
+ import { OscdTabs } from "tabs/OscdTabs";
7
+ import { OscdSecondaryTab } from "tabs/OscdSecondaryTab";
8
+ import { OscdDivider } from "../divider/OscdDivider.js";
9
+ import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
10
+ import { OscdFilledIconButton } from "iconbutton/OscdFilledIconButton.js";
11
+ import { getStorybookHelpers, storybookHelperDecorator, } from "utils/storybook/getStorybookHelpers.js";
12
+ const { args, argTypes } = getStorybookHelpers("oscd-app-bar");
13
+ const meta = {
14
+ title: "Open SCD/App Bar",
15
+ component: "oscd-app-bar",
16
+ tags: ["autodocs"],
17
+ decorators: [scopedWcDecorator, storybookHelperDecorator],
18
+ args,
19
+ parameters: {
20
+ layout: "fullscreen",
21
+ scopedElements: {
22
+ "oscd-app-bar": OscdAppBar,
23
+ "oscd-divider": OscdDivider,
24
+ "oscd-filled-icon-button": OscdFilledIconButton,
25
+ "oscd-icon": OscdIcon,
26
+ "oscd-list": OscdList,
27
+ "oscd-list-item": OscdListItem,
28
+ "oscd-tabs": OscdTabs,
29
+ "oscd-secondary-tab": OscdSecondaryTab,
30
+ },
31
+ },
32
+ render: ({ title, subHeader, ...rest }) => {
33
+ console.log("args", rest);
34
+ return html `
35
+ <oscd-app-bar>
36
+ <oscd-filled-icon-button
37
+ slot="actionStart"
38
+ aria-label="Menu"
39
+ @click=${() => console.log("actionStart clicked")}
40
+ >
41
+ <oscd-icon>menu</oscd-icon></oscd-filled-icon-button
42
+ >
43
+ <div slot="title">${title}</div>
44
+ <oscd-filled-icon-button
45
+ slot="actionEnd"
46
+ aria-label="Menu"
47
+ @click=${() => console.log("actionStart clicked")}
48
+ >
49
+ <oscd-icon>more_vert</oscd-icon></oscd-filled-icon-button
50
+ >
51
+ ${subHeader && subHeader()}
52
+ </oscd-app-bar>
53
+ `;
54
+ },
55
+ argTypes: {
56
+ title: {
57
+ control: { type: "text" },
58
+ description: "App Bar Title",
59
+ table: {
60
+ category: "Web Component Properties",
61
+ defaultValue: { summary: "" },
62
+ },
63
+ },
64
+ ...argTypes,
65
+ },
66
+ };
67
+ export default meta;
68
+ export const Default = {
69
+ args: {
70
+ title: "My App Bar",
71
+ },
72
+ };
73
+ export const WithSubHeader = {
74
+ args: {
75
+ title: "My App Bar (with subheader)",
76
+ subHeader: () => html `
77
+ <oscd-tabs>
78
+ <oscd-secondary-tab>Video</oscd-secondary-tab>
79
+ <oscd-secondary-tab>Photos</oscd-secondary-tab>
80
+ <oscd-secondary-tab>Audio</oscd-secondary-tab>
81
+ </oscd-tabs>
82
+ `,
83
+ },
84
+ };
85
+ //# sourceMappingURL=OscdAppBar.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdAppBar.stories.js","sourceRoot":"","sources":["OscdAppBar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,wCAAwC,CAAC;AAEhD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;AAE/D,MAAM,IAAI,GAA2D;IACnE,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,cAAc;IACzB,IAAI,EAAE,CAAC,UAA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CAAA;;;;;;KAMpB;KACF;CACF,CAAC","sourcesContent":["import { html, TemplateResult } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdAppBar } from \"./OscdAppBar.js\";\nimport { OscdList } from \"list/OscdList\";\nimport { OscdListItem } from \"list/OscdListItem\";\nimport { OscdIcon } from \"icon/OscdIcon\";\nimport { OscdTabs } from \"tabs/OscdTabs\";\nimport { OscdSecondaryTab } from \"tabs/OscdSecondaryTab\";\nimport { OscdDivider } from \"../divider/OscdDivider.js\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\nimport { OscdFilledIconButton } from \"iconbutton/OscdFilledIconButton.js\";\nimport {\n getStorybookHelpers,\n storybookHelperDecorator,\n} from \"utils/storybook/getStorybookHelpers.js\";\n\nconst { args, argTypes } = getStorybookHelpers(\"oscd-app-bar\");\n\nconst meta: Meta<OscdAppBar & { subHeader: () => TemplateResult }> = {\n title: \"Open SCD/App Bar\",\n component: \"oscd-app-bar\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator, storybookHelperDecorator],\n\n args,\n parameters: {\n layout: \"fullscreen\",\n scopedElements: {\n \"oscd-app-bar\": OscdAppBar,\n \"oscd-divider\": OscdDivider,\n \"oscd-filled-icon-button\": OscdFilledIconButton,\n \"oscd-icon\": OscdIcon,\n \"oscd-list\": OscdList,\n \"oscd-list-item\": OscdListItem,\n \"oscd-tabs\": OscdTabs,\n \"oscd-secondary-tab\": OscdSecondaryTab,\n },\n },\n render: ({ title, subHeader, ...rest }) => {\n console.log(\"args\", rest);\n return html`\n <oscd-app-bar>\n <oscd-filled-icon-button\n slot=\"actionStart\"\n aria-label=\"Menu\"\n @click=${() => console.log(\"actionStart clicked\")}\n >\n <oscd-icon>menu</oscd-icon></oscd-filled-icon-button\n >\n <div slot=\"title\">${title}</div>\n <oscd-filled-icon-button\n slot=\"actionEnd\"\n aria-label=\"Menu\"\n @click=${() => console.log(\"actionStart clicked\")}\n >\n <oscd-icon>more_vert</oscd-icon></oscd-filled-icon-button\n >\n ${subHeader && subHeader()}\n </oscd-app-bar>\n `;\n },\n argTypes: {\n title: {\n control: { type: \"text\" },\n description: \"App Bar Title\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"\" },\n },\n },\n ...argTypes,\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {\n title: \"My App Bar\",\n },\n};\n\nexport const WithSubHeader: Story = {\n args: {\n title: \"My App Bar (with subheader)\",\n subHeader: () => html`\n <oscd-tabs>\n <oscd-secondary-tab>Video</oscd-secondary-tab>\n <oscd-secondary-tab>Photos</oscd-secondary-tab>\n <oscd-secondary-tab>Audio</oscd-secondary-tab>\n </oscd-tabs>\n `,\n },\n};\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { OscdAppBar } from "./OscdAppBar.js";
12
+ export { OscdAppBar };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { OscdAppBar } from "./OscdAppBar.js";
12
+ window.customElements.define("oscd-app-bar", OscdAppBar);
13
+ export { OscdAppBar };
14
+ //# sourceMappingURL=oscd-app-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oscd-app-bar.js","sourceRoot":"","sources":["oscd-app-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OscdAppBar } from \"./OscdAppBar.js\";\n\nwindow.customElements.define(\"oscd-app-bar\", OscdAppBar);\nexport { OscdAppBar };\n"]}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/web-components";
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const FilledButton: Story;
6
+ export declare const OutlinedButton: Story;
7
+ export declare const TextButton: Story;
@@ -0,0 +1,60 @@
1
+ import { html } from "lit";
2
+ import { OscdTextButton } from "button/OscdTextButton";
3
+ import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
4
+ import { OscdFilledButton } from "./OscdFilledButton";
5
+ import { OscdOutlinedButton } from "./OscdOutlinedButton";
6
+ const meta = {
7
+ title: "Open SCD/Buttons",
8
+ tags: ["autodocs"],
9
+ decorators: [scopedWcDecorator],
10
+ parameters: {
11
+ layout: "centered",
12
+ scopedElements: {
13
+ "oscd-filled-button": OscdFilledButton,
14
+ "oscd-outlined-button": OscdOutlinedButton,
15
+ "oscd-text-button": OscdTextButton,
16
+ },
17
+ },
18
+ argTypes: {
19
+ label: {
20
+ control: { type: "text" },
21
+ description: "Button label",
22
+ table: {
23
+ category: "Web Component Properties",
24
+ defaultValue: { summary: "Click Me" },
25
+ },
26
+ },
27
+ },
28
+ };
29
+ export default meta;
30
+ export const FilledButton = {
31
+ args: {
32
+ label: "Filled Button",
33
+ },
34
+ render: ({ label }) => html `
35
+ <oscd-filled-button @click=${() => console.log("Clicked!")}>
36
+ ${label}
37
+ </oscd-filled-button>
38
+ `,
39
+ };
40
+ export const OutlinedButton = {
41
+ args: {
42
+ label: "Outlined Button",
43
+ },
44
+ render: ({ label }) => html `
45
+ <oscd-outlined-button @click=${() => console.log("Clicked!")}>
46
+ ${label}
47
+ </oscd-outlined-button>
48
+ `,
49
+ };
50
+ export const TextButton = {
51
+ args: {
52
+ label: "Text Button",
53
+ },
54
+ render: ({ label }) => html `
55
+ <oscd-text-button @click=${() => console.log("Clicked!")}>
56
+ ${label}
57
+ </oscd-text-button>
58
+ `,
59
+ };
60
+ //# sourceMappingURL=OscdButton.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdButton.stories.js","sourceRoot":"","sources":["OscdButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE;YACd,oBAAoB,EAAE,gBAAgB;YACtC,sBAAsB,EAAE,kBAAkB;YAC1C,kBAAkB,EAAE,cAAc;SACnC;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,YAAY,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;aACtC;SACF;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;KACvB;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;iCACI,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QACtD,KAAK;;GAEV;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,KAAK,EAAE,iBAAiB;KACzB;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;mCACM,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QACxD,KAAK;;GAEV;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,aAAa;KACrB;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;+BACE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QACpD,KAAK;;GAEV;CACF,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdTextButton } from \"button/OscdTextButton\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\nimport { OscdFilledButton } from \"./OscdFilledButton\";\nimport { OscdOutlinedButton } from \"./OscdOutlinedButton\";\n\nconst meta: Meta = {\n title: \"Open SCD/Buttons\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-filled-button\": OscdFilledButton,\n \"oscd-outlined-button\": OscdOutlinedButton,\n \"oscd-text-button\": OscdTextButton,\n },\n },\n argTypes: {\n label: {\n control: { type: \"text\" },\n description: \"Button label\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"Click Me\" },\n },\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const FilledButton: Story = {\n args: {\n label: \"Filled Button\",\n },\n render: ({ label }) => html`\n <oscd-filled-button @click=${() => console.log(\"Clicked!\")}>\n ${label}\n </oscd-filled-button>\n `,\n};\n\nexport const OutlinedButton: Story = {\n args: {\n label: \"Outlined Button\",\n },\n render: ({ label }) => html`\n <oscd-outlined-button @click=${() => console.log(\"Clicked!\")}>\n ${label}\n </oscd-outlined-button>\n `,\n};\n\nexport const TextButton: Story = {\n args: {\n label: \"Text Button\",\n },\n render: ({ label }) => html`\n <oscd-text-button @click=${() => console.log(\"Clicked!\")}>\n ${label}\n </oscd-text-button>\n `,\n};\n"]}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { FilledButton } from "@material/web/button/internal/filled-button.js";
12
+ import { CSSResult } from "@lit/reactive-element";
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ "oscd-filled-button": OscdFilledButton;
16
+ }
17
+ }
18
+ /**
19
+ * @summary Buttons help people take action, such as sending an email, sharing a
20
+ * document, or liking a comment.
21
+ *
22
+ * @description
23
+ * __Emphasis:__ High emphasis – For the primary, most important, or most common
24
+ * action on a screen
25
+ *
26
+ * __Rationale:__ The filled button’s contrasting surface color makes it the
27
+ * most prominent button after the FAB. It’s used for final or unblocking
28
+ * actions in a flow.
29
+ *
30
+ * __Example usages:__
31
+ * - Save
32
+ * - Confirm
33
+ * - Done
34
+ *
35
+ * @final
36
+ * @suppress {visibility}
37
+ */
38
+ export declare class OscdFilledButton extends FilledButton {
39
+ static styles: CSSResult[];
40
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { FilledButton } from "@material/web/button/internal/filled-button.js";
12
+ import { styles as filledStyles } from "@material/web/button/internal/filled-styles.js";
13
+ import { styles as sharedElevationStyles } from "@material/web/button/internal/shared-elevation-styles.js";
14
+ import { styles as sharedStyles } from "@material/web/button/internal/shared-styles.js";
15
+ /**
16
+ * @summary Buttons help people take action, such as sending an email, sharing a
17
+ * document, or liking a comment.
18
+ *
19
+ * @description
20
+ * __Emphasis:__ High emphasis – For the primary, most important, or most common
21
+ * action on a screen
22
+ *
23
+ * __Rationale:__ The filled button’s contrasting surface color makes it the
24
+ * most prominent button after the FAB. It’s used for final or unblocking
25
+ * actions in a flow.
26
+ *
27
+ * __Example usages:__
28
+ * - Save
29
+ * - Confirm
30
+ * - Done
31
+ *
32
+ * @final
33
+ * @suppress {visibility}
34
+ */
35
+ export class OscdFilledButton extends FilledButton {
36
+ static styles = [
37
+ sharedStyles,
38
+ sharedElevationStyles,
39
+ filledStyles,
40
+ ];
41
+ }
42
+ //# sourceMappingURL=OscdFilledButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdFilledButton.js","sourceRoot":"","sources":["OscdFilledButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAC3G,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AASxF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,MAAM,CAAU,MAAM,GAAgB;QACpC,YAAY;QACZ,qBAAqB;QACrB,YAAY;KACb,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { FilledButton } from \"@material/web/button/internal/filled-button.js\";\nimport { styles as filledStyles } from \"@material/web/button/internal/filled-styles.js\";\nimport { styles as sharedElevationStyles } from \"@material/web/button/internal/shared-elevation-styles.js\";\nimport { styles as sharedStyles } from \"@material/web/button/internal/shared-styles.js\";\nimport { CSSResult } from \"@lit/reactive-element\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-filled-button\": OscdFilledButton;\n }\n}\n\n/**\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * @description\n * __Emphasis:__ High emphasis – For the primary, most important, or most common\n * action on a screen\n *\n * __Rationale:__ The filled button’s contrasting surface color makes it the\n * most prominent button after the FAB. It’s used for final or unblocking\n * actions in a flow.\n *\n * __Example usages:__\n * - Save\n * - Confirm\n * - Done\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdFilledButton extends FilledButton {\n static override styles: CSSResult[] = [\n sharedStyles,\n sharedElevationStyles,\n filledStyles,\n ];\n}\n"]}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2024 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2024 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ // import 'jasmine'; (google3-only)
8
+ import { html } from "lit";
9
+ import { customElement } from "lit/decorators.js";
10
+ import { Environment } from "../testing/environment.js";
11
+ import { ButtonHarness } from "@material/web/button/harness.js";
12
+ import { OscdFilledButton as Button } from "./OscdFilledButton.js";
13
+ let TestButton = class TestButton extends Button {
14
+ };
15
+ TestButton = __decorate([
16
+ customElement("test-button")
17
+ ], TestButton);
18
+ describe("Button", () => {
19
+ const env = new Environment();
20
+ async function setupTest() {
21
+ const button = new TestButton();
22
+ env.render(html `${button}`);
23
+ await env.waitForStability();
24
+ return { button, harness: new ButtonHarness(button) };
25
+ }
26
+ it("should not be focusable when disabled", async () => {
27
+ // Arrange
28
+ const { button } = await setupTest();
29
+ button.disabled = true;
30
+ await env.waitForStability();
31
+ // Act
32
+ button.focus();
33
+ // Assert
34
+ expect(document.activeElement)
35
+ .withContext("disabled button should not be focused")
36
+ .not.toBe(button);
37
+ });
38
+ it("should be focusable when soft-disabled", async () => {
39
+ // Arrange
40
+ const { button } = await setupTest();
41
+ button.softDisabled = true;
42
+ await env.waitForStability();
43
+ // Act
44
+ button.focus();
45
+ // Assert
46
+ expect(document.activeElement)
47
+ .withContext("soft-disabled button should be focused")
48
+ .toBe(button);
49
+ });
50
+ it("should not be clickable when disabled", async () => {
51
+ // Arrange
52
+ const clickListener = jasmine.createSpy("clickListener");
53
+ const { button } = await setupTest();
54
+ button.disabled = true;
55
+ button.addEventListener("click", clickListener);
56
+ await env.waitForStability();
57
+ // Act
58
+ button.click();
59
+ // Assert
60
+ expect(clickListener).not.toHaveBeenCalled();
61
+ });
62
+ it("should not be clickable when soft-disabled", async () => {
63
+ // Arrange
64
+ const clickListener = jasmine.createSpy("clickListener");
65
+ const { button } = await setupTest();
66
+ button.softDisabled = true;
67
+ button.addEventListener("click", clickListener);
68
+ await env.waitForStability();
69
+ // Act
70
+ button.click();
71
+ // Assert
72
+ expect(clickListener).not.toHaveBeenCalled();
73
+ });
74
+ });
75
+ //# sourceMappingURL=OscdFilledButton.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdFilledButton.spec.js","sourceRoot":"","sources":["OscdFilledButton.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,mCAAmC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,mBA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AC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// import 'jasmine'; (google3-only)\n\nimport { html } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\n\nimport { Environment } from \"../testing/environment.js\";\n\nimport { ButtonHarness } from \"@material/web/button/harness.js\";\nimport { OscdFilledButton as Button } from \"./OscdFilledButton.js\";\n\n@customElement(\"test-button\")\nclass TestButton extends Button {}\n\ndescribe(\"Button\", () => {\n const env = new Environment();\n\n async function setupTest() {\n const button = new TestButton();\n env.render(html`${button}`);\n await env.waitForStability();\n return { button, harness: new ButtonHarness(button) };\n }\n\n it(\"should not be focusable when disabled\", async () => {\n // Arrange\n const { button } = await setupTest();\n button.disabled = true;\n await env.waitForStability();\n\n // Act\n button.focus();\n\n // Assert\n expect(document.activeElement)\n .withContext(\"disabled button should not be focused\")\n .not.toBe(button);\n });\n\n it(\"should be focusable when soft-disabled\", async () => {\n // Arrange\n const { button } = await setupTest();\n button.softDisabled = true;\n await env.waitForStability();\n\n // Act\n button.focus();\n\n // Assert\n expect(document.activeElement)\n .withContext(\"soft-disabled button should be focused\")\n .toBe(button);\n });\n\n it(\"should not be clickable when disabled\", async () => {\n // Arrange\n const clickListener = jasmine.createSpy(\"clickListener\");\n const { button } = await setupTest();\n button.disabled = true;\n button.addEventListener(\"click\", clickListener);\n await env.waitForStability();\n\n // Act\n button.click();\n\n // Assert\n expect(clickListener).not.toHaveBeenCalled();\n });\n\n it(\"should not be clickable when soft-disabled\", async () => {\n // Arrange\n const clickListener = jasmine.createSpy(\"clickListener\");\n const { button } = await setupTest();\n button.softDisabled = true;\n button.addEventListener(\"click\", clickListener);\n await env.waitForStability();\n\n // Act\n button.click();\n\n // Assert\n expect(clickListener).not.toHaveBeenCalled();\n });\n});\n"]}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { CSSResultOrNative } from 'lit';
12
+ import { OutlinedButton } from '@material/web/button/internal/outlined-button.js';
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'md-outlined-button': OscdOutlinedButton;
16
+ }
17
+ }
18
+ /**
19
+ * @summary Buttons help people take action, such as sending an email, sharing a
20
+ * document, or liking a comment.
21
+ *
22
+ * @description
23
+ * __Emphasis:__ Medium emphasis – For important actions that don’t distract
24
+ * from other onscreen elements.
25
+ *
26
+ * __Rationale:__ Use an outlined button for actions that need attention but
27
+ * aren’t the primary action, such as “See all” or “Add to cart.” This is also
28
+ * the button to use for giving someone the opportunity to change their mind or
29
+ * escape a flow.
30
+ *
31
+ * __Example usages:__
32
+ * - Reply
33
+ * - View all
34
+ * - Add to cart
35
+ * - Take out of trash
36
+ *
37
+ * @final
38
+ * @suppress {visibility}
39
+ */
40
+ export declare class OscdOutlinedButton extends OutlinedButton {
41
+ static styles: CSSResultOrNative[];
42
+ }