@omicronenergy/oscd-ui 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -0
- package/package.json +163 -15
- package/app-bar/OscdAppBar.d.ts +0 -45
- package/app-bar/OscdAppBar.js +0 -142
- package/app-bar/OscdAppBar.js.map +0 -1
- package/app-bar/OscdAppBar.stories.d.ts +0 -10
- package/app-bar/OscdAppBar.stories.js +0 -85
- package/app-bar/OscdAppBar.stories.js.map +0 -1
- package/app-bar/oscd-app-bar.d.ts +0 -12
- package/app-bar/oscd-app-bar.js +0 -14
- package/app-bar/oscd-app-bar.js.map +0 -1
- package/button/OscdButton.stories.d.ts +0 -7
- package/button/OscdButton.stories.js +0 -60
- package/button/OscdButton.stories.js.map +0 -1
- package/button/OscdFilledButton.d.ts +0 -40
- package/button/OscdFilledButton.js +0 -42
- package/button/OscdFilledButton.js.map +0 -1
- package/button/OscdFilledButton.spec.d.ts +0 -6
- package/button/OscdFilledButton.spec.js +0 -75
- package/button/OscdFilledButton.spec.js.map +0 -1
- package/button/OscdOutlinedButton.d.ts +0 -42
- package/button/OscdOutlinedButton.js +0 -34
- package/button/OscdOutlinedButton.js.map +0 -1
- package/button/OscdTextButton.d.ts +0 -40
- package/button/OscdTextButton.js +0 -32
- package/button/OscdTextButton.js.map +0 -1
- package/button/oscd-filled-button.d.ts +0 -2
- package/button/oscd-filled-button.js +0 -4
- package/button/oscd-filled-button.js.map +0 -1
- package/button/oscd-outlined-button.d.ts +0 -7
- package/button/oscd-outlined-button.js +0 -9
- package/button/oscd-outlined-button.js.map +0 -1
- package/button/oscd-text-button.d.ts +0 -7
- package/button/oscd-text-button.js +0 -9
- package/button/oscd-text-button.js.map +0 -1
- package/dialog/OscdDialog.d.ts +0 -47
- package/dialog/OscdDialog.js +0 -38
- package/dialog/OscdDialog.js.map +0 -1
- package/dialog/OscdDialog.stories.d.ts +0 -5
- package/dialog/OscdDialog.stories.js +0 -50
- package/dialog/OscdDialog.stories.js.map +0 -1
- package/dialog/oscd-dialog.d.ts +0 -2
- package/dialog/oscd-dialog.js +0 -4
- package/dialog/oscd-dialog.js.map +0 -1
- package/divider/OscdDivider.d.ts +0 -30
- package/divider/OscdDivider.js +0 -21
- package/divider/OscdDivider.js.map +0 -1
- package/divider/OscdDivider.stories.d.ts +0 -5
- package/divider/OscdDivider.stories.js +0 -28
- package/divider/OscdDivider.stories.js.map +0 -1
- package/divider/oscd-divider.d.ts +0 -2
- package/divider/oscd-divider.js +0 -4
- package/divider/oscd-divider.js.map +0 -1
- package/elevation/OscdElevation.d.ts +0 -28
- package/elevation/OscdElevation.js +0 -19
- package/elevation/OscdElevation.js.map +0 -1
- package/elevation/oscd-elevation.d.ts +0 -7
- package/elevation/oscd-elevation.js +0 -9
- package/elevation/oscd-elevation.js.map +0 -1
- package/field/OscdFilledField.d.ts +0 -24
- package/field/OscdFilledField.js +0 -16
- package/field/OscdFilledField.js.map +0 -1
- package/field/OscdOutlinedField.d.ts +0 -24
- package/field/OscdOutlinedField.js +0 -16
- package/field/OscdOutlinedField.js.map +0 -1
- package/field/oscd-filled-field.d.ts +0 -2
- package/field/oscd-filled-field.js +0 -4
- package/field/oscd-filled-field.js.map +0 -1
- package/field/oscd-outlined-field.d.ts +0 -2
- package/field/oscd-outlined-field.js +0 -4
- package/field/oscd-outlined-field.js.map +0 -1
- package/icon/OscdIcon.d.ts +0 -25
- package/icon/OscdIcon.js +0 -16
- package/icon/OscdIcon.js.map +0 -1
- package/icon/OscdIcon.stories.d.ts +0 -5
- package/icon/OscdIcon.stories.js +0 -54
- package/icon/OscdIcon.stories.js.map +0 -1
- package/icon/oscd-icon.d.ts +0 -2
- package/icon/oscd-icon.js +0 -4
- package/icon/oscd-icon.js.map +0 -1
- package/iconbutton/OscdFilledIconButton.d.ts +0 -44
- package/iconbutton/OscdFilledIconButton.js +0 -37
- package/iconbutton/OscdFilledIconButton.js.map +0 -1
- package/iconbutton/OscdFilledTonalIconButton.d.ts +0 -44
- package/iconbutton/OscdFilledTonalIconButton.js +0 -37
- package/iconbutton/OscdFilledTonalIconButton.js.map +0 -1
- package/iconbutton/OscdIconButton.d.ts +0 -43
- package/iconbutton/OscdIconButton.js +0 -36
- package/iconbutton/OscdIconButton.js.map +0 -1
- package/iconbutton/OscdIconButton.stories.d.ts +0 -7
- package/iconbutton/OscdIconButton.stories.js +0 -101
- package/iconbutton/OscdIconButton.stories.js.map +0 -1
- package/iconbutton/OutlinedIconButton.d.ts +0 -43
- package/iconbutton/OutlinedIconButton.js +0 -36
- package/iconbutton/OutlinedIconButton.js.map +0 -1
- package/iconbutton/oscd-filled-icon-button.d.ts +0 -2
- package/iconbutton/oscd-filled-icon-button.js +0 -4
- package/iconbutton/oscd-filled-icon-button.js.map +0 -1
- package/iconbutton/oscd-filled-tonal-icon-button.d.ts +0 -2
- package/iconbutton/oscd-filled-tonal-icon-button.js +0 -4
- package/iconbutton/oscd-filled-tonal-icon-button.js.map +0 -1
- package/iconbutton/oscd-icon-button.d.ts +0 -2
- package/iconbutton/oscd-icon-button.js +0 -4
- package/iconbutton/oscd-icon-button.js.map +0 -1
- package/iconbutton/oscd-outlined-icon-button.d.ts +0 -2
- package/iconbutton/oscd-outlined-icon-button.js +0 -4
- package/iconbutton/oscd-outlined-icon-button.js.map +0 -1
- package/list/OscdList.d.ts +0 -39
- package/list/OscdList.js +0 -44
- package/list/OscdList.js.map +0 -1
- package/list/OscdList.stories.d.ts +0 -5
- package/list/OscdList.stories.js +0 -30
- package/list/OscdList.stories.js.map +0 -1
- package/list/OscdListItem.d.ts +0 -59
- package/list/OscdListItem.js +0 -80
- package/list/OscdListItem.js.map +0 -1
- package/list/oscd-list-item.d.ts +0 -2
- package/list/oscd-list-item.js +0 -4
- package/list/oscd-list-item.js.map +0 -1
- package/list/oscd-list.d.ts +0 -2
- package/list/oscd-list.js +0 -4
- package/list/oscd-list.js.map +0 -1
- package/menu/OscdMenu.d.ts +0 -73
- package/menu/OscdMenu.js +0 -62
- package/menu/OscdMenu.js.map +0 -1
- package/menu/OscdMenu.stories.d.ts +0 -5
- package/menu/OscdMenu.stories.js +0 -29
- package/menu/OscdMenu.stories.js.map +0 -1
- package/menu/OscdMenuItem.d.ts +0 -37
- package/menu/OscdMenuItem.js +0 -26
- package/menu/OscdMenuItem.js.map +0 -1
- package/menu/OscdMenuItem.stories.d.ts +0 -5
- package/menu/OscdMenuItem.stories.js +0 -37
- package/menu/OscdMenuItem.stories.js.map +0 -1
- package/menu/oscd-menu-item.d.ts +0 -2
- package/menu/oscd-menu-item.js +0 -4
- package/menu/oscd-menu-item.js.map +0 -1
- package/menu/oscd-menu.d.ts +0 -1
- package/menu/oscd-menu.js +0 -4
- package/menu/oscd-menu.js.map +0 -1
- package/navigation-drawer/OscdNavigationDrawer.d.ts +0 -15
- package/navigation-drawer/OscdNavigationDrawer.js +0 -37
- package/navigation-drawer/OscdNavigationDrawer.js.map +0 -1
- package/navigation-drawer/OscdNavigationDrawer.stories.d.ts +0 -5
- package/navigation-drawer/OscdNavigationDrawer.stories.js +0 -97
- package/navigation-drawer/OscdNavigationDrawer.stories.js.map +0 -1
- package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +0 -15
- package/navigation-drawer/OscdNavigationDrawerHeader.js +0 -61
- package/navigation-drawer/OscdNavigationDrawerHeader.js.map +0 -1
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.d.ts +0 -5
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.js +0 -35
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.js.map +0 -1
- package/navigation-drawer/oscd-navigation-drawer-header.d.ts +0 -2
- package/navigation-drawer/oscd-navigation-drawer-header.js +0 -4
- package/navigation-drawer/oscd-navigation-drawer-header.js.map +0 -1
- package/navigation-drawer/oscd-navigation-drawer.d.ts +0 -7
- package/navigation-drawer/oscd-navigation-drawer.js +0 -4
- package/navigation-drawer/oscd-navigation-drawer.js.map +0 -1
- package/select/OscdFilledSelect.d.ts +0 -47
- package/select/OscdFilledSelect.js +0 -39
- package/select/OscdFilledSelect.js.map +0 -1
- package/select/OscdFilledSelect.stories.d.ts +0 -5
- package/select/OscdFilledSelect.stories.js +0 -29
- package/select/OscdFilledSelect.stories.js.map +0 -1
- package/select/OscdOutlinedSelect.d.ts +0 -47
- package/select/OscdOutlinedSelect.js +0 -39
- package/select/OscdOutlinedSelect.js.map +0 -1
- package/select/OscdOutlinedSelect.stories.d.ts +0 -5
- package/select/OscdOutlinedSelect.stories.js +0 -29
- package/select/OscdOutlinedSelect.stories.js.map +0 -1
- package/select/OscdSelectOption.d.ts +0 -51
- package/select/OscdSelectOption.js +0 -41
- package/select/OscdSelectOption.js.map +0 -1
- package/select/oscd-filled-select.d.ts +0 -2
- package/select/oscd-filled-select.js +0 -4
- package/select/oscd-filled-select.js.map +0 -1
- package/select/oscd-outlined-select.d.ts +0 -2
- package/select/oscd-outlined-select.js +0 -4
- package/select/oscd-outlined-select.js.map +0 -1
- package/select/oscd-select-option.d.ts +0 -2
- package/select/oscd-select-option.js +0 -4
- package/select/oscd-select-option.js.map +0 -1
- package/tabs/OscdPrimaryTab.d.ts +0 -26
- package/tabs/OscdPrimaryTab.js +0 -18
- package/tabs/OscdPrimaryTab.js.map +0 -1
- package/tabs/OscdPrimaryTab.stories.d.ts +0 -5
- package/tabs/OscdPrimaryTab.stories.js +0 -33
- package/tabs/OscdPrimaryTab.stories.js.map +0 -1
- package/tabs/OscdSecondaryTab.d.ts +0 -26
- package/tabs/OscdSecondaryTab.js +0 -18
- package/tabs/OscdSecondaryTab.js.map +0 -1
- package/tabs/OscdSecondaryTab.stories.d.ts +0 -5
- package/tabs/OscdSecondaryTab.stories.js +0 -33
- package/tabs/OscdSecondaryTab.stories.js.map +0 -1
- package/tabs/OscdTabs.d.ts +0 -26
- package/tabs/OscdTabs.js +0 -17
- package/tabs/OscdTabs.js.map +0 -1
- package/tabs/OscdTabs.stories.d.ts +0 -5
- package/tabs/OscdTabs.stories.js +0 -29
- package/tabs/OscdTabs.stories.js.map +0 -1
- package/tabs/oscd-primary-tab.d.ts +0 -2
- package/tabs/oscd-primary-tab.js +0 -4
- package/tabs/oscd-primary-tab.js.map +0 -1
- package/tabs/oscd-secondary-tab.d.ts +0 -2
- package/tabs/oscd-secondary-tab.js +0 -4
- package/tabs/oscd-secondary-tab.js.map +0 -1
- package/tabs/oscd-tabs.d.ts +0 -2
- package/tabs/oscd-tabs.js +0 -4
- package/tabs/oscd-tabs.js.map +0 -1
- package/textfield/OscdFilledTextField.d.ts +0 -31
- package/textfield/OscdFilledTextField.js +0 -30
- package/textfield/OscdFilledTextField.js.map +0 -1
- package/textfield/OscdOutlinedTextField.d.ts +0 -27
- package/textfield/OscdOutlinedTextField.js +0 -24
- package/textfield/OscdOutlinedTextField.js.map +0 -1
- package/textfield/oscd-filled-text-field.d.ts +0 -2
- package/textfield/oscd-filled-text-field.js +0 -4
- package/textfield/oscd-filled-text-field.js.map +0 -1
- package/textfield/oscd-outlined-text-field.d.ts +0 -2
- package/textfield/oscd-outlined-text-field.js +0 -4
- package/textfield/oscd-outlined-text-field.js.map +0 -1
- package/theming/AllComponents.stories.d.ts +0 -5
- package/theming/AllComponents.stories.js +0 -309
- package/theming/AllComponents.stories.js.map +0 -1
- package/utils/storybook/getStorybookHelpers.d.ts +0 -4
- package/utils/storybook/getStorybookHelpers.js +0 -53
- package/utils/storybook/getStorybookHelpers.js.map +0 -1
- package/utils/storybook/scopedWcDecorator.d.ts +0 -2
- package/utils/storybook/scopedWcDecorator.js +0 -27
- package/utils/storybook/scopedWcDecorator.js.map +0 -1
- package/utils/storybook/themingDecorator.d.ts +0 -17
- package/utils/storybook/themingDecorator.js +0 -100
- package/utils/storybook/themingDecorator.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[](https://github.com/OMICRONEnergyOSS/oscd-ui/actions/workflows/test.yml) 
|
|
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)
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omicronenergy/oscd-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "UI Web Components set for OpenSCD",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
7
|
+
"lint": "eslint . --ext .ts --ext .js && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
8
|
+
"format": "eslint . --ext .ts --ext .js --fix && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
9
|
+
"build": "wireit",
|
|
8
10
|
"build:watch": "tsc --pretty --watch",
|
|
9
11
|
"test": "wtr",
|
|
10
12
|
"test:unit": "wtr",
|
|
11
13
|
"storybook": "storybook dev -p 6006",
|
|
12
14
|
"build-storybook": "storybook build",
|
|
13
15
|
"test:visual": "test-storybook",
|
|
14
|
-
"custom-elements
|
|
15
|
-
"
|
|
16
|
+
"copy-material-custom-elements": "cp md-custom-elements.json node_modules/@material/web/custom-elements.json",
|
|
17
|
+
"custom-elements-manifest": "npm run copy-material-custom-elements && cem analyze",
|
|
18
|
+
"prepare": "husky"
|
|
16
19
|
},
|
|
17
20
|
"repository": {
|
|
18
21
|
"type": "git",
|
|
@@ -35,13 +38,17 @@
|
|
|
35
38
|
"**/*.scss",
|
|
36
39
|
"**/*.css",
|
|
37
40
|
"**/*.css.map",
|
|
41
|
+
"!custom-elements-manifest.config.js",
|
|
38
42
|
"!web-test-runner.config.js",
|
|
43
|
+
"!test-runner.config.js",
|
|
39
44
|
"!commitlint.config.js",
|
|
40
45
|
"!**/test/**",
|
|
41
46
|
"!**/*_test.*",
|
|
47
|
+
"!**/*.stories.*",
|
|
42
48
|
"!.wireit/**",
|
|
43
49
|
"!catalog/",
|
|
44
50
|
"!scripts/",
|
|
51
|
+
"!.storybook/",
|
|
45
52
|
"!**/testing/**"
|
|
46
53
|
],
|
|
47
54
|
"overrides": {
|
|
@@ -50,6 +57,7 @@
|
|
|
50
57
|
}
|
|
51
58
|
},
|
|
52
59
|
"dependencies": {
|
|
60
|
+
"@lit/reactive-element": "^2.1.0",
|
|
53
61
|
"@material/web": "2.3.0",
|
|
54
62
|
"@open-wc/scoped-elements": "^3.0.5",
|
|
55
63
|
"@webcomponents/scoped-custom-element-registry": "^0.0.10",
|
|
@@ -57,31 +65,171 @@
|
|
|
57
65
|
"tslib": "^2.4.0"
|
|
58
66
|
},
|
|
59
67
|
"devDependencies": {
|
|
68
|
+
"@commitlint/cli": "^19.8.1",
|
|
69
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
60
70
|
"@custom-elements-manifest/analyzer": "^0.10.4",
|
|
61
|
-
"@
|
|
71
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
72
|
+
"@storybook/addon-actions": "^8.6.14",
|
|
62
73
|
"@storybook/addon-essentials": "^8.6.14",
|
|
63
74
|
"@storybook/addon-interactions": "^8.6.14",
|
|
64
75
|
"@storybook/blocks": "^8.6.14",
|
|
65
76
|
"@storybook/preview-api": "^8.6.14",
|
|
66
77
|
"@storybook/test": "^8.6.14",
|
|
67
|
-
"@storybook/test-runner": "^0.22.0",
|
|
68
78
|
"@storybook/web-components": "^8.6.14",
|
|
69
79
|
"@storybook/web-components-vite": "^8.6.14",
|
|
80
|
+
"@types/jasmine": "^4.0.3",
|
|
70
81
|
"@types/node": "^22.15.18",
|
|
71
|
-
"@typescript-eslint/
|
|
72
|
-
"@
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
83
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
84
|
+
"@wc-toolkit/cem-inheritance": "^1.0.4",
|
|
73
85
|
"@wc-toolkit/storybook-helpers": "^1.1.3",
|
|
86
|
+
"@web/test-runner-core": "^0.13.0",
|
|
87
|
+
"@web/test-runner": "^0.18.2",
|
|
88
|
+
"@web/test-runner-playwright": "^0.11.0",
|
|
89
|
+
"concurrently": "^9.0.1",
|
|
90
|
+
"eslint": "^8.57.0",
|
|
91
|
+
"eslint-config-prettier": "^9.1.0",
|
|
92
|
+
"eslint-plugin-tsdoc": "^0.4.0",
|
|
93
|
+
"husky": "^9.1.7",
|
|
94
|
+
"jasmine": "^4.5.0",
|
|
95
|
+
"lint-staged": "^16.1.0",
|
|
74
96
|
"playwright": "^1.52.0",
|
|
75
97
|
"prettier": "^3.5.3",
|
|
76
98
|
"storybook": "^8.6.14",
|
|
77
|
-
"typescript": "^5.
|
|
99
|
+
"typescript": "^5.5.3",
|
|
78
100
|
"vite-tsconfig-paths": "^5.1.4",
|
|
79
101
|
"web-test-runner-jasmine": "^0.0.6",
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
102
|
+
"wireit": "^0.14.12"
|
|
103
|
+
},
|
|
104
|
+
"wireit": {
|
|
105
|
+
"build": {
|
|
106
|
+
"dependencies": [
|
|
107
|
+
"build:ts"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"build:ts": {
|
|
111
|
+
"command": "tsc --pretty",
|
|
112
|
+
"files": [
|
|
113
|
+
"tsconfig.json",
|
|
114
|
+
"**/*.ts",
|
|
115
|
+
"!**/*.d.ts",
|
|
116
|
+
"!**/*-styles.ts",
|
|
117
|
+
"!catalog/",
|
|
118
|
+
"!scripts/"
|
|
119
|
+
],
|
|
120
|
+
"output": [
|
|
121
|
+
".tsbuildinfo",
|
|
122
|
+
"**/*.js",
|
|
123
|
+
"**/*.js.map",
|
|
124
|
+
"**/*.d.ts",
|
|
125
|
+
"!custom-elements-manifest.config.js",
|
|
126
|
+
"!web-test-runner.config.js",
|
|
127
|
+
"!test-runner.config.js",
|
|
128
|
+
"!commitlint.config.js",
|
|
129
|
+
"!types/",
|
|
130
|
+
"!catalog/",
|
|
131
|
+
"!scripts/",
|
|
132
|
+
"!.storybook/"
|
|
133
|
+
],
|
|
134
|
+
"clean": "if-file-deleted",
|
|
135
|
+
"dependencies": []
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"eslintConfig": {
|
|
139
|
+
"parser": "@typescript-eslint/parser",
|
|
140
|
+
"parserOptions": {
|
|
141
|
+
"lib": [
|
|
142
|
+
"es2018",
|
|
143
|
+
"dom"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"extends": [
|
|
147
|
+
"@open-wc",
|
|
148
|
+
"prettier"
|
|
149
|
+
],
|
|
150
|
+
"ignorePatterns": [
|
|
151
|
+
"*/**/*.js",
|
|
152
|
+
"*/**/*.d.ts"
|
|
153
|
+
],
|
|
154
|
+
"env": {
|
|
155
|
+
"jasmine": true
|
|
156
|
+
},
|
|
157
|
+
"plugins": [
|
|
158
|
+
"@typescript-eslint",
|
|
159
|
+
"eslint-plugin-tsdoc"
|
|
160
|
+
],
|
|
161
|
+
"rules": {
|
|
162
|
+
"no-unused-vars": "off",
|
|
163
|
+
"class-methods-use-this": [
|
|
164
|
+
"error",
|
|
165
|
+
{
|
|
166
|
+
"exceptMethods": [
|
|
167
|
+
"locale",
|
|
168
|
+
"render"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"@typescript-eslint/no-explicit-any": [
|
|
173
|
+
"error",
|
|
174
|
+
{
|
|
175
|
+
"ignoreRestArgs": true
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"import/no-extraneous-dependencies": [
|
|
179
|
+
"error",
|
|
180
|
+
{
|
|
181
|
+
"devDependencies": [
|
|
182
|
+
"**/*.test.ts",
|
|
183
|
+
"**/*.spec.ts",
|
|
184
|
+
"**/*.stories.ts",
|
|
185
|
+
"utils/storybook/*.ts",
|
|
186
|
+
"web-test-runner.config.js",
|
|
187
|
+
"test-runner.config.js",
|
|
188
|
+
"custom-elements-manifest.config.js"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"curly": [
|
|
193
|
+
"error",
|
|
194
|
+
"all"
|
|
195
|
+
],
|
|
196
|
+
"@typescript-eslint/no-unused-vars": [
|
|
197
|
+
"error",
|
|
198
|
+
{
|
|
199
|
+
"argsIgnorePattern": "^_",
|
|
200
|
+
"varsIgnorePattern": "^_",
|
|
201
|
+
"destructuredArrayIgnorePattern": "^_"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"import/no-unresolved": "off",
|
|
205
|
+
"import/extensions": [
|
|
206
|
+
"error",
|
|
207
|
+
"always",
|
|
208
|
+
{
|
|
209
|
+
"ignorePackages": true
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"overrides": [
|
|
214
|
+
{
|
|
215
|
+
"files": [
|
|
216
|
+
"**/*.spec.ts",
|
|
217
|
+
"**/*.test.ts"
|
|
218
|
+
],
|
|
219
|
+
"rules": {
|
|
220
|
+
"no-unused-expressions": "off"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"prettier": {
|
|
226
|
+
"singleQuote": true,
|
|
227
|
+
"arrowParens": "avoid"
|
|
228
|
+
},
|
|
229
|
+
"lint-staged": {
|
|
230
|
+
"*.ts": [
|
|
231
|
+
"eslint --fix --config package.json",
|
|
232
|
+
"prettier --write"
|
|
233
|
+
]
|
|
86
234
|
}
|
|
87
235
|
}
|
package/app-bar/OscdAppBar.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
}
|
package/app-bar/OscdAppBar.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,85 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;IAEzD,IAAI;IACJ,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;QACpB,cAAc,EAAE;YACd,cAAc,EAAE,UAAU;YAC1B,cAAc,EAAE,WAAW;YAC3B,yBAAyB,EAAE,oBAAoB;YAC/C,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,QAAQ;YACrB,gBAAgB,EAAE,YAAY;YAC9B,WAAW,EAAE,QAAQ;YACrB,oBAAoB,EAAE,gBAAgB;SACvC;KACF;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;QACxC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAA;;;;;mBAKI,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;;;;4BAI/B,KAAK;;;;mBAId,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;;;;UAIjD,SAAS,IAAI,SAAS,EAAE;;KAE7B,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,eAAe;YAC5B,KAAK,EAAE;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;aAC9B;SACF;QACD,GAAG,QAAQ;KACZ;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;KACpB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,KAAK,EAAE,6BAA6B;QACpC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,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"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
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 };
|
package/app-bar/oscd-app-bar.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|