@omicronenergy/oscd-ui 0.0.4 → 0.0.6

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 (233) hide show
  1. package/README.md +100 -0
  2. package/app-bar/OscdAppBar.d.ts +13 -11
  3. package/app-bar/OscdAppBar.js +16 -8
  4. package/app-bar/OscdAppBar.js.map +1 -1
  5. package/app-bar/oscd-app-bar.d.ts +6 -6
  6. package/app-bar/oscd-app-bar.js +2 -7
  7. package/app-bar/oscd-app-bar.js.map +1 -1
  8. package/button/OscdFilledButton.d.ts +6 -8
  9. package/button/OscdFilledButton.js +8 -5
  10. package/button/OscdFilledButton.js.map +1 -1
  11. package/button/OscdFilledButton.spec.js +22 -18
  12. package/button/OscdFilledButton.spec.js.map +1 -1
  13. package/button/OscdOutlinedButton.d.ts +4 -6
  14. package/button/OscdOutlinedButton.js +4 -1
  15. package/button/OscdOutlinedButton.js.map +1 -1
  16. package/button/OscdTextButton.d.ts +6 -8
  17. package/button/OscdTextButton.js +7 -4
  18. package/button/OscdTextButton.js.map +1 -1
  19. package/button/oscd-filled-button.d.ts +6 -1
  20. package/button/oscd-filled-button.js +2 -2
  21. package/button/oscd-filled-button.js.map +1 -1
  22. package/button/oscd-outlined-button.d.ts +6 -1
  23. package/button/oscd-outlined-button.js +2 -2
  24. package/button/oscd-outlined-button.js.map +1 -1
  25. package/button/oscd-text-button.d.ts +6 -1
  26. package/button/oscd-text-button.js +2 -2
  27. package/button/oscd-text-button.js.map +1 -1
  28. package/dialog/OscdDialog.d.ts +3 -8
  29. package/dialog/OscdDialog.js +4 -4
  30. package/dialog/OscdDialog.js.map +1 -1
  31. package/dialog/oscd-dialog.d.ts +6 -1
  32. package/dialog/oscd-dialog.js +2 -2
  33. package/dialog/oscd-dialog.js.map +1 -1
  34. package/divider/OscdDivider.d.ts +4 -8
  35. package/divider/OscdDivider.js +4 -3
  36. package/divider/OscdDivider.js.map +1 -1
  37. package/divider/oscd-divider.d.ts +6 -1
  38. package/divider/oscd-divider.js +2 -2
  39. package/divider/oscd-divider.js.map +1 -1
  40. package/elevation/OscdElevation.d.ts +2 -6
  41. package/elevation/OscdElevation.js +2 -1
  42. package/elevation/OscdElevation.js.map +1 -1
  43. package/elevation/oscd-elevation.d.ts +6 -1
  44. package/elevation/oscd-elevation.js +2 -2
  45. package/elevation/oscd-elevation.js.map +1 -1
  46. package/field/OscdFilledField.d.ts +4 -7
  47. package/field/OscdFilledField.js +5 -3
  48. package/field/OscdFilledField.js.map +1 -1
  49. package/field/OscdOutlinedField.d.ts +6 -7
  50. package/field/OscdOutlinedField.js +7 -3
  51. package/field/OscdOutlinedField.js.map +1 -1
  52. package/field/oscd-filled-field.d.ts +6 -1
  53. package/field/oscd-filled-field.js +2 -2
  54. package/field/oscd-filled-field.js.map +1 -1
  55. package/field/oscd-outlined-field.d.ts +6 -1
  56. package/field/oscd-outlined-field.js +2 -2
  57. package/field/oscd-outlined-field.js.map +1 -1
  58. package/icon/OscdIcon.d.ts +6 -7
  59. package/icon/OscdIcon.js +6 -2
  60. package/icon/OscdIcon.js.map +1 -1
  61. package/icon/oscd-icon.d.ts +6 -1
  62. package/icon/oscd-icon.js +2 -2
  63. package/icon/oscd-icon.js.map +1 -1
  64. package/iconbutton/OscdFilledIconButton.d.ts +4 -9
  65. package/iconbutton/OscdFilledIconButton.js +5 -5
  66. package/iconbutton/OscdFilledIconButton.js.map +1 -1
  67. package/iconbutton/OscdFilledTonalIconButton.d.ts +5 -10
  68. package/iconbutton/OscdFilledTonalIconButton.js +6 -6
  69. package/iconbutton/OscdFilledTonalIconButton.js.map +1 -1
  70. package/iconbutton/OscdIconButton.d.ts +3 -8
  71. package/iconbutton/OscdIconButton.js +4 -4
  72. package/iconbutton/OscdIconButton.js.map +1 -1
  73. package/iconbutton/{OutlinedIconButton.d.ts → OscdOutlinedIconButton.d.ts} +3 -8
  74. package/iconbutton/{OutlinedIconButton.js → OscdOutlinedIconButton.js} +5 -5
  75. package/iconbutton/OscdOutlinedIconButton.js.map +1 -0
  76. package/iconbutton/oscd-filled-icon-button.d.ts +6 -1
  77. package/iconbutton/oscd-filled-icon-button.js +2 -2
  78. package/iconbutton/oscd-filled-icon-button.js.map +1 -1
  79. package/iconbutton/oscd-filled-tonal-icon-button.d.ts +6 -1
  80. package/iconbutton/oscd-filled-tonal-icon-button.js +2 -2
  81. package/iconbutton/oscd-filled-tonal-icon-button.js.map +1 -1
  82. package/iconbutton/oscd-icon-button.d.ts +6 -1
  83. package/iconbutton/oscd-icon-button.js +2 -2
  84. package/iconbutton/oscd-icon-button.js.map +1 -1
  85. package/iconbutton/oscd-outlined-icon-button.d.ts +6 -1
  86. package/iconbutton/oscd-outlined-icon-button.js +2 -2
  87. package/iconbutton/oscd-outlined-icon-button.js.map +1 -1
  88. package/list/OscdList.d.ts +3 -8
  89. package/list/OscdList.js +4 -4
  90. package/list/OscdList.js.map +1 -1
  91. package/list/OscdListItem.d.ts +4 -11
  92. package/list/OscdListItem.js +6 -8
  93. package/list/OscdListItem.js.map +1 -1
  94. package/list/oscd-list-item.d.ts +6 -1
  95. package/list/oscd-list-item.js +2 -2
  96. package/list/oscd-list-item.js.map +1 -1
  97. package/list/oscd-list.d.ts +6 -1
  98. package/list/oscd-list.js +2 -2
  99. package/list/oscd-list.js.map +1 -1
  100. package/menu/OscdMenu.d.ts +7 -12
  101. package/menu/OscdMenu.js +5 -5
  102. package/menu/OscdMenu.js.map +1 -1
  103. package/menu/OscdMenuItem.d.ts +5 -10
  104. package/menu/OscdMenuItem.js +3 -3
  105. package/menu/OscdMenuItem.js.map +1 -1
  106. package/menu/oscd-menu-item.d.ts +6 -1
  107. package/menu/oscd-menu-item.js +2 -2
  108. package/menu/oscd-menu-item.js.map +1 -1
  109. package/menu/oscd-menu.d.ts +7 -1
  110. package/menu/oscd-menu.js +3 -3
  111. package/menu/oscd-menu.js.map +1 -1
  112. package/navigation-drawer/OscdNavigationDrawer.d.ts +8 -2
  113. package/navigation-drawer/OscdNavigationDrawer.js +10 -4
  114. package/navigation-drawer/OscdNavigationDrawer.js.map +1 -1
  115. package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +7 -7
  116. package/navigation-drawer/OscdNavigationDrawerHeader.js +8 -3
  117. package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -1
  118. package/navigation-drawer/oscd-navigation-drawer-header.d.ts +6 -1
  119. package/navigation-drawer/oscd-navigation-drawer-header.js +2 -2
  120. package/navigation-drawer/oscd-navigation-drawer-header.js.map +1 -1
  121. package/navigation-drawer/oscd-navigation-drawer.d.ts +2 -2
  122. package/navigation-drawer/oscd-navigation-drawer.js +2 -2
  123. package/navigation-drawer/oscd-navigation-drawer.js.map +1 -1
  124. package/package.json +169 -15
  125. package/select/OscdFilledSelect.d.ts +3 -8
  126. package/select/OscdFilledSelect.js +4 -4
  127. package/select/OscdFilledSelect.js.map +1 -1
  128. package/select/OscdOutlinedSelect.d.ts +3 -8
  129. package/select/OscdOutlinedSelect.js +4 -4
  130. package/select/OscdOutlinedSelect.js.map +1 -1
  131. package/select/OscdSelectOption.d.ts +4 -9
  132. package/select/OscdSelectOption.js +3 -3
  133. package/select/OscdSelectOption.js.map +1 -1
  134. package/select/oscd-filled-select.d.ts +6 -1
  135. package/select/oscd-filled-select.js +2 -2
  136. package/select/oscd-filled-select.js.map +1 -1
  137. package/select/oscd-outlined-select.d.ts +6 -1
  138. package/select/oscd-outlined-select.js +2 -2
  139. package/select/oscd-outlined-select.js.map +1 -1
  140. package/select/oscd-select-option.d.ts +6 -1
  141. package/select/oscd-select-option.js +2 -2
  142. package/select/oscd-select-option.js.map +1 -1
  143. package/tabs/OscdPrimaryTab.d.ts +3 -7
  144. package/tabs/OscdPrimaryTab.js +4 -3
  145. package/tabs/OscdPrimaryTab.js.map +1 -1
  146. package/tabs/OscdSecondaryTab.d.ts +3 -7
  147. package/tabs/OscdSecondaryTab.js +4 -3
  148. package/tabs/OscdSecondaryTab.js.map +1 -1
  149. package/tabs/OscdTabs.d.ts +3 -7
  150. package/tabs/OscdTabs.js +3 -2
  151. package/tabs/OscdTabs.js.map +1 -1
  152. package/tabs/oscd-primary-tab.d.ts +6 -1
  153. package/tabs/oscd-primary-tab.js +2 -2
  154. package/tabs/oscd-primary-tab.js.map +1 -1
  155. package/tabs/oscd-secondary-tab.d.ts +6 -1
  156. package/tabs/oscd-secondary-tab.js +2 -2
  157. package/tabs/oscd-secondary-tab.js.map +1 -1
  158. package/tabs/oscd-tabs.d.ts +6 -1
  159. package/tabs/oscd-tabs.js +2 -2
  160. package/tabs/oscd-tabs.js.map +1 -1
  161. package/textfield/OscdFilledTextField.d.ts +10 -11
  162. package/textfield/OscdFilledTextField.js +12 -12
  163. package/textfield/OscdFilledTextField.js.map +1 -1
  164. package/textfield/OscdOutlinedTextField.d.ts +11 -10
  165. package/textfield/OscdOutlinedTextField.js +15 -11
  166. package/textfield/OscdOutlinedTextField.js.map +1 -1
  167. package/textfield/oscd-filled-text-field.d.ts +6 -1
  168. package/textfield/oscd-filled-text-field.js +2 -2
  169. package/textfield/oscd-filled-text-field.js.map +1 -1
  170. package/textfield/oscd-outlined-text-field.d.ts +6 -1
  171. package/textfield/oscd-outlined-text-field.js +2 -2
  172. package/textfield/oscd-outlined-text-field.js.map +1 -1
  173. package/utils/storybook/getStorybookHelpers.d.ts +2 -2
  174. package/utils/storybook/getStorybookHelpers.js +9 -9
  175. package/utils/storybook/getStorybookHelpers.js.map +1 -1
  176. package/utils/storybook/scopedWcDecorator.d.ts +1 -1
  177. package/utils/storybook/scopedWcDecorator.js +17 -7
  178. package/utils/storybook/scopedWcDecorator.js.map +1 -1
  179. package/utils/storybook/themingDecorator.d.ts +4 -15
  180. package/utils/storybook/themingDecorator.js +62 -62
  181. package/utils/storybook/themingDecorator.js.map +1 -1
  182. package/app-bar/OscdAppBar.stories.d.ts +0 -10
  183. package/app-bar/OscdAppBar.stories.js +0 -85
  184. package/app-bar/OscdAppBar.stories.js.map +0 -1
  185. package/button/OscdButton.stories.d.ts +0 -7
  186. package/button/OscdButton.stories.js +0 -60
  187. package/button/OscdButton.stories.js.map +0 -1
  188. package/dialog/OscdDialog.stories.d.ts +0 -5
  189. package/dialog/OscdDialog.stories.js +0 -50
  190. package/dialog/OscdDialog.stories.js.map +0 -1
  191. package/divider/OscdDivider.stories.d.ts +0 -5
  192. package/divider/OscdDivider.stories.js +0 -28
  193. package/divider/OscdDivider.stories.js.map +0 -1
  194. package/icon/OscdIcon.stories.d.ts +0 -5
  195. package/icon/OscdIcon.stories.js +0 -54
  196. package/icon/OscdIcon.stories.js.map +0 -1
  197. package/iconbutton/OscdIconButton.stories.d.ts +0 -7
  198. package/iconbutton/OscdIconButton.stories.js +0 -101
  199. package/iconbutton/OscdIconButton.stories.js.map +0 -1
  200. package/iconbutton/OutlinedIconButton.js.map +0 -1
  201. package/list/OscdList.stories.d.ts +0 -5
  202. package/list/OscdList.stories.js +0 -30
  203. package/list/OscdList.stories.js.map +0 -1
  204. package/menu/OscdMenu.stories.d.ts +0 -6
  205. package/menu/OscdMenu.stories.js +0 -55
  206. package/menu/OscdMenu.stories.js.map +0 -1
  207. package/menu/OscdMenuItem.stories.d.ts +0 -5
  208. package/menu/OscdMenuItem.stories.js +0 -37
  209. package/menu/OscdMenuItem.stories.js.map +0 -1
  210. package/navigation-drawer/OscdNavigationDrawer.stories.d.ts +0 -5
  211. package/navigation-drawer/OscdNavigationDrawer.stories.js +0 -97
  212. package/navigation-drawer/OscdNavigationDrawer.stories.js.map +0 -1
  213. package/navigation-drawer/OscdNavigationDrawerHeader.stories.d.ts +0 -5
  214. package/navigation-drawer/OscdNavigationDrawerHeader.stories.js +0 -35
  215. package/navigation-drawer/OscdNavigationDrawerHeader.stories.js.map +0 -1
  216. package/select/OscdFilledSelect.stories.d.ts +0 -5
  217. package/select/OscdFilledSelect.stories.js +0 -29
  218. package/select/OscdFilledSelect.stories.js.map +0 -1
  219. package/select/OscdOutlinedSelect.stories.d.ts +0 -5
  220. package/select/OscdOutlinedSelect.stories.js +0 -29
  221. package/select/OscdOutlinedSelect.stories.js.map +0 -1
  222. package/tabs/OscdPrimaryTab.stories.d.ts +0 -5
  223. package/tabs/OscdPrimaryTab.stories.js +0 -33
  224. package/tabs/OscdPrimaryTab.stories.js.map +0 -1
  225. package/tabs/OscdSecondaryTab.stories.d.ts +0 -5
  226. package/tabs/OscdSecondaryTab.stories.js +0 -33
  227. package/tabs/OscdSecondaryTab.stories.js.map +0 -1
  228. package/tabs/OscdTabs.stories.d.ts +0 -5
  229. package/tabs/OscdTabs.stories.js +0 -29
  230. package/tabs/OscdTabs.stories.js.map +0 -1
  231. package/theming/AllComponents.stories.d.ts +0 -5
  232. package/theming/AllComponents.stories.js +0 -309
  233. package/theming/AllComponents.stories.js.map +0 -1
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ [![Tests](https://github.com/OMICRONEnergyOSS/oscd-ui/actions/workflows/test.yml/badge.svg)](https://github.com/OMICRONEnergyOSS/oscd-ui/actions/workflows/test.yml) ![NPM Version](https://img.shields.io/npm/v/@omicronenergy/oscd-ui)
2
+
3
+ # <img src="https://omicronenergyoss.github.io/oscd-ui/assets/oscd_logo.png" alt="Open SCD Logo" width="40" height="40" /> Open SCD UI Component Library
4
+
5
+ This library is intended to be used for OpenSCD Plugins. This library is intended to be used for OpenSCD Plugins. Currently this is a subset of the existing [@material/web](https://github.com/material-components/material-web) components. We plan to add more and more of the [@material/web](https://github.com/material-components/material-web) components as and when they are needed, adding our own as the need arrises.
6
+
7
+ The original [@material/web](https://github.com/material-components/material-web) documentation can be found here:
8
+ https://material-web.dev/about/intro/
9
+
10
+ The predecessor [Material Web Components (mwc)](https://github.com/material-components/material-components-web) are officially depricated and the newer [Material Design components (md)](https://github.com/material-components/material-web) are in maintenance mode. So we plan to maintain this set of components moving forward no matter what happens to the [@material/web](https://github.com/material-components/material-web) project.
11
+
12
+ For plugins which used the mwc-\* components, these used the older Material Icons (legacy) which were glyph-based and relatively simple but fixed to a style. @omicronenergy/oscd-ui components all use the newer Material Symbol font icons, which are variable fonts and far more flexible.
13
+ Use the following link in your html to make use Material icons with these components:
14
+
15
+ ```html
16
+ <link
17
+ href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined"
18
+ rel="stylesheet"
19
+ />
20
+ ```
21
+
22
+ The full set of available Material Symbol icons can be found here:
23
+ https://fonts.google.com/icons
24
+
25
+ ## Scoped Web Components
26
+
27
+ All OSCD UI components are scoped web components, which means its possible to use plugins can use multiple different versions of @omicronenergy/oscd-ui without risk of conflict. More details on how to use these components in a scoped manor are below. General details on scoping web components can be found [here](https://open-wc.org/docs/development/scoped-elements/)
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ npm install --save @omicronenergy/oscd-ui
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ All components can be either be scoped or non-scoped (globally defined)
38
+
39
+ ### Using the components globally (non-scoped)
40
+
41
+ To use the globally scoped version of the component, import the lower (kebab) case file.
42
+ e.g. If you want to use `<oscd-app-bar />` import `oscd-app-bar.js` and that is enough to have it registered.
43
+
44
+ ```typescript
45
+ import { LitElement, html } from "lit";
46
+ import "@omicronenergy/oscd-ui/oscd-app-bar.js";
47
+
48
+ export class NotScopedExample extends LitElement {
49
+ render() {
50
+ return html`
51
+ <oscd-app-bar>
52
+ <span slot="title">Open SCD Example App Bar</span>
53
+ </oscd-app-bar>
54
+ `;
55
+ }
56
+ }
57
+ ```
58
+
59
+ ### Using the components scoped
60
+
61
+ To use the Scoped version of the components, your component must extend @open-wc's `ScopedElementMixin` and define the `scopedElements` like so:
62
+
63
+ you _must not_ import the kebab case version of the file. Instead import the Camel case version
64
+
65
+ ```typescript
66
+ import { LitElement, html } from "lit";
67
+ import { ScopedElementsMixin } from "@open-wc/scoped-elements";
68
+ import { OscdAppBar } from "@omicronenergy/oscd-ui/app-bar/OscdAppBar.js";
69
+ import { OscdIcon } from "@omicronenergy/oscd-ui/icon/OscdIcon.js";
70
+ import { OscdFilledIconButton } from "@omicronenergy/oscd-ui/button/OscdFilledIconButton.js";
71
+
72
+ export class ScopedExample extends ScopedElementsMixin(LitElement) {
73
+ static get scopedElements() {
74
+ return {
75
+ "oscd-app-bar": OscdAppBar,
76
+ "oscd-icon": OscdIcon,
77
+ "oscd-filled-icon-button": OscdFilledIconButton,
78
+ };
79
+ }
80
+
81
+ render() {
82
+ return html`
83
+ <oscd-app-bar>
84
+ <oscd-filled-icon-button slot="actionStart">
85
+ <oscd-icon>menu</oscd-icon>
86
+ </oscd-filled-icon-button>
87
+ <span slot="title"> Open SCD Example App Bar (Scoped) </span>
88
+ </oscd-app-bar>
89
+ `;
90
+ }
91
+ }
92
+ ```
93
+
94
+ _Note:_ You must not import the kebab-case version of the file. If you do, it will be registered globally, defeating the purpose of scoping. Notice the example above imports `OscdAppBar.js` and _NOT_ `oscd-app-bar.js`
95
+
96
+ # Component Library
97
+
98
+ The full set of components currently supported in oscd-ui can be found here:
99
+
100
+ [Browse the full Catalog](https://omicronenergyoss.github.io/oscd-ui/?path=/docs/open-scd-overview--docs)
@@ -8,25 +8,23 @@
8
8
  * Copyright 2025 OMICRON Electronics GmbH
9
9
  * SPDX-License-Identifier: Apache-2.0
10
10
  */
11
- import { LitElement } from "lit";
12
- declare global {
13
- interface HTMLElementTagNameMap {
14
- "oscd-app-bar": OscdAppBar;
15
- }
16
- }
11
+ import { LitElement } from 'lit';
12
+ import { OscdElevation } from '../elevation/OscdElevation.js';
13
+ declare const OscdAppBar_base: typeof LitElement & import("@open-wc/scoped-elements/lit-element.js").ScopedElementsHostConstructor;
17
14
  /**
18
15
  * @tag oscd-app-bar
19
16
  * @class OscdAppBar
20
- * @extends LitElement
21
- * @summary A component that represents an app bar.
22
- * @description
17
+ * @extends ScopedElementsMixin(LitElement)
18
+ * @summary A component that renders an app bar.
19
+ *
23
20
  * The app bar is a top-level navigation component that displays information and actions relating to the current screen.
24
21
  * It can contain a title, navigation icons, and action icons.
25
22
  * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
23
+ *
26
24
  * @slot actionStart - Slot for action icons at the start of the app bar.
27
25
  * @slot title - Slot for the title of the app bar.
28
26
  * @slot actionEnd - Slot for action icons at the end of the app bar.
29
- * @slot Default - Slot for additional content in the app bar.
27
+ * @slot Default - Slot for additional content which will appear immediately under the main app bar.
30
28
  *
31
29
  * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
32
30
  * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
@@ -39,7 +37,11 @@ declare global {
39
37
  * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
40
38
  *
41
39
  */
42
- export declare class OscdAppBar extends LitElement {
40
+ export declare class OscdAppBar extends OscdAppBar_base {
41
+ static get scopedElements(): {
42
+ 'oscd-elevation': typeof OscdElevation;
43
+ };
43
44
  static styles: import("lit").CSSResult;
44
45
  render(): import("lit-html").TemplateResult<1>;
45
46
  }
47
+ export {};
@@ -8,20 +8,23 @@
8
8
  * Copyright 2025 OMICRON Electronics GmbH
9
9
  * SPDX-License-Identifier: Apache-2.0
10
10
  */
11
- import { LitElement, html, css } from "lit";
11
+ import { LitElement, html, css } from 'lit';
12
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
13
+ import { OscdElevation } from '../elevation/OscdElevation.js';
12
14
  /**
13
15
  * @tag oscd-app-bar
14
16
  * @class OscdAppBar
15
- * @extends LitElement
16
- * @summary A component that represents an app bar.
17
- * @description
17
+ * @extends ScopedElementsMixin(LitElement)
18
+ * @summary A component that renders an app bar.
19
+ *
18
20
  * The app bar is a top-level navigation component that displays information and actions relating to the current screen.
19
21
  * It can contain a title, navigation icons, and action icons.
20
22
  * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
23
+ *
21
24
  * @slot actionStart - Slot for action icons at the start of the app bar.
22
25
  * @slot title - Slot for the title of the app bar.
23
26
  * @slot actionEnd - Slot for action icons at the end of the app bar.
24
- * @slot Default - Slot for additional content in the app bar.
27
+ * @slot Default - Slot for additional content which will appear immediately under the main app bar.
25
28
  *
26
29
  * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
27
30
  * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
@@ -34,7 +37,12 @@ import { LitElement, html, css } from "lit";
34
37
  * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
35
38
  *
36
39
  */
37
- export class OscdAppBar extends LitElement {
40
+ export class OscdAppBar extends ScopedElementsMixin(LitElement) {
41
+ static get scopedElements() {
42
+ return {
43
+ 'oscd-elevation': OscdElevation,
44
+ };
45
+ }
38
46
  static styles = css `
39
47
  :host {
40
48
  --md-elevation-level: var(--oscd-app-bar-elevation, 3);
@@ -100,7 +108,7 @@ export class OscdAppBar extends LitElement {
100
108
  }
101
109
  }
102
110
 
103
- ::slotted([slot="title"]) {
111
+ ::slotted([slot='title']) {
104
112
  display: flex;
105
113
  align-items: center;
106
114
  gap: 4px;
@@ -124,7 +132,6 @@ export class OscdAppBar extends LitElement {
124
132
  return html `
125
133
  <header>
126
134
  <div>
127
- <!-- <md-elevation part="elevation"></md-elevation> -->
128
135
  <div class="main-header">
129
136
  <slot name="actionStart"></slot>
130
137
  <slot name="title"></slot>
@@ -135,6 +142,7 @@ export class OscdAppBar extends LitElement {
135
142
  <slot></slot>
136
143
  </div>
137
144
  </div>
145
+ <oscd-elevation part="elevation"></oscd-elevation>
138
146
  </header>
139
147
  `;
140
148
  }
@@ -1 +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"]}
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;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,UAAW,SAAQ,mBAAmB,CAAC,UAAU,CAAC;IAC7D,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,gBAAgB,EAAE,aAAa;SAChC,CAAC;IACJ,CAAC;IAED,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';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { OscdElevation } from '../elevation/OscdElevation.js';\n\n/**\n * @tag oscd-app-bar\n * @class OscdAppBar\n * @extends ScopedElementsMixin(LitElement)\n * @summary A component that renders an app bar.\n *\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 *\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 which will appear immediately under the main 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 ScopedElementsMixin(LitElement) {\n static get scopedElements() {\n return {\n 'oscd-elevation': OscdElevation,\n };\n }\n\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 <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 <oscd-elevation part=\"elevation\"></oscd-elevation>\n </header>\n `;\n }\n}\n"]}
@@ -1,12 +1,12 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
1
  /**
7
2
  * @license
8
3
  * Copyright 2025 OMICRON Electronics GmbH
9
4
  * SPDX-License-Identifier: Apache-2.0
10
5
  */
11
- import { OscdAppBar } from "./OscdAppBar.js";
6
+ import { OscdAppBar } from './OscdAppBar.js';
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'oscd-app-bar': OscdAppBar;
10
+ }
11
+ }
12
12
  export { OscdAppBar };
@@ -1,14 +1,9 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
1
  /**
7
2
  * @license
8
3
  * Copyright 2025 OMICRON Electronics GmbH
9
4
  * SPDX-License-Identifier: Apache-2.0
10
5
  */
11
- import { OscdAppBar } from "./OscdAppBar.js";
12
- window.customElements.define("oscd-app-bar", OscdAppBar);
6
+ import { OscdAppBar } from './OscdAppBar.js';
7
+ window.customElements.define('oscd-app-bar', OscdAppBar);
13
8
  export { OscdAppBar };
14
9
  //# sourceMappingURL=oscd-app-bar.js.map
@@ -1 +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"]}
1
+ {"version":3,"file":"oscd-app-bar.js","sourceRoot":"","sources":["oscd-app-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OscdAppBar } from './OscdAppBar.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-app-bar': OscdAppBar;\n }\n}\n\nwindow.customElements.define('oscd-app-bar', OscdAppBar);\nexport { OscdAppBar };\n"]}
@@ -8,18 +8,13 @@
8
8
  * Copyright 2025 OMICRON Electronics GmbH
9
9
  * SPDX-License-Identifier: Apache-2.0
10
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
- }
11
+ import { FilledButton } from '@material/web/button/internal/filled-button.js';
12
+ import { CSSResult } from '@lit/reactive-element';
18
13
  /**
14
+ * @tag "oscd-filled-button"
19
15
  * @summary Buttons help people take action, such as sending an email, sharing a
20
16
  * document, or liking a comment.
21
17
  *
22
- * @description
23
18
  * __Emphasis:__ High emphasis – For the primary, most important, or most common
24
19
  * action on a screen
25
20
  *
@@ -32,8 +27,11 @@ declare global {
32
27
  * - Confirm
33
28
  * - Done
34
29
  *
30
+ * @event click Fired when the user clicks the button.
31
+ *
35
32
  * @final
36
33
  * @suppress {visibility}
34
+ *
37
35
  */
38
36
  export declare class OscdFilledButton extends FilledButton {
39
37
  static styles: CSSResult[];
@@ -8,15 +8,15 @@
8
8
  * Copyright 2025 OMICRON Electronics GmbH
9
9
  * SPDX-License-Identifier: Apache-2.0
10
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";
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
15
  /**
16
+ * @tag "oscd-filled-button"
16
17
  * @summary Buttons help people take action, such as sending an email, sharing a
17
18
  * document, or liking a comment.
18
19
  *
19
- * @description
20
20
  * __Emphasis:__ High emphasis – For the primary, most important, or most common
21
21
  * action on a screen
22
22
  *
@@ -29,8 +29,11 @@ import { styles as sharedStyles } from "@material/web/button/internal/shared-sty
29
29
  * - Confirm
30
30
  * - Done
31
31
  *
32
+ * @event click Fired when the user clicks the button.
33
+ *
32
34
  * @final
33
35
  * @suppress {visibility}
36
+ *
34
37
  */
35
38
  export class OscdFilledButton extends FilledButton {
36
39
  static styles = [
@@ -1 +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"]}
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;AAGxF;;;;;;;;;;;;;;;;;;;;;;GAsBG;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\n/**\n * @tag \"oscd-filled-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\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 * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdFilledButton extends FilledButton {\n static override styles: CSSResult[] = [\n sharedStyles,\n sharedElevationStyles,\n filledStyles,\n ];\n}\n"]}
@@ -4,18 +4,22 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
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";
7
+ /* This is a PoC unit test.
8
+ * Purpose was to show how we can copy 1:1 the tests from Material Web Components
9
+ * and use them for our custom elements.
10
+ * This has been left in place as an example of how its done.
11
+ */
12
+ import { html } from 'lit';
13
+ import { customElement } from 'lit/decorators.js';
14
+ import { ButtonHarness } from '@material/web/button/harness.js';
15
+ import { Environment } from '../testing/environment.js';
16
+ import { OscdFilledButton as Button } from './OscdFilledButton.js';
13
17
  let TestButton = class TestButton extends Button {
14
18
  };
15
19
  TestButton = __decorate([
16
- customElement("test-button")
20
+ customElement('test-button')
17
21
  ], TestButton);
18
- describe("Button", () => {
22
+ describe('Button', () => {
19
23
  const env = new Environment();
20
24
  async function setupTest() {
21
25
  const button = new TestButton();
@@ -23,7 +27,7 @@ describe("Button", () => {
23
27
  await env.waitForStability();
24
28
  return { button, harness: new ButtonHarness(button) };
25
29
  }
26
- it("should not be focusable when disabled", async () => {
30
+ it('should not be focusable when disabled', async () => {
27
31
  // Arrange
28
32
  const { button } = await setupTest();
29
33
  button.disabled = true;
@@ -32,10 +36,10 @@ describe("Button", () => {
32
36
  button.focus();
33
37
  // Assert
34
38
  expect(document.activeElement)
35
- .withContext("disabled button should not be focused")
39
+ .withContext('disabled button should not be focused')
36
40
  .not.toBe(button);
37
41
  });
38
- it("should be focusable when soft-disabled", async () => {
42
+ it('should be focusable when soft-disabled', async () => {
39
43
  // Arrange
40
44
  const { button } = await setupTest();
41
45
  button.softDisabled = true;
@@ -44,27 +48,27 @@ describe("Button", () => {
44
48
  button.focus();
45
49
  // Assert
46
50
  expect(document.activeElement)
47
- .withContext("soft-disabled button should be focused")
51
+ .withContext('soft-disabled button should be focused')
48
52
  .toBe(button);
49
53
  });
50
- it("should not be clickable when disabled", async () => {
54
+ it('should not be clickable when disabled', async () => {
51
55
  // Arrange
52
- const clickListener = jasmine.createSpy("clickListener");
56
+ const clickListener = jasmine.createSpy('clickListener');
53
57
  const { button } = await setupTest();
54
58
  button.disabled = true;
55
- button.addEventListener("click", clickListener);
59
+ button.addEventListener('click', clickListener);
56
60
  await env.waitForStability();
57
61
  // Act
58
62
  button.click();
59
63
  // Assert
60
64
  expect(clickListener).not.toHaveBeenCalled();
61
65
  });
62
- it("should not be clickable when soft-disabled", async () => {
66
+ it('should not be clickable when soft-disabled', async () => {
63
67
  // Arrange
64
- const clickListener = jasmine.createSpy("clickListener");
68
+ const clickListener = jasmine.createSpy('clickListener');
65
69
  const { button } = await setupTest();
66
70
  button.softDisabled = true;
67
- button.addEventListener("click", clickListener);
71
+ button.addEventListener('click', clickListener);
68
72
  await env.waitForStability();
69
73
  // Act
70
74
  button.click();
@@ -1 +1 @@
1
- {"version":3,"file":"OscdFilledButton.spec.js","sourceRoot":"","sources":["OscdFilledButton.spec.ts"],"names":[],"mappings":"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","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"]}
1
+ {"version":3,"file":"OscdFilledButton.spec.js","sourceRoot":"","sources":["OscdFilledButton.spec.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* This is a PoC unit test.\n * Purpose was to show how we can copy 1:1 the tests from Material Web Components\n * and use them for our custom elements.\n * This has been left in place as an example of how its done.\n */\n\nimport { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { ButtonHarness } from '@material/web/button/harness.js';\nimport { Environment } from '../testing/environment.js';\n\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"]}
@@ -10,16 +10,11 @@
10
10
  */
11
11
  import { CSSResultOrNative } from 'lit';
12
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
13
  /**
14
+ * @tag "oscd-outlined-button"
19
15
  * @summary Buttons help people take action, such as sending an email, sharing a
20
16
  * document, or liking a comment.
21
17
  *
22
- * @description
23
18
  * __Emphasis:__ Medium emphasis – For important actions that don’t distract
24
19
  * from other onscreen elements.
25
20
  *
@@ -34,8 +29,11 @@ declare global {
34
29
  * - Add to cart
35
30
  * - Take out of trash
36
31
  *
32
+ * @event click Fired when the user clicks the button.
33
+ *
37
34
  * @final
38
35
  * @suppress {visibility}
36
+ *
39
37
  */
40
38
  export declare class OscdOutlinedButton extends OutlinedButton {
41
39
  static styles: CSSResultOrNative[];
@@ -7,10 +7,10 @@ import { OutlinedButton } from '@material/web/button/internal/outlined-button.js
7
7
  import { styles as outlinedStyles } from '@material/web/button/internal/outlined-styles.js';
8
8
  import { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';
9
9
  /**
10
+ * @tag "oscd-outlined-button"
10
11
  * @summary Buttons help people take action, such as sending an email, sharing a
11
12
  * document, or liking a comment.
12
13
  *
13
- * @description
14
14
  * __Emphasis:__ Medium emphasis – For important actions that don’t distract
15
15
  * from other onscreen elements.
16
16
  *
@@ -25,8 +25,11 @@ import { styles as sharedStyles } from '@material/web/button/internal/shared-sty
25
25
  * - Add to cart
26
26
  * - Take out of trash
27
27
  *
28
+ * @event click Fired when the user clicks the button.
29
+ *
28
30
  * @final
29
31
  * @suppress {visibility}
32
+ *
30
33
  */
31
34
  export class OscdOutlinedButton extends OutlinedButton {
32
35
  static styles = [sharedStyles, outlinedStyles];
@@ -1 +1 @@
1
- {"version":3,"file":"OscdOutlinedButton.js","sourceRoot":"","sources":["OscdOutlinedButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,cAAc,EAAC,MAAM,kDAAkD,CAAC;AAChF,OAAO,EAAC,MAAM,IAAI,cAAc,EAAC,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,gDAAgD,CAAC;AAQtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,cAAc,CAAC,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 {CSSResultOrNative} from 'lit';\n\nimport {OutlinedButton} from '@material/web/button/internal/outlined-button.js';\nimport {styles as outlinedStyles} from '@material/web/button/internal/outlined-styles.js';\nimport {styles as sharedStyles} from '@material/web/button/internal/shared-styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-outlined-button': OscdOutlinedButton;\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:__ Medium emphasis – For important actions that don’t distract\n * from other onscreen elements.\n *\n * __Rationale:__ Use an outlined button for actions that need attention but\n * aren’t the primary action, such as “See all” or “Add to cart.” This is also\n * the button to use for giving someone the opportunity to change their mind or\n * escape a flow.\n *\n * __Example usages:__\n * - Reply\n * - View all\n * - Add to cart\n * - Take out of trash\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdOutlinedButton extends OutlinedButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];\n}\n"]}
1
+ {"version":3,"file":"OscdOutlinedButton.js","sourceRoot":"","sources":["OscdOutlinedButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,cAAc,CAAC,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 { CSSResultOrNative } from 'lit';\n\nimport { OutlinedButton } from '@material/web/button/internal/outlined-button.js';\nimport { styles as outlinedStyles } from '@material/web/button/internal/outlined-styles.js';\nimport { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';\n\n/**\n * @tag \"oscd-outlined-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * __Emphasis:__ Medium emphasis – For important actions that don’t distract\n * from other onscreen elements.\n *\n * __Rationale:__ Use an outlined button for actions that need attention but\n * aren’t the primary action, such as “See all” or “Add to cart.” This is also\n * the button to use for giving someone the opportunity to change their mind or\n * escape a flow.\n *\n * __Example usages:__\n * - Reply\n * - View all\n * - Add to cart\n * - Take out of trash\n *\n * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdOutlinedButton extends OutlinedButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];\n}\n"]}
@@ -8,18 +8,13 @@
8
8
  * Copyright 2025 OMICRON Electronics GmbH
9
9
  * SPDX-License-Identifier: Apache-2.0
10
10
  */
11
- import { CSSResultOrNative } from "lit";
12
- import { TextButton } from "@material/web/button/internal/text-button.js";
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- "oscd-text-button": OscdTextButton;
16
- }
17
- }
11
+ import { CSSResultOrNative } from 'lit';
12
+ import { TextButton } from '@material/web/button/internal/text-button.js';
18
13
  /**
14
+ * @tag "oscd-text-button"
19
15
  * @summary Buttons help people take action, such as sending an email, sharing a
20
16
  * document, or liking a comment.
21
17
  *
22
- * @description
23
18
  * __Emphasis:__ Low emphasis – For optional or supplementary actions with the
24
19
  * least amount of prominence
25
20
  *
@@ -32,8 +27,11 @@ declare global {
32
27
  * - Change account
33
28
  * - Turn on
34
29
  *
30
+ * @event click Fired when the user clicks the button.
31
+ *
35
32
  * @final
36
33
  * @suppress {visibility}
34
+ *
37
35
  */
38
36
  export declare class OscdTextButton extends TextButton {
39
37
  static styles: CSSResultOrNative[];
@@ -3,14 +3,14 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { styles as sharedStyles } from "@material/web/button/internal/shared-styles.js";
7
- import { TextButton } from "@material/web/button/internal/text-button.js";
8
- import { styles as textStyles } from "@material/web/button/internal/text-styles.js";
6
+ import { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';
7
+ import { TextButton } from '@material/web/button/internal/text-button.js';
8
+ import { styles as textStyles } from '@material/web/button/internal/text-styles.js';
9
9
  /**
10
+ * @tag "oscd-text-button"
10
11
  * @summary Buttons help people take action, such as sending an email, sharing a
11
12
  * document, or liking a comment.
12
13
  *
13
- * @description
14
14
  * __Emphasis:__ Low emphasis – For optional or supplementary actions with the
15
15
  * least amount of prominence
16
16
  *
@@ -23,8 +23,11 @@ import { styles as textStyles } from "@material/web/button/internal/text-styles.
23
23
  * - Change account
24
24
  * - Turn on
25
25
  *
26
+ * @event click Fired when the user clicks the button.
27
+ *
26
28
  * @final
27
29
  * @suppress {visibility}
30
+ *
28
31
  */
29
32
  export class OscdTextButton extends TextButton {
30
33
  static styles = [sharedStyles, textStyles];
@@ -1 +1 @@
1
- {"version":3,"file":"OscdTextButton.js","sourceRoot":"","sources":["OscdTextButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAQpF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,UAAU,CAAC,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 { CSSResultOrNative } from \"lit\";\nimport { styles as sharedStyles } from \"@material/web/button/internal/shared-styles.js\";\nimport { TextButton } from \"@material/web/button/internal/text-button.js\";\nimport { styles as textStyles } from \"@material/web/button/internal/text-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-text-button\": OscdTextButton;\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:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence\n *\n * __Rationale:__ Text buttons have less visual prominence, so should be used\n * for low emphasis actions, such as an alternative option.\n *\n * __Example usages:__\n * - Learn more\n * - View all\n * - Change account\n * - Turn on\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdTextButton extends TextButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, textStyles];\n}\n"]}
1
+ {"version":3,"file":"OscdTextButton.js","sourceRoot":"","sources":["OscdTextButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,UAAU,CAAC,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 { CSSResultOrNative } from 'lit';\nimport { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';\nimport { TextButton } from '@material/web/button/internal/text-button.js';\nimport { styles as textStyles } from '@material/web/button/internal/text-styles.js';\n\n/**\n * @tag \"oscd-text-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence\n *\n * __Rationale:__ Text buttons have less visual prominence, so should be used\n * for low emphasis actions, such as an alternative option.\n *\n * __Example usages:__\n * - Learn more\n * - View all\n * - Change account\n * - Turn on\n *\n * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdTextButton extends TextButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, textStyles];\n}\n"]}