@omicronenergy/oscd-ui 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-bar/OscdAppBar.d.ts +45 -0
- package/app-bar/OscdAppBar.js +142 -0
- package/app-bar/OscdAppBar.js.map +1 -0
- package/app-bar/OscdAppBar.stories.d.ts +10 -0
- package/app-bar/OscdAppBar.stories.js +85 -0
- package/app-bar/OscdAppBar.stories.js.map +1 -0
- package/app-bar/oscd-app-bar.d.ts +12 -0
- package/app-bar/oscd-app-bar.js +14 -0
- package/app-bar/oscd-app-bar.js.map +1 -0
- package/button/OscdButton.stories.d.ts +7 -0
- package/button/OscdButton.stories.js +60 -0
- package/button/OscdButton.stories.js.map +1 -0
- package/button/OscdFilledButton.d.ts +40 -0
- package/button/OscdFilledButton.js +42 -0
- package/button/OscdFilledButton.js.map +1 -0
- package/button/OscdFilledButton.spec.d.ts +6 -0
- package/button/OscdFilledButton.spec.js +75 -0
- package/button/OscdFilledButton.spec.js.map +1 -0
- package/button/OscdOutlinedButton.d.ts +42 -0
- package/button/OscdOutlinedButton.js +34 -0
- package/button/OscdOutlinedButton.js.map +1 -0
- package/button/OscdTextButton.d.ts +40 -0
- package/button/OscdTextButton.js +32 -0
- package/button/OscdTextButton.js.map +1 -0
- package/button/oscd-filled-button.d.ts +2 -0
- package/button/oscd-filled-button.js +4 -0
- package/button/oscd-filled-button.js.map +1 -0
- package/button/oscd-outlined-button.d.ts +7 -0
- package/button/oscd-outlined-button.js +9 -0
- package/button/oscd-outlined-button.js.map +1 -0
- package/button/oscd-text-button.d.ts +7 -0
- package/button/oscd-text-button.js +9 -0
- package/button/oscd-text-button.js.map +1 -0
- package/dialog/OscdDialog.d.ts +47 -0
- package/dialog/OscdDialog.js +38 -0
- package/dialog/OscdDialog.js.map +1 -0
- package/dialog/OscdDialog.stories.d.ts +5 -0
- package/dialog/OscdDialog.stories.js +50 -0
- package/dialog/OscdDialog.stories.js.map +1 -0
- package/dialog/oscd-dialog.d.ts +2 -0
- package/dialog/oscd-dialog.js +4 -0
- package/dialog/oscd-dialog.js.map +1 -0
- package/divider/OscdDivider.d.ts +30 -0
- package/divider/OscdDivider.js +21 -0
- package/divider/OscdDivider.js.map +1 -0
- package/divider/OscdDivider.stories.d.ts +5 -0
- package/divider/OscdDivider.stories.js +28 -0
- package/divider/OscdDivider.stories.js.map +1 -0
- package/divider/oscd-divider.d.ts +2 -0
- package/divider/oscd-divider.js +4 -0
- package/divider/oscd-divider.js.map +1 -0
- package/elevation/OscdElevation.d.ts +28 -0
- package/elevation/OscdElevation.js +19 -0
- package/elevation/OscdElevation.js.map +1 -0
- package/elevation/oscd-elevation.d.ts +7 -0
- package/elevation/oscd-elevation.js +9 -0
- package/elevation/oscd-elevation.js.map +1 -0
- package/field/OscdFilledField.d.ts +24 -0
- package/field/OscdFilledField.js +16 -0
- package/field/OscdFilledField.js.map +1 -0
- package/field/OscdOutlinedField.d.ts +24 -0
- package/field/OscdOutlinedField.js +16 -0
- package/field/OscdOutlinedField.js.map +1 -0
- package/field/oscd-filled-field.d.ts +2 -0
- package/field/oscd-filled-field.js +4 -0
- package/field/oscd-filled-field.js.map +1 -0
- package/field/oscd-outlined-field.d.ts +2 -0
- package/field/oscd-outlined-field.js +4 -0
- package/field/oscd-outlined-field.js.map +1 -0
- package/icon/OscdIcon.d.ts +25 -0
- package/icon/OscdIcon.js +16 -0
- package/icon/OscdIcon.js.map +1 -0
- package/icon/OscdIcon.stories.d.ts +5 -0
- package/icon/OscdIcon.stories.js +54 -0
- package/icon/OscdIcon.stories.js.map +1 -0
- package/icon/oscd-icon.d.ts +2 -0
- package/icon/oscd-icon.js +4 -0
- package/icon/oscd-icon.js.map +1 -0
- package/iconbutton/OscdFilledIconButton.d.ts +44 -0
- package/iconbutton/OscdFilledIconButton.js +37 -0
- package/iconbutton/OscdFilledIconButton.js.map +1 -0
- package/iconbutton/OscdFilledTonalIconButton.d.ts +44 -0
- package/iconbutton/OscdFilledTonalIconButton.js +37 -0
- package/iconbutton/OscdFilledTonalIconButton.js.map +1 -0
- package/iconbutton/OscdIconButton.d.ts +43 -0
- package/iconbutton/OscdIconButton.js +36 -0
- package/iconbutton/OscdIconButton.js.map +1 -0
- package/iconbutton/OscdIconButton.stories.d.ts +7 -0
- package/iconbutton/OscdIconButton.stories.js +101 -0
- package/iconbutton/OscdIconButton.stories.js.map +1 -0
- package/iconbutton/OutlinedIconButton.d.ts +43 -0
- package/iconbutton/OutlinedIconButton.js +36 -0
- package/iconbutton/OutlinedIconButton.js.map +1 -0
- package/iconbutton/oscd-filled-icon-button.d.ts +2 -0
- package/iconbutton/oscd-filled-icon-button.js +4 -0
- package/iconbutton/oscd-filled-icon-button.js.map +1 -0
- package/iconbutton/oscd-filled-tonal-icon-button.d.ts +2 -0
- package/iconbutton/oscd-filled-tonal-icon-button.js +4 -0
- package/iconbutton/oscd-filled-tonal-icon-button.js.map +1 -0
- package/iconbutton/oscd-icon-button.d.ts +2 -0
- package/iconbutton/oscd-icon-button.js +4 -0
- package/iconbutton/oscd-icon-button.js.map +1 -0
- package/iconbutton/oscd-outlined-icon-button.d.ts +2 -0
- package/iconbutton/oscd-outlined-icon-button.js +4 -0
- package/iconbutton/oscd-outlined-icon-button.js.map +1 -0
- package/list/OscdList.d.ts +39 -0
- package/list/OscdList.js +44 -0
- package/list/OscdList.js.map +1 -0
- package/list/OscdList.stories.d.ts +5 -0
- package/list/OscdList.stories.js +30 -0
- package/list/OscdList.stories.js.map +1 -0
- package/list/OscdListItem.d.ts +59 -0
- package/list/OscdListItem.js +80 -0
- package/list/OscdListItem.js.map +1 -0
- package/list/oscd-list-item.d.ts +2 -0
- package/list/oscd-list-item.js +4 -0
- package/list/oscd-list-item.js.map +1 -0
- package/list/oscd-list.d.ts +2 -0
- package/list/oscd-list.js +4 -0
- package/list/oscd-list.js.map +1 -0
- package/menu/OscdMenu.d.ts +73 -0
- package/menu/OscdMenu.js +62 -0
- package/menu/OscdMenu.js.map +1 -0
- package/menu/OscdMenu.stories.d.ts +5 -0
- package/menu/OscdMenu.stories.js +29 -0
- package/menu/OscdMenu.stories.js.map +1 -0
- package/menu/OscdMenuItem.d.ts +37 -0
- package/menu/OscdMenuItem.js +26 -0
- package/menu/OscdMenuItem.js.map +1 -0
- package/menu/OscdMenuItem.stories.d.ts +5 -0
- package/menu/OscdMenuItem.stories.js +37 -0
- package/menu/OscdMenuItem.stories.js.map +1 -0
- package/menu/oscd-menu-item.d.ts +2 -0
- package/menu/oscd-menu-item.js +4 -0
- package/menu/oscd-menu-item.js.map +1 -0
- package/menu/oscd-menu.d.ts +1 -0
- package/menu/oscd-menu.js +4 -0
- package/menu/oscd-menu.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawer.d.ts +15 -0
- package/navigation-drawer/OscdNavigationDrawer.js +37 -0
- package/navigation-drawer/OscdNavigationDrawer.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawer.stories.d.ts +5 -0
- package/navigation-drawer/OscdNavigationDrawer.stories.js +97 -0
- package/navigation-drawer/OscdNavigationDrawer.stories.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +15 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.js +61 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.d.ts +5 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.js +35 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.stories.js.map +1 -0
- package/navigation-drawer/oscd-navigation-drawer-header.d.ts +2 -0
- package/navigation-drawer/oscd-navigation-drawer-header.js +4 -0
- package/navigation-drawer/oscd-navigation-drawer-header.js.map +1 -0
- package/navigation-drawer/oscd-navigation-drawer.d.ts +7 -0
- package/navigation-drawer/oscd-navigation-drawer.js +4 -0
- package/navigation-drawer/oscd-navigation-drawer.js.map +1 -0
- package/package.json +3 -2
- package/select/OscdFilledSelect.d.ts +47 -0
- package/select/OscdFilledSelect.js +39 -0
- package/select/OscdFilledSelect.js.map +1 -0
- package/select/OscdFilledSelect.stories.d.ts +5 -0
- package/select/OscdFilledSelect.stories.js +29 -0
- package/select/OscdFilledSelect.stories.js.map +1 -0
- package/select/OscdOutlinedSelect.d.ts +47 -0
- package/select/OscdOutlinedSelect.js +39 -0
- package/select/OscdOutlinedSelect.js.map +1 -0
- package/select/OscdOutlinedSelect.stories.d.ts +5 -0
- package/select/OscdOutlinedSelect.stories.js +29 -0
- package/select/OscdOutlinedSelect.stories.js.map +1 -0
- package/select/OscdSelectOption.d.ts +51 -0
- package/select/OscdSelectOption.js +41 -0
- package/select/OscdSelectOption.js.map +1 -0
- package/select/oscd-filled-select.d.ts +2 -0
- package/select/oscd-filled-select.js +4 -0
- package/select/oscd-filled-select.js.map +1 -0
- package/select/oscd-outlined-select.d.ts +2 -0
- package/select/oscd-outlined-select.js +4 -0
- package/select/oscd-outlined-select.js.map +1 -0
- package/select/oscd-select-option.d.ts +2 -0
- package/select/oscd-select-option.js +4 -0
- package/select/oscd-select-option.js.map +1 -0
- package/tabs/OscdPrimaryTab.d.ts +26 -0
- package/tabs/OscdPrimaryTab.js +18 -0
- package/tabs/OscdPrimaryTab.js.map +1 -0
- package/tabs/OscdPrimaryTab.stories.d.ts +5 -0
- package/tabs/OscdPrimaryTab.stories.js +33 -0
- package/tabs/OscdPrimaryTab.stories.js.map +1 -0
- package/tabs/OscdSecondaryTab.d.ts +26 -0
- package/tabs/OscdSecondaryTab.js +18 -0
- package/tabs/OscdSecondaryTab.js.map +1 -0
- package/tabs/OscdSecondaryTab.stories.d.ts +5 -0
- package/tabs/OscdSecondaryTab.stories.js +33 -0
- package/tabs/OscdSecondaryTab.stories.js.map +1 -0
- package/tabs/OscdTabs.d.ts +26 -0
- package/tabs/OscdTabs.js +17 -0
- package/tabs/OscdTabs.js.map +1 -0
- package/tabs/OscdTabs.stories.d.ts +5 -0
- package/tabs/OscdTabs.stories.js +29 -0
- package/tabs/OscdTabs.stories.js.map +1 -0
- package/tabs/oscd-primary-tab.d.ts +2 -0
- package/tabs/oscd-primary-tab.js +4 -0
- package/tabs/oscd-primary-tab.js.map +1 -0
- package/tabs/oscd-secondary-tab.d.ts +2 -0
- package/tabs/oscd-secondary-tab.js +4 -0
- package/tabs/oscd-secondary-tab.js.map +1 -0
- package/tabs/oscd-tabs.d.ts +2 -0
- package/tabs/oscd-tabs.js +4 -0
- package/tabs/oscd-tabs.js.map +1 -0
- package/textfield/OscdFilledTextField.d.ts +31 -0
- package/textfield/OscdFilledTextField.js +30 -0
- package/textfield/OscdFilledTextField.js.map +1 -0
- package/textfield/OscdOutlinedTextField.d.ts +27 -0
- package/textfield/OscdOutlinedTextField.js +24 -0
- package/textfield/OscdOutlinedTextField.js.map +1 -0
- package/textfield/oscd-filled-text-field.d.ts +2 -0
- package/textfield/oscd-filled-text-field.js +4 -0
- package/textfield/oscd-filled-text-field.js.map +1 -0
- package/textfield/oscd-outlined-text-field.d.ts +2 -0
- package/textfield/oscd-outlined-text-field.js +4 -0
- package/textfield/oscd-outlined-text-field.js.map +1 -0
- package/theming/AllComponents.stories.d.ts +5 -0
- package/theming/AllComponents.stories.js +309 -0
- package/theming/AllComponents.stories.js.map +1 -0
- package/utils/storybook/getStorybookHelpers.d.ts +4 -0
- package/utils/storybook/getStorybookHelpers.js +53 -0
- package/utils/storybook/getStorybookHelpers.js.map +1 -0
- package/utils/storybook/scopedWcDecorator.d.ts +2 -0
- package/utils/storybook/scopedWcDecorator.js +27 -0
- package/utils/storybook/scopedWcDecorator.js.map +1 -0
- package/utils/storybook/themingDecorator.d.ts +17 -0
- package/utils/storybook/themingDecorator.js +100 -0
- package/utils/storybook/themingDecorator.js.map +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { OscdMenuItem } from "menu/OscdMenuItem";
|
|
3
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
4
|
+
import { OscdElevation } from "elevation/OscdElevation";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Open SCD/Menus/Menu Item",
|
|
7
|
+
component: "oscd-menu-item",
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
decorators: [scopedWcDecorator],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
scopedElements: {
|
|
13
|
+
"oscd-menu-item": OscdMenuItem,
|
|
14
|
+
"oscd-elevation": OscdElevation,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
render: ({ label }) => html `<div style="--md-elevation-level: 5; position: relative;">
|
|
18
|
+
<oscd-menu-item>${label}</oscd-menu-item><oscd-elevation></oscd-elevation>
|
|
19
|
+
</div>`,
|
|
20
|
+
argTypes: {
|
|
21
|
+
label: {
|
|
22
|
+
control: { type: "text" },
|
|
23
|
+
description: "Menu item label",
|
|
24
|
+
table: {
|
|
25
|
+
category: "Web Component Properties",
|
|
26
|
+
defaultValue: { summary: "Option" },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
export const Default = {
|
|
33
|
+
args: {
|
|
34
|
+
label: "Option",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=OscdMenuItem.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdMenuItem.stories.js","sourceRoot":"","sources":["OscdMenuItem.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE;YACd,gBAAgB,EAAE,YAAY;YAC9B,gBAAgB,EAAE,aAAa;SAChC;KACF;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACpB,IAAI,CAAA;wBACgB,KAAK;WAClB;IACT,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,iBAAiB;YAC9B,KAAK,EAAE;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;aACpC;SACF;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdMenuItem } from \"menu/OscdMenuItem\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\nimport { OscdElevation } from \"elevation/OscdElevation\";\n\nconst meta: Meta = {\n title: \"Open SCD/Menus/Menu Item\",\n component: \"oscd-menu-item\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-menu-item\": OscdMenuItem,\n \"oscd-elevation\": OscdElevation,\n },\n },\n render: ({ label }) =>\n html`<div style=\"--md-elevation-level: 5; position: relative;\">\n <oscd-menu-item>${label}</oscd-menu-item><oscd-elevation></oscd-elevation>\n </div>`,\n argTypes: {\n label: {\n control: { type: \"text\" },\n description: \"Menu item label\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"Option\" },\n },\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {\n label: \"Option\",\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-menu-item.js","sourceRoot":"","sources":["oscd-menu-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { OscdMenuItem } from \"./OscdMenuItem\";\n\ncustomElements.define(\"oscd-menu-item\", OscdMenuItem);\nexport { OscdMenuItem };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./OscdMenu";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-menu.js","sourceRoot":"","sources":["oscd-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC7C,cAAc,YAAY,CAAC","sourcesContent":["import { OscdMenu } from \"./OscdMenu\";\n\ncustomElements.define(\"oscd-menu\", OscdMenu);\nexport * from \"./OscdMenu\";\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { CSSResultOrNative } from "lit";
|
|
12
|
+
import { NavigationDrawerModal } from "@material/web/labs/navigationdrawer/internal/navigation-drawer-modal.js";
|
|
13
|
+
export declare class OscdNavigationDrawer extends NavigationDrawerModal {
|
|
14
|
+
static readonly styles: CSSResultOrNative[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { css } from "lit";
|
|
12
|
+
import { NavigationDrawerModal } from "@material/web/labs/navigationdrawer/internal/navigation-drawer-modal.js";
|
|
13
|
+
import { styles } from "@material/web/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js";
|
|
14
|
+
import { styles as sharedStyles } from "@material/web/labs/navigationdrawer/internal/shared-styles.js";
|
|
15
|
+
const overrideStyles = css `
|
|
16
|
+
:host {
|
|
17
|
+
--md-navigation-drawer-modal-scrim-color: var(--md-sys-color-scrim, #000);
|
|
18
|
+
--md-navigation-drawer-modal-scrim-opacity: 0.32;
|
|
19
|
+
--md-navigation-drawer-modal-container-color: var(
|
|
20
|
+
--md-sys-color-surface-container
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
.md3-navigation-drawer-modal--opened {
|
|
24
|
+
z-index: 6;
|
|
25
|
+
}
|
|
26
|
+
.md3-navigation-drawer-modal__scrim {
|
|
27
|
+
z-index: 5;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export class OscdNavigationDrawer extends NavigationDrawerModal {
|
|
31
|
+
static styles = [
|
|
32
|
+
sharedStyles,
|
|
33
|
+
styles,
|
|
34
|
+
overrideStyles,
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=OscdNavigationDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdNavigationDrawer.js","sourceRoot":"","sources":["OscdNavigationDrawer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAgC,MAAM,KAAK,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yEAAyE,CAAC;AAChH,OAAO,EAAE,MAAM,EAAE,MAAM,gFAAgF,CAAC;AACxG,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAEvG,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAczB,CAAC;AAGF,MAAM,OAAO,oBAAqB,SAAQ,qBAAqB;IAC7D,MAAM,CAAmB,MAAM,GAAwB;QACrD,YAAoC;QACpC,MAA8B;QAC9B,cAAsC;KACvC,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 { css, CSSResult, CSSResultOrNative } from \"lit\";\nimport { NavigationDrawerModal } from \"@material/web/labs/navigationdrawer/internal/navigation-drawer-modal.js\";\nimport { styles } from \"@material/web/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js\";\nimport { styles as sharedStyles } from \"@material/web/labs/navigationdrawer/internal/shared-styles.js\";\n\nconst overrideStyles = css`\n :host {\n --md-navigation-drawer-modal-scrim-color: var(--md-sys-color-scrim, #000);\n --md-navigation-drawer-modal-scrim-opacity: 0.32;\n --md-navigation-drawer-modal-container-color: var(\n --md-sys-color-surface-container\n );\n }\n .md3-navigation-drawer-modal--opened {\n z-index: 6;\n }\n .md3-navigation-drawer-modal__scrim {\n z-index: 5;\n }\n`;\n\n\nexport class OscdNavigationDrawer extends NavigationDrawerModal {\n static override readonly styles: CSSResultOrNative[] = [\n sharedStyles as unknown as CSSResult,\n styles as unknown as CSSResult,\n overrideStyles as unknown as CSSResult,\n ];\n}\n"]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { OscdNavigationDrawer } from "navigation-drawer/OscdNavigationDrawer";
|
|
3
|
+
import { OscdList } from "list/OscdList";
|
|
4
|
+
import { OscdListItem } from "list/OscdListItem";
|
|
5
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
6
|
+
import { useArgs } from "@storybook/preview-api";
|
|
7
|
+
import { OscdIcon } from "icon/OscdIcon";
|
|
8
|
+
import { OscdNavigationDrawerHeader } from "./OscdNavigationDrawerHeader";
|
|
9
|
+
import { OscdAppBar } from "app-bar/OscdAppBar";
|
|
10
|
+
import { OscdFilledIconButton } from "iconbutton/OscdFilledIconButton";
|
|
11
|
+
const meta = {
|
|
12
|
+
title: "Open SCD/Navigation Drawer/Navigation Drawer",
|
|
13
|
+
component: "oscd-navigation-drawer",
|
|
14
|
+
tags: ["autodocs"],
|
|
15
|
+
decorators: [scopedWcDecorator],
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: "fullscreen",
|
|
18
|
+
scopedElements: {
|
|
19
|
+
"oscd-navigation-drawer": OscdNavigationDrawer,
|
|
20
|
+
"oscd-navigation-drawer-header": OscdNavigationDrawerHeader,
|
|
21
|
+
"oscd-app-bar": OscdAppBar,
|
|
22
|
+
"oscd-list": OscdList,
|
|
23
|
+
"oscd-list-item": OscdListItem,
|
|
24
|
+
"oscd-filled-icon-button": OscdFilledIconButton,
|
|
25
|
+
"oscd-icon": OscdIcon,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
argTypes: {
|
|
29
|
+
label: {
|
|
30
|
+
control: { type: "text" },
|
|
31
|
+
description: "Navigation drawer Header label",
|
|
32
|
+
},
|
|
33
|
+
opened: {
|
|
34
|
+
control: { type: "boolean" },
|
|
35
|
+
description: "Menu opened state",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
render: ({ label, opened }) => {
|
|
39
|
+
const [_, updateArgs] = useArgs();
|
|
40
|
+
return html `
|
|
41
|
+
<style>
|
|
42
|
+
oscd-app-bar {
|
|
43
|
+
--oscd-app-bar-background-color: #6c71c4;
|
|
44
|
+
--oscd-app-bar-color: #073642;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<oscd-navigation-drawer
|
|
49
|
+
?opened=${opened}
|
|
50
|
+
@navigation-drawer-changed=${({ detail }) => {
|
|
51
|
+
console.log("nav drawer changed", detail);
|
|
52
|
+
if (!detail.opened) {
|
|
53
|
+
updateArgs({ opened: false });
|
|
54
|
+
}
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<oscd-navigation-drawer-header>
|
|
58
|
+
<div slot="headline">${label}</div>
|
|
59
|
+
<div slot="supporting-text">sample.scd</div>
|
|
60
|
+
</oscd-navigation-drawer-header>
|
|
61
|
+
<oscd-list>
|
|
62
|
+
<oscd-list-item type="button"
|
|
63
|
+
><div slot="headline">Home</div></oscd-list-item
|
|
64
|
+
>
|
|
65
|
+
<oscd-list-item type="button"
|
|
66
|
+
><div slot="headline">Profile</div></oscd-list-item
|
|
67
|
+
>
|
|
68
|
+
<oscd-list-item type="button"
|
|
69
|
+
><div slot="headline">Settings</div></oscd-list-item
|
|
70
|
+
>
|
|
71
|
+
</oscd-list>
|
|
72
|
+
</oscd-navigation-drawer>
|
|
73
|
+
<oscd-app-bar>
|
|
74
|
+
<oscd-filled-icon-button
|
|
75
|
+
slot="actionStart"
|
|
76
|
+
aria-label="Menu"
|
|
77
|
+
@click=${() => updateArgs({ opened: true })}
|
|
78
|
+
>
|
|
79
|
+
<oscd-icon>menu</oscd-icon></oscd-filled-icon-button
|
|
80
|
+
>
|
|
81
|
+
<div slot="title">Navigation Drawer Demo</div>
|
|
82
|
+
</oscd-app-bar>
|
|
83
|
+
|
|
84
|
+
<section>
|
|
85
|
+
<p>This is the main content area.</p>
|
|
86
|
+
</section>
|
|
87
|
+
`;
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
export default meta;
|
|
91
|
+
export const Default = {
|
|
92
|
+
args: {
|
|
93
|
+
label: "Menu",
|
|
94
|
+
opened: false,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=OscdNavigationDrawer.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdNavigationDrawer.stories.js","sourceRoot":"","sources":["OscdNavigationDrawer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE,wBAAwB;IACnC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;QACpB,cAAc,EAAE;YACd,wBAAwB,EAAE,oBAAoB;YAC9C,+BAA+B,EAAE,0BAA0B;YAC3D,cAAc,EAAE,UAAU;YAC1B,WAAW,EAAE,QAAQ;YACrB,gBAAgB,EAAE,YAAY;YAC9B,yBAAyB,EAAE,oBAAoB;YAC/C,WAAW,EAAE,QAAQ;SACtB;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,gCAAgC;SAC9C;QACD,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC5B,WAAW,EAAE,mBAAmB;SACjC;KACF;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,OAAO,EAAE,CAAC;QAElC,OAAO,IAAI,CAAA;;;;;;;;;kBASG,MAAM;qCACa,CAAC,EAAE,MAAM,EAAe,EAAE,EAAE;YACvD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;;;iCAGwB,KAAK;;;;;;;;;;;;;;;;;;;mBAmBnB,GAAG,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;;;;;;;;;KAUhD,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,KAAK;KACd;CACF,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdNavigationDrawer } from \"navigation-drawer/OscdNavigationDrawer\";\nimport { OscdList } from \"list/OscdList\";\nimport { OscdListItem } from \"list/OscdListItem\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\nimport { useArgs } from \"@storybook/preview-api\";\nimport { OscdIcon } from \"icon/OscdIcon\";\nimport { OscdNavigationDrawerHeader } from \"./OscdNavigationDrawerHeader\";\nimport { OscdAppBar } from \"app-bar/OscdAppBar\";\nimport { OscdFilledIconButton } from \"iconbutton/OscdFilledIconButton\";\n\nconst meta: Meta = {\n title: \"Open SCD/Navigation Drawer/Navigation Drawer\",\n component: \"oscd-navigation-drawer\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"fullscreen\",\n scopedElements: {\n \"oscd-navigation-drawer\": OscdNavigationDrawer,\n \"oscd-navigation-drawer-header\": OscdNavigationDrawerHeader,\n \"oscd-app-bar\": OscdAppBar,\n \"oscd-list\": OscdList,\n \"oscd-list-item\": OscdListItem,\n \"oscd-filled-icon-button\": OscdFilledIconButton,\n \"oscd-icon\": OscdIcon,\n },\n },\n argTypes: {\n label: {\n control: { type: \"text\" },\n description: \"Navigation drawer Header label\",\n },\n opened: {\n control: { type: \"boolean\" },\n description: \"Menu opened state\",\n },\n },\n render: ({ label, opened }) => {\n const [_, updateArgs] = useArgs();\n\n return html`\n <style>\n oscd-app-bar {\n --oscd-app-bar-background-color: #6c71c4;\n --oscd-app-bar-color: #073642;\n }\n </style>\n\n <oscd-navigation-drawer\n ?opened=${opened}\n @navigation-drawer-changed=${({ detail }: CustomEvent) => {\n console.log(\"nav drawer changed\", detail);\n if (!detail.opened) {\n updateArgs({ opened: false });\n }\n }}\n >\n <oscd-navigation-drawer-header>\n <div slot=\"headline\">${label}</div>\n <div slot=\"supporting-text\">sample.scd</div>\n </oscd-navigation-drawer-header>\n <oscd-list>\n <oscd-list-item type=\"button\"\n ><div slot=\"headline\">Home</div></oscd-list-item\n >\n <oscd-list-item type=\"button\"\n ><div slot=\"headline\">Profile</div></oscd-list-item\n >\n <oscd-list-item type=\"button\"\n ><div slot=\"headline\">Settings</div></oscd-list-item\n >\n </oscd-list>\n </oscd-navigation-drawer>\n <oscd-app-bar>\n <oscd-filled-icon-button\n slot=\"actionStart\"\n aria-label=\"Menu\"\n @click=${() => updateArgs({ opened: true })}\n >\n <oscd-icon>menu</oscd-icon></oscd-filled-icon-button\n >\n <div slot=\"title\">Navigation Drawer Demo</div>\n </oscd-app-bar>\n\n <section>\n <p>This is the main content area.</p>\n </section>\n `;\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {\n label: \"Menu\",\n opened: false,\n },\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResultOrNative } from "lit";
|
|
7
|
+
import { ListItemEl as ListItem } from "@material/web/list/internal/listitem/list-item.js";
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
"oscd-navigation-drawer-header": OscdNavigationDrawerHeader;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare class OscdNavigationDrawerHeader extends ListItem {
|
|
14
|
+
static readonly styles: CSSResultOrNative[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
import { ListItemEl as ListItem } from "@material/web/list/internal/listitem/list-item.js";
|
|
8
|
+
import { styles } from "@material/web/list/internal/listitem/list-item-styles.js";
|
|
9
|
+
const overrideStyles = css `
|
|
10
|
+
:host {
|
|
11
|
+
--navigation-drawer-header-color: var(
|
|
12
|
+
--oscd-navigation-drawer-header-color,
|
|
13
|
+
var(--md-sys-color-on-primary, #1d1b20)
|
|
14
|
+
);
|
|
15
|
+
--navigation-drawer-header-background-color: var(
|
|
16
|
+
--oscd-navigation-drawer-header-background-color,
|
|
17
|
+
var(--md-sys-color-primary, #fff)
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
--md-list-item-label-text-font: var(
|
|
21
|
+
--oscd-navigation-drawer-header-text-font,
|
|
22
|
+
Roboto
|
|
23
|
+
);
|
|
24
|
+
--md-list-item-label-text-size: var(
|
|
25
|
+
--oscd-navigation-drawer-header-text-size,
|
|
26
|
+
1.25rem
|
|
27
|
+
);
|
|
28
|
+
--md-list-item-label-text-line-height: var(
|
|
29
|
+
--oscd-navigation-drawer-header-text-line-height,
|
|
30
|
+
1.5rem
|
|
31
|
+
);
|
|
32
|
+
--md-list-item-label-text-weight: var(
|
|
33
|
+
--oscd-navigation-drawer-header-text-weight,
|
|
34
|
+
500
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
--md-list-item-supporting-text-font: var(
|
|
38
|
+
--oscd-navigation-drawer-header-supporting-text-font,
|
|
39
|
+
var(--md-sys-typescale-body-medium-font, Roboto)
|
|
40
|
+
);
|
|
41
|
+
--md-list-item-supporting-text-size: var(
|
|
42
|
+
--oscd-navigation-drawer-header-supporting-text-size,
|
|
43
|
+
0.875rem
|
|
44
|
+
);
|
|
45
|
+
--md-list-item-supporting-text-line-height: var(
|
|
46
|
+
--oscd-navigation-drawer-header-supporting-text-line-height,
|
|
47
|
+
1.25rem
|
|
48
|
+
);
|
|
49
|
+
--md-list-item-supporting-text-weight: var(
|
|
50
|
+
--oscd-navigation-drawer-header-supporting-text-weight,
|
|
51
|
+
400
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export class OscdNavigationDrawerHeader extends ListItem {
|
|
56
|
+
static styles = [
|
|
57
|
+
styles,
|
|
58
|
+
overrideStyles,
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=OscdNavigationDrawerHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdNavigationDrawerHeader.js","sourceRoot":"","sources":["OscdNavigationDrawerHeader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAC;AAC7C,OAAO,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,0DAA0D,CAAC;AAQlF,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CzB,CAAC;AAEF,MAAM,OAAO,0BAA2B,SAAQ,QAAQ;IACtD,MAAM,CAAmB,MAAM,GAAwB;QACrD,MAAM;QACN,cAAc;KACf,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { css, CSSResultOrNative } from \"lit\";\nimport { ListItemEl as ListItem } from \"@material/web/list/internal/listitem/list-item.js\";\nimport { styles } from \"@material/web/list/internal/listitem/list-item-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-navigation-drawer-header\": OscdNavigationDrawerHeader;\n }\n}\n\nconst overrideStyles = css`\n :host {\n --navigation-drawer-header-color: var(\n --oscd-navigation-drawer-header-color,\n var(--md-sys-color-on-primary, #1d1b20)\n );\n --navigation-drawer-header-background-color: var(\n --oscd-navigation-drawer-header-background-color,\n var(--md-sys-color-primary, #fff)\n );\n\n --md-list-item-label-text-font: var(\n --oscd-navigation-drawer-header-text-font,\n Roboto\n );\n --md-list-item-label-text-size: var(\n --oscd-navigation-drawer-header-text-size,\n 1.25rem\n );\n --md-list-item-label-text-line-height: var(\n --oscd-navigation-drawer-header-text-line-height,\n 1.5rem\n );\n --md-list-item-label-text-weight: var(\n --oscd-navigation-drawer-header-text-weight,\n 500\n );\n\n --md-list-item-supporting-text-font: var(\n --oscd-navigation-drawer-header-supporting-text-font,\n var(--md-sys-typescale-body-medium-font, Roboto)\n );\n --md-list-item-supporting-text-size: var(\n --oscd-navigation-drawer-header-supporting-text-size,\n 0.875rem\n );\n --md-list-item-supporting-text-line-height: var(\n --oscd-navigation-drawer-header-supporting-text-line-height,\n 1.25rem\n );\n --md-list-item-supporting-text-weight: var(\n --oscd-navigation-drawer-header-supporting-text-weight,\n 400\n );\n }\n`;\n\nexport class OscdNavigationDrawerHeader extends ListItem {\n static override readonly styles: CSSResultOrNative[] = [\n styles,\n overrideStyles,\n ];\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { OscdNavigationDrawerHeader } from "navigation-drawer/OscdNavigationDrawerHeader";
|
|
3
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Open SCD/Navigation Drawer/Navigation Drawer Header",
|
|
6
|
+
component: "oscd-navigation-drawer-header",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
decorators: [scopedWcDecorator],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
scopedElements: {
|
|
12
|
+
"oscd-navigation-drawer-header": OscdNavigationDrawerHeader,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
render: ({ label }) => html `
|
|
16
|
+
<oscd-navigation-drawer-header>${label}</oscd-navigation-drawer-header>
|
|
17
|
+
`,
|
|
18
|
+
argTypes: {
|
|
19
|
+
label: {
|
|
20
|
+
control: { type: "text" },
|
|
21
|
+
description: "Header label",
|
|
22
|
+
table: {
|
|
23
|
+
category: "Web Component Properties",
|
|
24
|
+
defaultValue: { summary: "Navigation" },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
export const Default = {
|
|
31
|
+
args: {
|
|
32
|
+
label: "Navigation",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=OscdNavigationDrawerHeader.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdNavigationDrawerHeader.stories.js","sourceRoot":"","sources":["OscdNavigationDrawerHeader.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,qDAAqD;IAC5D,SAAS,EAAE,+BAA+B;IAC1C,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE;YACd,+BAA+B,EAAE,0BAA0B;SAC5D;KACF;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;qCACQ,KAAK;GACvC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE;gBACL,QAAQ,EAAE,0BAA0B;gBACpC,YAAY,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;aACxC;SACF;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;KACpB;CACF,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdNavigationDrawerHeader } from \"navigation-drawer/OscdNavigationDrawerHeader\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\n\nconst meta: Meta = {\n title: \"Open SCD/Navigation Drawer/Navigation Drawer Header\",\n component: \"oscd-navigation-drawer-header\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-navigation-drawer-header\": OscdNavigationDrawerHeader,\n },\n },\n render: ({ label }) => html`\n <oscd-navigation-drawer-header>${label}</oscd-navigation-drawer-header>\n `,\n argTypes: {\n label: {\n control: { type: \"text\" },\n description: \"Header label\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"Navigation\" },\n },\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {\n label: \"Navigation\",\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-navigation-drawer-header.js","sourceRoot":"","sources":["oscd-navigation-drawer-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,cAAc,CAAC,MAAM,CACnB,+BAA+B,EAC/B,0BAA0B,CAC3B,CAAC;AACF,OAAO,EAAE,0BAA0B,EAAE,CAAC","sourcesContent":["import { OscdNavigationDrawerHeader } from \"./OscdNavigationDrawerHeader\";\n\ncustomElements.define(\n \"oscd-navigation-drawer-header\",\n OscdNavigationDrawerHeader\n);\nexport { OscdNavigationDrawerHeader };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-navigation-drawer.js","sourceRoot":"","sources":["oscd-navigation-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAM9D,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { OscdNavigationDrawer } from \"./OscdNavigationDrawer\";\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-navigation-drawer\": OscdNavigationDrawer;\n }\n}\ncustomElements.define(\"oscd-navigation-drawer\", OscdNavigationDrawer);\nexport { OscdNavigationDrawer };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omicronenergy/oscd-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "UI Web Components set for OpenSCD",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"storybook": "storybook dev -p 6006",
|
|
12
12
|
"build-storybook": "storybook build",
|
|
13
13
|
"test:visual": "test-storybook",
|
|
14
|
-
"custom-elements-manifest": "cem analyze"
|
|
14
|
+
"custom-elements-manifest": "cem analyze",
|
|
15
|
+
"prepare": "npm run build"
|
|
15
16
|
},
|
|
16
17
|
"repository": {
|
|
17
18
|
"type": "git",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { CSSResultOrNative } from "lit";
|
|
12
|
+
import { FilledSelect } from "@material/web/select/internal/filled-select.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-filled-select": OscdFilledSelect;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary
|
|
20
|
+
* Select menus display a list of choices on temporary surfaces and display the
|
|
21
|
+
* currently selected menu item above the menu.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* The select component allows users to choose a value from a fixed list of
|
|
25
|
+
* available options. Composed of an interactive anchor button and a menu, it is
|
|
26
|
+
* analogous to the native HTML `<select>` element. This is the "filled"
|
|
27
|
+
* variant.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <oscd-filled-select label="fruits">
|
|
32
|
+
* <!-- An empty selected option will give select an "un-filled" state -->
|
|
33
|
+
* <oscd-select-option selected></oscd-select-option>
|
|
34
|
+
* <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
|
|
35
|
+
* <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
|
|
36
|
+
* <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
|
|
37
|
+
* <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
|
|
38
|
+
* <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
|
|
39
|
+
* </oscd-filled-select>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @final
|
|
43
|
+
* @suppress {visibility}
|
|
44
|
+
*/
|
|
45
|
+
export declare class OscdFilledSelect extends FilledSelect {
|
|
46
|
+
static styles: CSSResultOrNative[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { FilledSelect } from "@material/web/select/internal/filled-select.js";
|
|
7
|
+
import { styles } from "@material/web/select/internal/filled-select-styles.js";
|
|
8
|
+
import { styles as sharedStyles } from "@material/web/select/internal/shared-styles.js";
|
|
9
|
+
/**
|
|
10
|
+
* @summary
|
|
11
|
+
* Select menus display a list of choices on temporary surfaces and display the
|
|
12
|
+
* currently selected menu item above the menu.
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* The select component allows users to choose a value from a fixed list of
|
|
16
|
+
* available options. Composed of an interactive anchor button and a menu, it is
|
|
17
|
+
* analogous to the native HTML `<select>` element. This is the "filled"
|
|
18
|
+
* variant.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <oscd-filled-select label="fruits">
|
|
23
|
+
* <!-- An empty selected option will give select an "un-filled" state -->
|
|
24
|
+
* <oscd-select-option selected></oscd-select-option>
|
|
25
|
+
* <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
|
|
26
|
+
* <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
|
|
27
|
+
* <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
|
|
28
|
+
* <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
|
|
29
|
+
* <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
|
|
30
|
+
* </oscd-filled-select>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @final
|
|
34
|
+
* @suppress {visibility}
|
|
35
|
+
*/
|
|
36
|
+
export class OscdFilledSelect extends FilledSelect {
|
|
37
|
+
static styles = [sharedStyles, styles];
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=OscdFilledSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledSelect.js","sourceRoot":"","sources":["OscdFilledSelect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAQxF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,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 { FilledSelect } from \"@material/web/select/internal/filled-select.js\";\nimport { styles } from \"@material/web/select/internal/filled-select-styles.js\";\nimport { styles as sharedStyles } from \"@material/web/select/internal/shared-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-filled-select\": OscdFilledSelect;\n }\n}\n\n/**\n * @summary\n * Select menus display a list of choices on temporary surfaces and display the\n * currently selected menu item above the menu.\n *\n * @description\n * The select component allows users to choose a value from a fixed list of\n * available options. Composed of an interactive anchor button and a menu, it is\n * analogous to the native HTML `<select>` element. This is the \"filled\"\n * variant.\n *\n * @example\n * ```html\n * <oscd-filled-select label=\"fruits\">\n * <!-- An empty selected option will give select an \"un-filled\" state -->\n * <oscd-select-option selected></oscd-select-option>\n * <oscd-select-option value=\"apple\" headline=\"Apple\"></oscd-select-option>\n * <oscd-select-option value=\"banana\" headline=\"Banana\"></oscd-select-option>\n * <oscd-select-option value=\"kiwi\" headline=\"Kiwi\"></oscd-select-option>\n * <oscd-select-option value=\"orange\" headline=\"Orange\"></oscd-select-option>\n * <oscd-select-option value=\"tomato\" headline=\"Tomato\"></oscd-select-option>\n * </oscd-filled-select>\n * ```\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdFilledSelect extends FilledSelect {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { OscdFilledSelect } from "select/OscdFilledSelect";
|
|
3
|
+
import { OscdSelectOption } from "select/OscdSelectOption";
|
|
4
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Open SCD/Selects/Filled Select",
|
|
7
|
+
component: "oscd-filled-select",
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
decorators: [scopedWcDecorator],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
scopedElements: {
|
|
13
|
+
"oscd-filled-select": OscdFilledSelect,
|
|
14
|
+
"oscd-select-option": OscdSelectOption,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
render: () => html `
|
|
18
|
+
<oscd-filled-select label="Choose one">
|
|
19
|
+
<oscd-select-option value="1">Option 1</oscd-select-option>
|
|
20
|
+
<oscd-select-option value="2">Option 2</oscd-select-option>
|
|
21
|
+
</oscd-filled-select>
|
|
22
|
+
`,
|
|
23
|
+
argTypes: {},
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
export const Default = {
|
|
27
|
+
args: {},
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=OscdFilledSelect.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledSelect.stories.js","sourceRoot":"","sources":["OscdFilledSelect.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,gCAAgC;IACvC,SAAS,EAAE,oBAAoB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE;YACd,oBAAoB,EAAE,gBAAgB;YACtC,oBAAoB,EAAE,gBAAgB;SACvC;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;GAKjB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;CACT,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdFilledSelect } from \"select/OscdFilledSelect\";\nimport { OscdSelectOption } from \"select/OscdSelectOption\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\n\nconst meta: Meta = {\n title: \"Open SCD/Selects/Filled Select\",\n component: \"oscd-filled-select\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-filled-select\": OscdFilledSelect,\n \"oscd-select-option\": OscdSelectOption,\n },\n },\n render: () => html`\n <oscd-filled-select label=\"Choose one\">\n <oscd-select-option value=\"1\">Option 1</oscd-select-option>\n <oscd-select-option value=\"2\">Option 2</oscd-select-option>\n </oscd-filled-select>\n `,\n argTypes: {},\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {},\n};\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { CSSResultOrNative } from "lit";
|
|
12
|
+
import { OutlinedSelect } from "@material/web/select/internal/outlined-select.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-outlined-select": OscdOutlinedSelect;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary
|
|
20
|
+
* Select menus display a list of choices on temporary surfaces and display the
|
|
21
|
+
* currently selected menu item above the menu.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* The select component allows users to choose a value from a fixed list of
|
|
25
|
+
* available options. Composed of an interactive anchor button and a menu, it is
|
|
26
|
+
* analogous to the native HTML `<select>` element. This is the "outlined"
|
|
27
|
+
* variant.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <oscd-outlined-select label="fruits">
|
|
32
|
+
* <!-- An empty selected option will give select an "un-filled" state -->
|
|
33
|
+
* <oscd-select-option selected></oscd-select-option>
|
|
34
|
+
* <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
|
|
35
|
+
* <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
|
|
36
|
+
* <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
|
|
37
|
+
* <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
|
|
38
|
+
* <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
|
|
39
|
+
* </oscd-outlined-select>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @final
|
|
43
|
+
* @suppress {visibility}
|
|
44
|
+
*/
|
|
45
|
+
export declare class OscdOutlinedSelect extends OutlinedSelect {
|
|
46
|
+
static styles: CSSResultOrNative[];
|
|
47
|
+
}
|