@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 @@
|
|
|
1
|
+
{"version":3,"file":"OscdOutlinedField.js","sourceRoot":"","sources":["OscdOutlinedField.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAQvF;;;GAGG;AACH,MAAM,OAAO,iBAAkB,SAAQ,aAAa;IAClD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from \"lit\";\nimport { OutlinedField } from \"@material/web/field/internal/outlined-field.js\";\nimport { styles as outlinedStyles } from \"@material/web/field/internal/outlined-styles.js\";\nimport { styles as sharedStyles } from \"@material/web/field/internal/shared-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-outlined-field\": OscdOutlinedField;\n }\n}\n\n/**\n * @final\n * @suppress {visibility}\n */\nexport class OscdOutlinedField extends OutlinedField {\n static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-filled-field.js","sourceRoot":"","sources":["oscd-filled-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import { OscdFilledField } from \"./OscdFilledField\";\n\ncustomElements.define(\"oscd-filled-field\", OscdFilledField);\nexport { OscdFilledField };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-outlined-field.js","sourceRoot":"","sources":["oscd-outlined-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import { OscdOutlinedField } from \"./OscdOutlinedField\";\n\ncustomElements.define(\"oscd-outlined-field\", OscdOutlinedField);\nexport { OscdOutlinedField };\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { Icon } from "@material/web/icon/internal/icon.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-icon": OscdIcon;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @final
|
|
20
|
+
* @suppress {visibility}
|
|
21
|
+
*/
|
|
22
|
+
export declare class OscdIcon extends Icon {
|
|
23
|
+
/** @nocollapse */
|
|
24
|
+
static styles: CSSResultOrNative[];
|
|
25
|
+
}
|
package/icon/OscdIcon.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Icon } from "@material/web/icon/internal/icon.js";
|
|
7
|
+
import { styles } from "@material/web/icon/internal/icon-styles.js";
|
|
8
|
+
/**
|
|
9
|
+
* @final
|
|
10
|
+
* @suppress {visibility}
|
|
11
|
+
*/
|
|
12
|
+
export class OscdIcon extends Icon {
|
|
13
|
+
/** @nocollapse */
|
|
14
|
+
static styles = [styles];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=OscdIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdIcon.js","sourceRoot":"","sources":["OscdIcon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AAQpE;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,IAAI;IAChC,kBAAkB;IAClB,MAAM,CAAU,MAAM,GAAwB,CAAC,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 { Icon } from \"@material/web/icon/internal/icon.js\";\nimport { styles } from \"@material/web/icon/internal/icon-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-icon\": OscdIcon;\n }\n}\n\n/**\n * @final\n * @suppress {visibility}\n */\nexport class OscdIcon extends Icon {\n /** @nocollapse */\n static override styles: CSSResultOrNative[] = [styles];\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { OscdIcon } from "icon/OscdIcon";
|
|
3
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Open SCD/Icon",
|
|
6
|
+
component: "oscd-icon",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
decorators: [scopedWcDecorator],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
scopedElements: {
|
|
12
|
+
"oscd-icon": OscdIcon,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
render: (args) => {
|
|
16
|
+
const { icon, iconSize, color } = args;
|
|
17
|
+
return html `
|
|
18
|
+
<oscd-icon style="--md-icon-size:${iconSize ?? "40"}px; color:${color}">
|
|
19
|
+
${icon}</oscd-icon
|
|
20
|
+
>
|
|
21
|
+
`;
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
icon: {
|
|
25
|
+
control: { type: "text" },
|
|
26
|
+
description: "Icon name",
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: { summary: "menu" },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
iconSize: {
|
|
32
|
+
control: { type: "number" },
|
|
33
|
+
description: "Icon Size",
|
|
34
|
+
table: {
|
|
35
|
+
defaultValue: { summary: "40" },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
color: {
|
|
39
|
+
control: { type: "color" },
|
|
40
|
+
description: "Icon Color",
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: { summary: "var(--md-sys-color-primary)" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export default meta;
|
|
48
|
+
export const Default = {
|
|
49
|
+
args: {
|
|
50
|
+
icon: "menu",
|
|
51
|
+
iconSize: "40",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=OscdIcon.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdIcon.stories.js","sourceRoot":"","sources":["OscdIcon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,cAAc,EAAE;YACd,WAAW,EAAE,QAAQ;SACtB;KACF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvC,OAAO,IAAI,CAAA;yCAC0B,QAAQ,IAAI,IAAI,aAAa,KAAK;UACjE,IAAI;;KAET,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE;gBACL,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;aAClC;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE;gBACL,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAChC;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YAC1B,WAAW,EAAE,YAAY;YACzB,KAAK,EAAE;gBACL,YAAY,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;aACzD;SACF;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC","sourcesContent":["import { html } from \"lit\";\nimport type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdIcon } from \"icon/OscdIcon\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\n\nconst meta: Meta = {\n title: \"Open SCD/Icon\",\n component: \"oscd-icon\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-icon\": OscdIcon,\n },\n },\n render: (args) => {\n const { icon, iconSize, color } = args;\n return html`\n <oscd-icon style=\"--md-icon-size:${iconSize ?? \"40\"}px; color:${color}\">\n ${icon}</oscd-icon\n >\n `;\n },\n argTypes: {\n icon: {\n control: { type: \"text\" },\n description: \"Icon name\",\n table: {\n defaultValue: { summary: \"menu\" },\n },\n },\n iconSize: {\n control: { type: \"number\" },\n description: \"Icon Size\",\n table: {\n defaultValue: { summary: \"40\" },\n },\n },\n color: {\n control: { type: \"color\" },\n description: \"Icon Color\",\n table: {\n defaultValue: { summary: \"var(--md-sys-color-primary)\" },\n },\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nexport const Default: Story = {\n args: {\n icon: \"menu\",\n iconSize: \"40\",\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-icon.js","sourceRoot":"","sources":["oscd-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { OscdIcon } from \"./OscdIcon\";\n\ncustomElements.define(\"oscd-icon\", OscdIcon);\nexport { OscdIcon };\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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 { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-filled-icon-button": OscdFilledIconButton;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
20
|
+
* tap.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
24
|
+
* least amount of prominence.
|
|
25
|
+
*
|
|
26
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
27
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
28
|
+
*
|
|
29
|
+
* __Example usages:__
|
|
30
|
+
* - Add to Favorites
|
|
31
|
+
* - Print
|
|
32
|
+
*
|
|
33
|
+
* @final
|
|
34
|
+
* @suppress {visibility}
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdFilledIconButton extends IconButton {
|
|
37
|
+
static styles: CSSResultOrNative[];
|
|
38
|
+
protected getRenderClasses(): {
|
|
39
|
+
filled: boolean;
|
|
40
|
+
"toggle-filled": boolean;
|
|
41
|
+
'flip-icon': boolean;
|
|
42
|
+
selected: boolean;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { styles } from "@material/web/iconbutton/internal/filled-styles.js";
|
|
7
|
+
import { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
8
|
+
import { styles as sharedStyles } from "@material/web/iconbutton/internal/shared-styles.js";
|
|
9
|
+
/**
|
|
10
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
11
|
+
* tap.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
15
|
+
* least amount of prominence.
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
18
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
19
|
+
*
|
|
20
|
+
* __Example usages:__
|
|
21
|
+
* - Add to Favorites
|
|
22
|
+
* - Print
|
|
23
|
+
*
|
|
24
|
+
* @final
|
|
25
|
+
* @suppress {visibility}
|
|
26
|
+
*/
|
|
27
|
+
export class OscdFilledIconButton extends IconButton {
|
|
28
|
+
static styles = [sharedStyles, styles];
|
|
29
|
+
getRenderClasses() {
|
|
30
|
+
return {
|
|
31
|
+
...super.getRenderClasses(),
|
|
32
|
+
filled: true,
|
|
33
|
+
"toggle-filled": this.toggle,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=OscdFilledIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledIconButton.js","sourceRoot":"","sources":["OscdFilledIconButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,MAAM,EAAE,MAAM,oDAAoD,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQ5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAElD,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,IAAI,CAAC,MAAM;SAC7B,CAAC;IACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from \"lit\";\nimport { styles } from \"@material/web/iconbutton/internal/filled-styles.js\";\nimport { IconButton } from \"@material/web/iconbutton/internal/icon-button.js\";\nimport { styles as sharedStyles } from \"@material/web/iconbutton/internal/shared-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-filled-icon-button\": OscdFilledIconButton;\n }\n}\n\n/**\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\n * @description\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence.\n *\n * __Rationale:__ The most compact and unobtrusive type of button, icon buttons\n * are used for optional supplementary actions such as \"Bookmark\" or \"Star.\"\n *\n * __Example usages:__\n * - Add to Favorites\n * - Print\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdFilledIconButton extends IconButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n filled: true,\n \"toggle-filled\": this.toggle,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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 { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-filled-tonal-icon-button": OscdFilledTonalIconButton;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
20
|
+
* tap.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
24
|
+
* least amount of prominence.
|
|
25
|
+
*
|
|
26
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
27
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
28
|
+
*
|
|
29
|
+
* __Example usages:__
|
|
30
|
+
* - Add to Favorites
|
|
31
|
+
* - Print
|
|
32
|
+
*
|
|
33
|
+
* @final
|
|
34
|
+
* @suppress {visibility}
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdFilledTonalIconButton extends IconButton {
|
|
37
|
+
static styles: CSSResultOrNative[];
|
|
38
|
+
protected getRenderClasses(): {
|
|
39
|
+
"filled-tonal": boolean;
|
|
40
|
+
"toggle-filled-tonal": boolean;
|
|
41
|
+
'flip-icon': boolean;
|
|
42
|
+
selected: boolean;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { styles } from "@material/web/iconbutton/internal/filled-tonal-styles.js";
|
|
7
|
+
import { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
8
|
+
import { styles as sharedStyles } from "@material/web/iconbutton/internal/shared-styles.js";
|
|
9
|
+
/**
|
|
10
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
11
|
+
* tap.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
15
|
+
* least amount of prominence.
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
18
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
19
|
+
*
|
|
20
|
+
* __Example usages:__
|
|
21
|
+
* - Add to Favorites
|
|
22
|
+
* - Print
|
|
23
|
+
*
|
|
24
|
+
* @final
|
|
25
|
+
* @suppress {visibility}
|
|
26
|
+
*/
|
|
27
|
+
export class OscdFilledTonalIconButton extends IconButton {
|
|
28
|
+
static styles = [sharedStyles, styles];
|
|
29
|
+
getRenderClasses() {
|
|
30
|
+
return {
|
|
31
|
+
...super.getRenderClasses(),
|
|
32
|
+
"filled-tonal": true,
|
|
33
|
+
"toggle-filled-tonal": this.toggle,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=OscdFilledTonalIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledTonalIconButton.js","sourceRoot":"","sources":["OscdFilledTonalIconButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,MAAM,EAAE,MAAM,0DAA0D,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQ5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,yBAA0B,SAAQ,UAAU;IACvD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAElD,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,cAAc,EAAE,IAAI;YACpB,qBAAqB,EAAE,IAAI,CAAC,MAAM;SACnC,CAAC;IACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from \"lit\";\nimport { styles } from \"@material/web/iconbutton/internal/filled-tonal-styles.js\";\nimport { IconButton } from \"@material/web/iconbutton/internal/icon-button.js\";\nimport { styles as sharedStyles } from \"@material/web/iconbutton/internal/shared-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-filled-tonal-icon-button\": OscdFilledTonalIconButton;\n }\n}\n\n/**\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\n * @description\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence.\n *\n * __Rationale:__ The most compact and unobtrusive type of button, icon buttons\n * are used for optional supplementary actions such as \"Bookmark\" or \"Star.\"\n *\n * __Example usages:__\n * - Add to Favorites\n * - Print\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdFilledTonalIconButton extends IconButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n \"filled-tonal\": true,\n \"toggle-filled-tonal\": this.toggle,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-icon-button": OscdIconButton;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
20
|
+
* tap.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
24
|
+
* least amount of prominence.
|
|
25
|
+
*
|
|
26
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
27
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
28
|
+
*
|
|
29
|
+
* __Example usages:__
|
|
30
|
+
* - Add to Favorites
|
|
31
|
+
* - Print
|
|
32
|
+
*
|
|
33
|
+
* @final
|
|
34
|
+
* @suppress {visibility}
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdIconButton extends IconButton {
|
|
37
|
+
static styles: CSSResultOrNative[];
|
|
38
|
+
protected getRenderClasses(): {
|
|
39
|
+
standard: boolean;
|
|
40
|
+
'flip-icon': boolean;
|
|
41
|
+
selected: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
7
|
+
import { styles as sharedStyles } from "@material/web/iconbutton/internal/shared-styles.js";
|
|
8
|
+
import { styles } from "@material/web/iconbutton/internal/standard-styles.js";
|
|
9
|
+
/**
|
|
10
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
11
|
+
* tap.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
15
|
+
* least amount of prominence.
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
18
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
19
|
+
*
|
|
20
|
+
* __Example usages:__
|
|
21
|
+
* - Add to Favorites
|
|
22
|
+
* - Print
|
|
23
|
+
*
|
|
24
|
+
* @final
|
|
25
|
+
* @suppress {visibility}
|
|
26
|
+
*/
|
|
27
|
+
export class OscdIconButton extends IconButton {
|
|
28
|
+
static styles = [sharedStyles, styles];
|
|
29
|
+
getRenderClasses() {
|
|
30
|
+
return {
|
|
31
|
+
...super.getRenderClasses(),
|
|
32
|
+
standard: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=OscdIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdIconButton.js","sourceRoot":"","sources":["OscdIconButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,sDAAsD,CAAC;AAQ9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAElD,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,QAAQ,EAAE,IAAI;SACf,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 { CSSResultOrNative } from \"lit\";\nimport { IconButton } from \"@material/web/iconbutton/internal/icon-button.js\";\nimport { styles as sharedStyles } from \"@material/web/iconbutton/internal/shared-styles.js\";\nimport { styles } from \"@material/web/iconbutton/internal/standard-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-icon-button\": OscdIconButton;\n }\n}\n\n/**\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\n * @description\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence.\n *\n * __Rationale:__ The most compact and unobtrusive type of button, icon buttons\n * are used for optional supplementary actions such as \"Bookmark\" or \"Star.\"\n *\n * __Example usages:__\n * - Add to Favorites\n * - Print\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdIconButton extends IconButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n standard: true,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/web-components";
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj;
|
|
5
|
+
export declare const IconButton: Story;
|
|
6
|
+
export declare const FilledIconButton: Story;
|
|
7
|
+
export declare const OutlinedIconButton: Story;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { OscdIconButton } from "iconbutton/OscdIconButton";
|
|
2
|
+
import { OscdIcon } from "icon/OscdIcon";
|
|
3
|
+
import { scopedWcDecorator } from "utils/storybook/scopedWcDecorator.js";
|
|
4
|
+
import { html as staticHtml, unsafeStatic } from "lit/static-html.js";
|
|
5
|
+
import { OscdFilledIconButton } from "./OscdFilledIconButton";
|
|
6
|
+
import { OscdOutlinedIconButton } from "./OutlinedIconButton";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Open SCD/Icon Buttons",
|
|
9
|
+
component: "oscd-icon-button",
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
decorators: [scopedWcDecorator],
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: "centered",
|
|
14
|
+
scopedElements: {
|
|
15
|
+
"oscd-icon-button": OscdIconButton,
|
|
16
|
+
"oscd-filled-icon-button": OscdFilledIconButton,
|
|
17
|
+
"oscd-outlined-icon-button": OscdOutlinedIconButton,
|
|
18
|
+
"oscd-icon": OscdIcon,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
render: ({ icon, disabled, selected, toggle, selectedIcon }, { globals }) => {
|
|
22
|
+
const { component } = globals;
|
|
23
|
+
return staticHtml `<${unsafeStatic(component)}
|
|
24
|
+
?disabled=${disabled}
|
|
25
|
+
?selected=${selected}
|
|
26
|
+
?toggle=${toggle}
|
|
27
|
+
@click=${() => console.log("Clicked!")}>
|
|
28
|
+
<oscd-icon>${icon}</oscd-icon>
|
|
29
|
+
<oscd-icon slot="selected">${selectedIcon}</oscd-icon>
|
|
30
|
+
</${unsafeStatic(component)}>`;
|
|
31
|
+
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
icon: {
|
|
34
|
+
control: { type: "text" },
|
|
35
|
+
description: "Icon name",
|
|
36
|
+
table: {
|
|
37
|
+
category: "Web Component Properties",
|
|
38
|
+
defaultValue: { summary: "menu" },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
selectedIcon: {
|
|
42
|
+
control: { type: "text" },
|
|
43
|
+
description: "Icon name",
|
|
44
|
+
table: {
|
|
45
|
+
category: "Web Component Properties",
|
|
46
|
+
defaultValue: { summary: "menu" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
control: { type: "boolean" },
|
|
51
|
+
description: "Disabled",
|
|
52
|
+
table: {
|
|
53
|
+
category: "Web Component Properties",
|
|
54
|
+
defaultValue: { summary: "false" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
selected: {
|
|
58
|
+
control: { type: "boolean" },
|
|
59
|
+
description: "Selected",
|
|
60
|
+
table: {
|
|
61
|
+
category: "Web Component Properties",
|
|
62
|
+
defaultValue: { summary: "false" },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
toggle: {
|
|
66
|
+
control: { type: "boolean" },
|
|
67
|
+
description: "Toggle",
|
|
68
|
+
table: {
|
|
69
|
+
category: "Web Component Properties",
|
|
70
|
+
defaultValue: { summary: "false" },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
export default meta;
|
|
76
|
+
const args = {
|
|
77
|
+
icon: "light_mode",
|
|
78
|
+
selectedIcon: "dark_mode",
|
|
79
|
+
disabled: false,
|
|
80
|
+
selected: false,
|
|
81
|
+
toggle: false,
|
|
82
|
+
};
|
|
83
|
+
export const IconButton = {
|
|
84
|
+
args,
|
|
85
|
+
globals: {
|
|
86
|
+
component: "oscd-icon-button",
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
export const FilledIconButton = {
|
|
90
|
+
args,
|
|
91
|
+
globals: {
|
|
92
|
+
component: "oscd-filled-icon-button",
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
export const OutlinedIconButton = {
|
|
96
|
+
args,
|
|
97
|
+
globals: {
|
|
98
|
+
component: "oscd-outlined-icon-button",
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=OscdIconButton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdIconButton.stories.js","sourceRoot":"","sources":["OscdIconButton.stories.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Meta, StoryObj } from \"@storybook/web-components\";\n\nimport { OscdIconButton } from \"iconbutton/OscdIconButton\";\nimport { OscdIcon } from \"icon/OscdIcon\";\nimport { scopedWcDecorator } from \"utils/storybook/scopedWcDecorator.js\";\nimport { html as staticHtml, unsafeStatic } from \"lit/static-html.js\";\nimport { OscdFilledIconButton } from \"./OscdFilledIconButton\";\nimport { OscdOutlinedIconButton } from \"./OutlinedIconButton\";\n\nconst meta: Meta = {\n title: \"Open SCD/Icon Buttons\",\n component: \"oscd-icon-button\",\n tags: [\"autodocs\"],\n decorators: [scopedWcDecorator],\n parameters: {\n layout: \"centered\",\n scopedElements: {\n \"oscd-icon-button\": OscdIconButton,\n \"oscd-filled-icon-button\": OscdFilledIconButton,\n \"oscd-outlined-icon-button\": OscdOutlinedIconButton,\n \"oscd-icon\": OscdIcon,\n },\n },\n render: ({ icon, disabled, selected, toggle, selectedIcon }, { globals }) => {\n const { component } = globals;\n return staticHtml`<${unsafeStatic(component)} \n ?disabled=${disabled}\n ?selected=${selected}\n ?toggle=${toggle}\n @click=${() => console.log(\"Clicked!\")}>\n <oscd-icon>${icon}</oscd-icon>\n <oscd-icon slot=\"selected\">${selectedIcon}</oscd-icon>\n </${unsafeStatic(component)}>`;\n },\n\n argTypes: {\n icon: {\n control: { type: \"text\" },\n description: \"Icon name\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"menu\" },\n },\n },\n selectedIcon: {\n control: { type: \"text\" },\n description: \"Icon name\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"menu\" },\n },\n },\n disabled: {\n control: { type: \"boolean\" },\n description: \"Disabled\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"false\" },\n },\n },\n selected: {\n control: { type: \"boolean\" },\n description: \"Selected\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"false\" },\n },\n },\n toggle: {\n control: { type: \"boolean\" },\n description: \"Toggle\",\n table: {\n category: \"Web Component Properties\",\n defaultValue: { summary: \"false\" },\n },\n },\n },\n};\n\nexport default meta;\ntype Story = StoryObj;\n\nconst args = {\n icon: \"light_mode\",\n selectedIcon: \"dark_mode\",\n disabled: false,\n selected: false,\n toggle: false,\n};\n\nexport const IconButton: Story = {\n args,\n globals: {\n component: \"oscd-icon-button\",\n },\n};\n\nexport const FilledIconButton: Story = {\n args,\n globals: {\n component: \"oscd-filled-icon-button\",\n },\n};\n\nexport const OutlinedIconButton: Story = {\n args,\n globals: {\n component: \"oscd-outlined-icon-button\",\n },\n};\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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 { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
"oscd-outlined-icon-button": OscdOutlinedIconButton;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
20
|
+
* tap.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
24
|
+
* least amount of prominence.
|
|
25
|
+
*
|
|
26
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
27
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
28
|
+
*
|
|
29
|
+
* __Example usages:__
|
|
30
|
+
* - Add to Favorites
|
|
31
|
+
* - Print
|
|
32
|
+
*
|
|
33
|
+
* @final
|
|
34
|
+
* @suppress {visibility}
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdOutlinedIconButton extends IconButton {
|
|
37
|
+
static styles: CSSResultOrNative[];
|
|
38
|
+
protected getRenderClasses(): {
|
|
39
|
+
outlined: boolean;
|
|
40
|
+
'flip-icon': boolean;
|
|
41
|
+
selected: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { IconButton } from "@material/web/iconbutton/internal/icon-button.js";
|
|
7
|
+
import { styles } from "@material/web/iconbutton/internal/outlined-styles.js";
|
|
8
|
+
import { styles as sharedStyles } from "@material/web/iconbutton/internal/shared-styles.js";
|
|
9
|
+
/**
|
|
10
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
11
|
+
* tap.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
15
|
+
* least amount of prominence.
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
18
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
19
|
+
*
|
|
20
|
+
* __Example usages:__
|
|
21
|
+
* - Add to Favorites
|
|
22
|
+
* - Print
|
|
23
|
+
*
|
|
24
|
+
* @final
|
|
25
|
+
* @suppress {visibility}
|
|
26
|
+
*/
|
|
27
|
+
export class OscdOutlinedIconButton extends IconButton {
|
|
28
|
+
static styles = [sharedStyles, styles];
|
|
29
|
+
getRenderClasses() {
|
|
30
|
+
return {
|
|
31
|
+
...super.getRenderClasses(),
|
|
32
|
+
outlined: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=OutlinedIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutlinedIconButton.js","sourceRoot":"","sources":["OutlinedIconButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,sDAAsD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQ5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,sBAAuB,SAAQ,UAAU;IACpD,MAAM,CAAU,MAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAElD,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 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 { IconButton } from \"@material/web/iconbutton/internal/icon-button.js\";\nimport { styles } from \"@material/web/iconbutton/internal/outlined-styles.js\";\nimport { styles as sharedStyles } from \"@material/web/iconbutton/internal/shared-styles.js\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"oscd-outlined-icon-button\": OscdOutlinedIconButton;\n }\n}\n\n/**\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\n * @description\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence.\n *\n * __Rationale:__ The most compact and unobtrusive type of button, icon buttons\n * are used for optional supplementary actions such as \"Bookmark\" or \"Star.\"\n *\n * __Example usages:__\n * - Add to Favorites\n * - Print\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdOutlinedIconButton extends IconButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n\n protected override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n outlined: true,\n };\n }\n}\n"]}
|