@omicronenergy/oscd-ui 0.0.5 → 0.0.7
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 +47 -0
- package/app-bar/OscdAppBar.js +152 -0
- package/app-bar/OscdAppBar.js.map +1 -0
- package/app-bar/oscd-app-bar.d.ts +12 -0
- package/app-bar/oscd-app-bar.js +9 -0
- package/app-bar/oscd-app-bar.js.map +1 -0
- package/button/OscdFilledButton.d.ts +38 -0
- package/button/OscdFilledButton.js +45 -0
- package/button/OscdFilledButton.js.map +1 -0
- package/button/OscdFilledButton.spec.d.ts +6 -0
- package/button/OscdFilledButton.spec.js +79 -0
- package/button/OscdFilledButton.spec.js.map +1 -0
- package/button/OscdOutlinedButton.d.ts +40 -0
- package/button/OscdOutlinedButton.js +37 -0
- package/button/OscdOutlinedButton.js.map +1 -0
- package/button/OscdTextButton.d.ts +38 -0
- package/button/OscdTextButton.js +35 -0
- package/button/OscdTextButton.js.map +1 -0
- package/button/oscd-filled-button.d.ts +7 -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 +12 -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 +12 -0
- package/button/oscd-text-button.js +9 -0
- package/button/oscd-text-button.js.map +1 -0
- package/dialog/OscdDialog.d.ts +42 -0
- package/dialog/OscdDialog.js +49 -0
- package/dialog/OscdDialog.js.map +1 -0
- package/dialog/oscd-dialog.d.ts +7 -0
- package/dialog/oscd-dialog.js +4 -0
- package/dialog/oscd-dialog.js.map +1 -0
- package/divider/OscdDivider.d.ts +26 -0
- package/divider/OscdDivider.js +22 -0
- package/divider/OscdDivider.js.map +1 -0
- package/divider/oscd-divider.d.ts +7 -0
- package/divider/oscd-divider.js +4 -0
- package/divider/oscd-divider.js.map +1 -0
- package/elevation/OscdElevation.d.ts +23 -0
- package/elevation/OscdElevation.js +19 -0
- package/elevation/OscdElevation.js.map +1 -0
- package/elevation/_elevation.scss +6 -0
- package/elevation/internal/_elevation.scss +176 -0
- package/elevation/internal/elevation-styles.css +1 -0
- package/elevation/internal/elevation-styles.css.map +1 -0
- package/elevation/internal/elevation-styles.d.ts +1 -0
- package/elevation/internal/elevation-styles.js +10 -0
- package/elevation/internal/elevation-styles.js.map +1 -0
- package/elevation/internal/elevation-styles.scss +10 -0
- package/elevation/internal/elevation.d.ts +13 -0
- package/elevation/internal/elevation.js +21 -0
- package/elevation/internal/elevation.js.map +1 -0
- package/elevation/oscd-elevation.d.ts +12 -0
- package/elevation/oscd-elevation.js +9 -0
- package/elevation/oscd-elevation.js.map +1 -0
- package/field/OscdFilledField.d.ts +21 -0
- package/field/OscdFilledField.js +18 -0
- package/field/OscdFilledField.js.map +1 -0
- package/field/OscdOutlinedField.d.ts +23 -0
- package/field/OscdOutlinedField.js +20 -0
- package/field/OscdOutlinedField.js.map +1 -0
- package/field/oscd-filled-field.d.ts +7 -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 +7 -0
- package/field/oscd-outlined-field.js +4 -0
- package/field/oscd-outlined-field.js.map +1 -0
- package/focus/OscdFocusRing.d.ts +5 -0
- package/focus/OscdFocusRing.js +6 -0
- package/focus/OscdFocusRing.js.map +1 -0
- package/focus/_focus-ring.scss +6 -0
- package/focus/internal/_focus-ring.scss +113 -0
- package/focus/internal/focus-ring-styles.css +1 -0
- package/focus/internal/focus-ring-styles.css.map +1 -0
- package/focus/internal/focus-ring-styles.d.ts +1 -0
- package/focus/internal/focus-ring-styles.js +10 -0
- package/focus/internal/focus-ring-styles.js.map +1 -0
- package/focus/internal/focus-ring-styles.scss +10 -0
- package/focus/internal/focus-ring.d.ts +39 -0
- package/focus/internal/focus-ring.js +101 -0
- package/focus/internal/focus-ring.js.map +1 -0
- package/focus/oscd-focus-ring.d.ts +21 -0
- package/focus/oscd-focus-ring.js +23 -0
- package/focus/oscd-focus-ring.js.map +1 -0
- package/icon/OscdIcon.d.ts +24 -0
- package/icon/OscdIcon.js +20 -0
- package/icon/OscdIcon.js.map +1 -0
- package/icon/oscd-icon.d.ts +7 -0
- package/icon/oscd-icon.js +4 -0
- package/icon/oscd-icon.js.map +1 -0
- package/iconbutton/OscdFilledIconButton.d.ts +39 -0
- package/iconbutton/OscdFilledIconButton.js +37 -0
- package/iconbutton/OscdFilledIconButton.js.map +1 -0
- package/iconbutton/OscdFilledTonalIconButton.d.ts +39 -0
- package/iconbutton/OscdFilledTonalIconButton.js +37 -0
- package/iconbutton/OscdFilledTonalIconButton.js.map +1 -0
- package/iconbutton/OscdIconButton.d.ts +38 -0
- package/iconbutton/OscdIconButton.js +36 -0
- package/iconbutton/OscdIconButton.js.map +1 -0
- package/iconbutton/OscdOutlinedIconButton.d.ts +38 -0
- package/iconbutton/OscdOutlinedIconButton.js +36 -0
- package/iconbutton/OscdOutlinedIconButton.js.map +1 -0
- package/iconbutton/oscd-filled-icon-button.d.ts +7 -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 +7 -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 +7 -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 +7 -0
- package/iconbutton/oscd-outlined-icon-button.js +4 -0
- package/iconbutton/oscd-outlined-icon-button.js.map +1 -0
- package/internal/aria/aria.d.ts +103 -0
- package/internal/aria/aria.js +81 -0
- package/internal/aria/aria.js.map +1 -0
- package/internal/aria/delegate.d.ts +54 -0
- package/internal/aria/delegate.js +176 -0
- package/internal/aria/delegate.js.map +1 -0
- package/internal/controller/attachable-controller.d.ts +114 -0
- package/internal/controller/attachable-controller.js +121 -0
- package/internal/controller/attachable-controller.js.map +1 -0
- package/internal/controller/form-submitter.d.ts +70 -0
- package/internal/controller/form-submitter.js +69 -0
- package/internal/controller/form-submitter.js.map +1 -0
- package/internal/controller/is-rtl.d.ts +14 -0
- package/internal/controller/is-rtl.js +18 -0
- package/internal/controller/is-rtl.js.map +1 -0
- package/internal/controller/string-converter.d.ts +9 -0
- package/internal/controller/string-converter.js +14 -0
- package/internal/controller/string-converter.js.map +1 -0
- package/internal/events/dispatch-hooks.d.ts +85 -0
- package/internal/events/dispatch-hooks.js +151 -0
- package/internal/events/dispatch-hooks.js.map +1 -0
- package/internal/events/form-label-activation.d.ts +55 -0
- package/internal/events/form-label-activation.js +96 -0
- package/internal/events/form-label-activation.js.map +1 -0
- package/internal/events/redispatch-event.d.ts +27 -0
- package/internal/events/redispatch-event.js +40 -0
- package/internal/events/redispatch-event.js.map +1 -0
- package/internal/motion/_animation.scss +33 -0
- package/internal/motion/animation.d.ts +80 -0
- package/internal/motion/animation.js +101 -0
- package/internal/motion/animation.js.map +1 -0
- package/internal/sass/_string-ext.scss +195 -0
- package/internal/sass/_var.scss +237 -0
- package/labs/badge/OscdBadge.d.ts +14 -0
- package/labs/badge/OscdBadge.js +15 -0
- package/labs/badge/OscdBadge.js.map +1 -0
- package/labs/badge/_badge.scss +6 -0
- package/labs/badge/internal/_badge.scss +76 -0
- package/labs/badge/internal/badge-styles.css +1 -0
- package/labs/badge/internal/badge-styles.css.map +1 -0
- package/labs/badge/internal/badge-styles.d.ts +1 -0
- package/labs/badge/internal/badge-styles.js +10 -0
- package/labs/badge/internal/badge-styles.js.map +1 -0
- package/labs/badge/internal/badge-styles.scss +10 -0
- package/labs/badge/internal/badge.d.ts +13 -0
- package/labs/badge/internal/badge.js +28 -0
- package/labs/badge/internal/badge.js.map +1 -0
- package/labs/badge/oscd-badge.d.ts +19 -0
- package/labs/badge/oscd-badge.js +21 -0
- package/labs/badge/oscd-badge.js.map +1 -0
- package/labs/behaviors/constraint-validation.d.ts +133 -0
- package/labs/behaviors/constraint-validation.js +131 -0
- package/labs/behaviors/constraint-validation.js.map +1 -0
- package/labs/behaviors/element-internals.d.ts +45 -0
- package/labs/behaviors/element-internals.js +46 -0
- package/labs/behaviors/element-internals.js.map +1 -0
- package/labs/behaviors/focusable.d.ts +39 -0
- package/labs/behaviors/focusable.js +87 -0
- package/labs/behaviors/focusable.js.map +1 -0
- package/labs/behaviors/form-associated.d.ts +199 -0
- package/labs/behaviors/form-associated.js +175 -0
- package/labs/behaviors/form-associated.js.map +1 -0
- package/labs/behaviors/mixin.d.ts +54 -0
- package/labs/behaviors/mixin.js +7 -0
- package/labs/behaviors/mixin.js.map +1 -0
- package/labs/behaviors/on-report-validity.d.ts +71 -0
- package/labs/behaviors/on-report-validity.js +289 -0
- package/labs/behaviors/on-report-validity.js.map +1 -0
- package/labs/behaviors/validators/checkbox-validator.d.ts +35 -0
- package/labs/behaviors/validators/checkbox-validator.js +34 -0
- package/labs/behaviors/validators/checkbox-validator.js.map +1 -0
- package/labs/behaviors/validators/radio-validator.d.ts +38 -0
- package/labs/behaviors/validators/radio-validator.js +67 -0
- package/labs/behaviors/validators/radio-validator.js.map +1 -0
- package/labs/behaviors/validators/select-validator.d.ts +35 -0
- package/labs/behaviors/validators/select-validator.js +35 -0
- package/labs/behaviors/validators/select-validator.js.map +1 -0
- package/labs/behaviors/validators/text-field-validator.d.ts +110 -0
- package/labs/behaviors/validators/text-field-validator.js +156 -0
- package/labs/behaviors/validators/text-field-validator.js.map +1 -0
- package/labs/behaviors/validators/validator.d.ts +96 -0
- package/labs/behaviors/validators/validator.js +73 -0
- package/labs/behaviors/validators/validator.js.map +1 -0
- package/labs/card/OscdElevatedCard.d.ts +20 -0
- package/labs/card/OscdElevatedCard.js +23 -0
- package/labs/card/OscdElevatedCard.js.map +1 -0
- package/labs/card/OscdFilledCard.d.ts +20 -0
- package/labs/card/OscdFilledCard.js +23 -0
- package/labs/card/OscdFilledCard.js.map +1 -0
- package/labs/card/OscdOutlinedCard.d.ts +20 -0
- package/labs/card/OscdOutlinedCard.js +23 -0
- package/labs/card/OscdOutlinedCard.js.map +1 -0
- package/labs/card/_elevated-card.scss +6 -0
- package/labs/card/_filled-card.scss +6 -0
- package/labs/card/_outlined-card.scss +6 -0
- package/labs/card/demo/demo.d.ts +7 -0
- package/labs/card/demo/demo.js +13 -0
- package/labs/card/demo/demo.js.map +1 -0
- package/labs/card/demo/stories.d.ts +15 -0
- package/labs/card/demo/stories.js +104 -0
- package/labs/card/demo/stories.js.map +1 -0
- package/labs/card/internal/_elevated-card.scss +35 -0
- package/labs/card/internal/_filled-card.scss +35 -0
- package/labs/card/internal/_outlined-card.scss +40 -0
- package/labs/card/internal/_shared.scss +62 -0
- package/labs/card/internal/card.d.ts +12 -0
- package/labs/card/internal/card.js +21 -0
- package/labs/card/internal/card.js.map +1 -0
- package/labs/card/internal/elevated-styles.css +1 -0
- package/labs/card/internal/elevated-styles.css.map +1 -0
- package/labs/card/internal/elevated-styles.d.ts +1 -0
- package/labs/card/internal/elevated-styles.js +10 -0
- package/labs/card/internal/elevated-styles.js.map +1 -0
- package/labs/card/internal/elevated-styles.scss +10 -0
- package/labs/card/internal/filled-styles.css +1 -0
- package/labs/card/internal/filled-styles.css.map +1 -0
- package/labs/card/internal/filled-styles.d.ts +1 -0
- package/labs/card/internal/filled-styles.js +10 -0
- package/labs/card/internal/filled-styles.js.map +1 -0
- package/labs/card/internal/filled-styles.scss +10 -0
- package/labs/card/internal/outlined-styles.css +1 -0
- package/labs/card/internal/outlined-styles.css.map +1 -0
- package/labs/card/internal/outlined-styles.d.ts +1 -0
- package/labs/card/internal/outlined-styles.js +10 -0
- package/labs/card/internal/outlined-styles.js.map +1 -0
- package/labs/card/internal/outlined-styles.scss +10 -0
- package/labs/card/internal/shared-styles.css +1 -0
- package/labs/card/internal/shared-styles.css.map +1 -0
- package/labs/card/internal/shared-styles.d.ts +1 -0
- package/labs/card/internal/shared-styles.js +10 -0
- package/labs/card/internal/shared-styles.js.map +1 -0
- package/labs/card/internal/shared-styles.scss +10 -0
- package/labs/card/oscd-elevated-card.d.ts +20 -0
- package/labs/card/oscd-elevated-card.js +23 -0
- package/labs/card/oscd-elevated-card.js.map +1 -0
- package/labs/card/oscd-filled-card.d.ts +25 -0
- package/labs/card/oscd-filled-card.js +28 -0
- package/labs/card/oscd-filled-card.js.map +1 -0
- package/labs/card/oscd-outlined-card.d.ts +20 -0
- package/labs/card/oscd-outlined-card.js +23 -0
- package/labs/card/oscd-outlined-card.js.map +1 -0
- package/list/OscdList.d.ts +34 -0
- package/list/OscdList.js +44 -0
- package/list/OscdList.js.map +1 -0
- package/list/OscdListItem.d.ts +56 -0
- package/list/OscdListItem.js +90 -0
- package/list/OscdListItem.js.map +1 -0
- package/list/oscd-list-item.d.ts +7 -0
- package/list/oscd-list-item.js +4 -0
- package/list/oscd-list-item.js.map +1 -0
- package/list/oscd-list.d.ts +7 -0
- package/list/oscd-list.js +4 -0
- package/list/oscd-list.js.map +1 -0
- package/menu/OscdMenu.d.ts +68 -0
- package/menu/OscdMenu.js +62 -0
- package/menu/OscdMenu.js.map +1 -0
- package/menu/OscdMenuItem.d.ts +32 -0
- package/menu/OscdMenuItem.js +26 -0
- package/menu/OscdMenuItem.js.map +1 -0
- package/menu/oscd-menu-item.d.ts +7 -0
- package/menu/oscd-menu-item.js +4 -0
- package/menu/oscd-menu-item.js.map +1 -0
- package/menu/oscd-menu.d.ts +7 -0
- package/menu/oscd-menu.js +4 -0
- package/menu/oscd-menu.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawer.d.ts +21 -0
- package/navigation-drawer/OscdNavigationDrawer.js +43 -0
- package/navigation-drawer/OscdNavigationDrawer.js.map +1 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +15 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.js +66 -0
- package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -0
- package/navigation-drawer/oscd-navigation-drawer-header.d.ts +7 -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 +79 -107
- package/radio/OscdRadio.d.ts +31 -0
- package/radio/OscdRadio.js +27 -0
- package/radio/OscdRadio.js.map +1 -0
- package/radio/demo/demo.d.ts +7 -0
- package/radio/demo/demo.js +14 -0
- package/radio/demo/demo.js.map +1 -0
- package/radio/demo/stories.d.ts +13 -0
- package/radio/demo/stories.js +97 -0
- package/radio/demo/stories.js.map +1 -0
- package/radio/internal/_radio.scss +198 -0
- package/radio/internal/radio-styles.css +1 -0
- package/radio/internal/radio-styles.css.map +1 -0
- package/radio/internal/radio-styles.d.ts +1 -0
- package/radio/internal/radio-styles.js +10 -0
- package/radio/internal/radio-styles.js.map +1 -0
- package/radio/internal/radio-styles.scss +10 -0
- package/radio/internal/radio.d.ts +59 -0
- package/radio/internal/radio.js +175 -0
- package/radio/internal/radio.js.map +1 -0
- package/radio/internal/single-selection-controller.d.ts +80 -0
- package/radio/internal/single-selection-controller.js +199 -0
- package/radio/internal/single-selection-controller.js.map +1 -0
- package/radio/oscd-radio.d.ts +32 -0
- package/radio/oscd-radio.js +34 -0
- package/radio/oscd-radio.js.map +1 -0
- package/ripple/OscdRipple.d.ts +5 -0
- package/ripple/OscdRipple.js +6 -0
- package/ripple/OscdRipple.js.map +1 -0
- package/ripple/_ripple.scss +6 -0
- package/ripple/internal/_ripple.scss +92 -0
- package/ripple/internal/ripple-styles.css +1 -0
- package/ripple/internal/ripple-styles.css.map +1 -0
- package/ripple/internal/ripple-styles.d.ts +1 -0
- package/ripple/internal/ripple-styles.js +10 -0
- package/ripple/internal/ripple-styles.js.map +1 -0
- package/ripple/internal/ripple-styles.scss +10 -0
- package/ripple/internal/ripple.d.ts +76 -0
- package/ripple/internal/ripple.js +425 -0
- package/ripple/internal/ripple.js.map +1 -0
- package/ripple/oscd-ripple.d.ts +29 -0
- package/ripple/oscd-ripple.js +31 -0
- package/ripple/oscd-ripple.js.map +1 -0
- package/select/OscdFilledSelect.d.ts +42 -0
- package/select/OscdFilledSelect.js +39 -0
- package/select/OscdFilledSelect.js.map +1 -0
- package/select/OscdOutlinedSelect.d.ts +42 -0
- package/select/OscdOutlinedSelect.js +39 -0
- package/select/OscdOutlinedSelect.js.map +1 -0
- package/select/OscdSelectOption.d.ts +46 -0
- package/select/OscdSelectOption.js +41 -0
- package/select/OscdSelectOption.js.map +1 -0
- package/select/oscd-filled-select.d.ts +7 -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 +7 -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 +7 -0
- package/select/oscd-select-option.js +4 -0
- package/select/oscd-select-option.js.map +1 -0
- package/tabs/OscdPrimaryTab.d.ts +22 -0
- package/tabs/OscdPrimaryTab.js +19 -0
- package/tabs/OscdPrimaryTab.js.map +1 -0
- package/tabs/OscdSecondaryTab.d.ts +22 -0
- package/tabs/OscdSecondaryTab.js +19 -0
- package/tabs/OscdSecondaryTab.js.map +1 -0
- package/tabs/OscdTabs.d.ts +22 -0
- package/tabs/OscdTabs.js +18 -0
- package/tabs/OscdTabs.js.map +1 -0
- package/tabs/oscd-primary-tab.d.ts +7 -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 +7 -0
- package/tabs/oscd-secondary-tab.js +4 -0
- package/tabs/oscd-secondary-tab.js.map +1 -0
- package/tabs/oscd-tabs.d.ts +7 -0
- package/tabs/oscd-tabs.js +4 -0
- package/tabs/oscd-tabs.js.map +1 -0
- package/textfield/OscdFilledTextField.d.ts +30 -0
- package/textfield/OscdFilledTextField.js +33 -0
- package/textfield/OscdFilledTextField.js.map +1 -0
- package/textfield/OscdOutlinedTextField.d.ts +28 -0
- package/textfield/OscdOutlinedTextField.js +31 -0
- package/textfield/OscdOutlinedTextField.js.map +1 -0
- package/textfield/oscd-filled-text-field.d.ts +7 -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 +7 -0
- package/textfield/oscd-outlined-text-field.js +4 -0
- package/textfield/oscd-outlined-text-field.js.map +1 -0
- package/tokens/_index.scss +66 -0
- package/tokens/_md-comp-assist-chip.scss +153 -0
- package/tokens/_md-comp-badge.scss +39 -0
- package/tokens/_md-comp-checkbox.scss +156 -0
- package/tokens/_md-comp-circular-progress.scss +79 -0
- package/tokens/_md-comp-dialog.scss +112 -0
- package/tokens/_md-comp-divider.scss +43 -0
- package/tokens/_md-comp-elevated-button.scss +143 -0
- package/tokens/_md-comp-elevated-card.scss +80 -0
- package/tokens/_md-comp-elevation.scss +48 -0
- package/tokens/_md-comp-fab-branded.scss +155 -0
- package/tokens/_md-comp-fab.scss +296 -0
- package/tokens/_md-comp-filled-button.scss +143 -0
- package/tokens/_md-comp-filled-card.scss +80 -0
- package/tokens/_md-comp-filled-field.scss +293 -0
- package/tokens/_md-comp-filled-icon-button.scss +119 -0
- package/tokens/_md-comp-filled-select.scss +198 -0
- package/tokens/_md-comp-filled-text-field.scss +200 -0
- package/tokens/_md-comp-filled-tonal-button.scss +143 -0
- package/tokens/_md-comp-filled-tonal-icon-button.scss +123 -0
- package/tokens/_md-comp-filter-chip.scss +265 -0
- package/tokens/_md-comp-focus-ring.scss +78 -0
- package/tokens/_md-comp-full-screen-dialog.scss +25 -0
- package/tokens/_md-comp-icon-button.scss +94 -0
- package/tokens/_md-comp-icon.scss +46 -0
- package/tokens/_md-comp-input-chip.scss +247 -0
- package/tokens/_md-comp-item.scss +88 -0
- package/tokens/_md-comp-linear-progress.scss +64 -0
- package/tokens/_md-comp-list-item.scss +173 -0
- package/tokens/_md-comp-list.scss +44 -0
- package/tokens/_md-comp-menu-item.scss +125 -0
- package/tokens/_md-comp-menu.scss +59 -0
- package/tokens/_md-comp-navigation-bar.scss +44 -0
- package/tokens/_md-comp-navigation-drawer.scss +44 -0
- package/tokens/_md-comp-outlined-button.scss +139 -0
- package/tokens/_md-comp-outlined-card.scss +86 -0
- package/tokens/_md-comp-outlined-field.scss +268 -0
- package/tokens/_md-comp-outlined-icon-button.scss +117 -0
- package/tokens/_md-comp-outlined-segmented-button.scss +123 -0
- package/tokens/_md-comp-outlined-select.scss +186 -0
- package/tokens/_md-comp-outlined-text-field.scss +187 -0
- package/tokens/_md-comp-primary-tab.scss +160 -0
- package/tokens/_md-comp-radio.scss +86 -0
- package/tokens/_md-comp-ripple.scss +48 -0
- package/tokens/_md-comp-secondary-tab.scss +158 -0
- package/tokens/_md-comp-slider.scss +117 -0
- package/tokens/_md-comp-suggestion-chip.scss +157 -0
- package/tokens/_md-comp-switch.scss +187 -0
- package/tokens/_md-comp-test-table.scss +43 -0
- package/tokens/_md-comp-text-button.scss +132 -0
- package/tokens/_md-ref-palette.scss +112 -0
- package/tokens/_md-ref-typeface.scss +46 -0
- package/tokens/_md-sys-color.scss +119 -0
- package/tokens/_md-sys-elevation.scss +31 -0
- package/tokens/_md-sys-motion.scss +12 -0
- package/tokens/_md-sys-shape.scss +102 -0
- package/tokens/_md-sys-state.scss +12 -0
- package/tokens/_md-sys-typescale.scss +149 -0
- package/tokens/internal/_shape.scss +93 -0
- package/tokens/internal/_validate.scss +109 -0
- package/tokens/v0_192/_index.scss +107 -0
- package/tokens/v0_192/_md-comp-assist-chip.scss +111 -0
- package/tokens/v0_192/_md-comp-badge.scss +61 -0
- package/tokens/v0_192/_md-comp-banner.scss +76 -0
- package/tokens/v0_192/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/v0_192/_md-comp-carousel-item.scss +66 -0
- package/tokens/v0_192/_md-comp-checkbox.scss +129 -0
- package/tokens/v0_192/_md-comp-circular-progress-indicator.scss +41 -0
- package/tokens/v0_192/_md-comp-data-table.scss +99 -0
- package/tokens/v0_192/_md-comp-date-input-modal.scss +90 -0
- package/tokens/v0_192/_md-comp-date-picker-docked.scss +247 -0
- package/tokens/v0_192/_md-comp-date-picker-modal.scss +306 -0
- package/tokens/v0_192/_md-comp-dialog.scss +124 -0
- package/tokens/v0_192/_md-comp-divider.scss +28 -0
- package/tokens/v0_192/_md-comp-elevated-button.scss +92 -0
- package/tokens/v0_192/_md-comp-elevated-card.scss +60 -0
- package/tokens/v0_192/_md-comp-extended-fab-branded.scss +89 -0
- package/tokens/v0_192/_md-comp-extended-fab-primary.scss +97 -0
- package/tokens/v0_192/_md-comp-extended-fab-secondary.scss +98 -0
- package/tokens/v0_192/_md-comp-extended-fab-surface.scss +93 -0
- package/tokens/v0_192/_md-comp-extended-fab-tertiary.scss +98 -0
- package/tokens/v0_192/_md-comp-fab-branded-large.scss +63 -0
- package/tokens/v0_192/_md-comp-fab-branded.scss +63 -0
- package/tokens/v0_192/_md-comp-fab-primary-large.scss +68 -0
- package/tokens/v0_192/_md-comp-fab-primary-small.scss +68 -0
- package/tokens/v0_192/_md-comp-fab-primary.scss +68 -0
- package/tokens/v0_192/_md-comp-fab-secondary-large.scss +69 -0
- package/tokens/v0_192/_md-comp-fab-secondary-small.scss +69 -0
- package/tokens/v0_192/_md-comp-fab-secondary.scss +69 -0
- package/tokens/v0_192/_md-comp-fab-surface-large.scss +67 -0
- package/tokens/v0_192/_md-comp-fab-surface-small.scss +67 -0
- package/tokens/v0_192/_md-comp-fab-surface.scss +67 -0
- package/tokens/v0_192/_md-comp-fab-tertiary-large.scss +69 -0
- package/tokens/v0_192/_md-comp-fab-tertiary-small.scss +69 -0
- package/tokens/v0_192/_md-comp-fab-tertiary.scss +69 -0
- package/tokens/v0_192/_md-comp-filled-autocomplete.scss +239 -0
- package/tokens/v0_192/_md-comp-filled-button.scss +92 -0
- package/tokens/v0_192/_md-comp-filled-card.scss +62 -0
- package/tokens/v0_192/_md-comp-filled-icon-button.scss +83 -0
- package/tokens/v0_192/_md-comp-filled-menu-button.scss +101 -0
- package/tokens/v0_192/_md-comp-filled-select.scss +273 -0
- package/tokens/v0_192/_md-comp-filled-text-field.scss +193 -0
- package/tokens/v0_192/_md-comp-filled-tonal-button.scss +102 -0
- package/tokens/v0_192/_md-comp-filled-tonal-icon-button.scss +90 -0
- package/tokens/v0_192/_md-comp-filter-chip.scss +210 -0
- package/tokens/v0_192/_md-comp-full-screen-dialog.scss +114 -0
- package/tokens/v0_192/_md-comp-icon-button.scss +74 -0
- package/tokens/v0_192/_md-comp-input-chip.scss +187 -0
- package/tokens/v0_192/_md-comp-linear-progress-indicator.scss +43 -0
- package/tokens/v0_192/_md-comp-list.scss +255 -0
- package/tokens/v0_192/_md-comp-menu.scss +44 -0
- package/tokens/v0_192/_md-comp-navigation-bar.scss +115 -0
- package/tokens/v0_192/_md-comp-navigation-drawer.scss +165 -0
- package/tokens/v0_192/_md-comp-navigation-rail.scss +119 -0
- package/tokens/v0_192/_md-comp-outlined-autocomplete.scss +229 -0
- package/tokens/v0_192/_md-comp-outlined-button.scss +87 -0
- package/tokens/v0_192/_md-comp-outlined-card.scss +66 -0
- package/tokens/v0_192/_md-comp-outlined-icon-button.scss +83 -0
- package/tokens/v0_192/_md-comp-outlined-menu-button.scss +97 -0
- package/tokens/v0_192/_md-comp-outlined-segmented-button.scss +115 -0
- package/tokens/v0_192/_md-comp-outlined-select.scss +263 -0
- package/tokens/v0_192/_md-comp-outlined-text-field.scss +174 -0
- package/tokens/v0_192/_md-comp-plain-tooltip.scss +58 -0
- package/tokens/v0_192/_md-comp-primary-navigation-tab.scss +124 -0
- package/tokens/v0_192/_md-comp-radio-button.scss +71 -0
- package/tokens/v0_192/_md-comp-rich-tooltip.scss +122 -0
- package/tokens/v0_192/_md-comp-scrim.scss +28 -0
- package/tokens/v0_192/_md-comp-search-bar.scss +100 -0
- package/tokens/v0_192/_md-comp-search-view.scss +94 -0
- package/tokens/v0_192/_md-comp-secondary-navigation-tab.scss +87 -0
- package/tokens/v0_192/_md-comp-sheet-bottom.scss +46 -0
- package/tokens/v0_192/_md-comp-sheet-floating.scss +35 -0
- package/tokens/v0_192/_md-comp-sheet-side.scss +94 -0
- package/tokens/v0_192/_md-comp-slider.scss +118 -0
- package/tokens/v0_192/_md-comp-snackbar.scss +130 -0
- package/tokens/v0_192/_md-comp-standard-menu-button.scss +101 -0
- package/tokens/v0_192/_md-comp-suggestion-chip.scss +127 -0
- package/tokens/v0_192/_md-comp-switch.scss +141 -0
- package/tokens/v0_192/_md-comp-text-button.scss +80 -0
- package/tokens/v0_192/_md-comp-time-input.scss +220 -0
- package/tokens/v0_192/_md-comp-time-picker.scss +267 -0
- package/tokens/v0_192/_md-comp-top-app-bar-large.scss +64 -0
- package/tokens/v0_192/_md-comp-top-app-bar-medium.scss +64 -0
- package/tokens/v0_192/_md-comp-top-app-bar-small-centered.scss +71 -0
- package/tokens/v0_192/_md-comp-top-app-bar-small.scss +67 -0
- package/tokens/v0_192/_md-ref-palette.scss +109 -0
- package/tokens/v0_192/_md-ref-typeface.scss +23 -0
- package/tokens/v0_192/_md-sys-color.scss +135 -0
- package/tokens/v0_192/_md-sys-elevation.scss +24 -0
- package/tokens/v0_192/_md-sys-motion.scss +55 -0
- package/tokens/v0_192/_md-sys-shape.scss +33 -0
- package/tokens/v0_192/_md-sys-state.scss +22 -0
- package/tokens/v0_192/_md-sys-typescale.scss +286 -0
- package/tokens/v0_192/index.test.css +1 -0
- package/tokens/v0_192/index.test.css.map +1 -0
- package/tokens/v0_192/index.test.scss +584 -0
- package/tokens/v0_192/lib.test.css +1 -0
- package/tokens/v0_192/lib.test.css.map +1 -0
- package/tokens/v0_192/lib.test.scss +663 -0
- package/utils/storybook/getStorybookHelpers.d.ts +4 -0
- package/utils/storybook/getStorybookHelpers.js +52 -0
- package/utils/storybook/getStorybookHelpers.js.map +1 -0
- package/utils/storybook/scopedWcDecorator.d.ts +2 -0
- package/utils/storybook/scopedWcDecorator.js +38 -0
- package/utils/storybook/scopedWcDecorator.js.map +1 -0
- package/utils/storybook/stories/components/knob-ui-components.d.ts +103 -0
- package/utils/storybook/stories/components/knob-ui-components.js +414 -0
- package/utils/storybook/stories/components/knob-ui-components.js.map +1 -0
- package/utils/storybook/stories/components/stories-renderer.d.ts +40 -0
- package/utils/storybook/stories/components/stories-renderer.js +204 -0
- package/utils/storybook/stories/components/stories-renderer.js.map +1 -0
- package/utils/storybook/stories/components/story-knob-panel.d.ts +53 -0
- package/utils/storybook/stories/components/story-knob-panel.js +333 -0
- package/utils/storybook/stories/components/story-knob-panel.js.map +1 -0
- package/utils/storybook/stories/components/story-renderer.d.ts +27 -0
- package/utils/storybook/stories/components/story-renderer.js +84 -0
- package/utils/storybook/stories/components/story-renderer.js.map +1 -0
- package/utils/storybook/stories/index.d.ts +8 -0
- package/utils/storybook/stories/index.js +11 -0
- package/utils/storybook/stories/index.js.map +1 -0
- package/utils/storybook/stories/knobs.d.ts +143 -0
- package/utils/storybook/stories/knobs.js +177 -0
- package/utils/storybook/stories/knobs.js.map +1 -0
- package/utils/storybook/stories/material-collection.d.ts +75 -0
- package/utils/storybook/stories/material-collection.js +59 -0
- package/utils/storybook/stories/material-collection.js.map +1 -0
- package/utils/storybook/stories/story.d.ts +85 -0
- package/utils/storybook/stories/story.js +142 -0
- package/utils/storybook/stories/story.js.map +1 -0
- package/utils/storybook/stories/theme-loader.d.ts +13 -0
- package/utils/storybook/stories/theme-loader.js +43 -0
- package/utils/storybook/stories/theme-loader.js.map +1 -0
- package/utils/storybook/themingDecorator.d.ts +19 -0
- package/utils/storybook/themingDecorator.js +100 -0
- package/utils/storybook/themingDecorator.js.map +1 -0
|
@@ -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 { LitElement } from 'lit';
|
|
12
|
+
import { OscdElevation } from '../elevation/OscdElevation.js';
|
|
13
|
+
declare const OscdAppBar_base: typeof LitElement & import("@open-wc/scoped-elements/lit-element.js").ScopedElementsHostConstructor;
|
|
14
|
+
/**
|
|
15
|
+
* @tag oscd-app-bar
|
|
16
|
+
* @class OscdAppBar
|
|
17
|
+
* @extends ScopedElementsMixin(LitElement)
|
|
18
|
+
* @summary A component that renders an app bar.
|
|
19
|
+
*
|
|
20
|
+
* The app bar is a top-level navigation component that displays information and actions relating to the current screen.
|
|
21
|
+
* It can contain a title, navigation icons, and action icons.
|
|
22
|
+
* The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
|
|
23
|
+
*
|
|
24
|
+
* @slot alignStart - Slot for action icons at the start of the app bar.
|
|
25
|
+
* @slot alignMiddle - Slot for the middle content of the app bar.
|
|
26
|
+
* @slot alignEnd - Slot for action icons at the end of the app bar.
|
|
27
|
+
* @slot Default - Slot for additional content which will appear immediately under the main app bar.
|
|
28
|
+
*
|
|
29
|
+
* @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
|
|
30
|
+
* @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
|
|
31
|
+
* @cssprop --oscd-app-bar-color - The color of the app bar.
|
|
32
|
+
* @cssprop --oscd-app-bar-background-color - The background color of the app bar.
|
|
33
|
+
* @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.
|
|
34
|
+
* @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.
|
|
35
|
+
* @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.
|
|
36
|
+
* @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.
|
|
37
|
+
* @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class OscdAppBar extends OscdAppBar_base {
|
|
41
|
+
static get scopedElements(): {
|
|
42
|
+
'oscd-elevation': typeof OscdElevation;
|
|
43
|
+
};
|
|
44
|
+
static styles: import("lit").CSSResult;
|
|
45
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { LitElement, html, css } from 'lit';
|
|
12
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
|
|
13
|
+
import { OscdElevation } from '../elevation/OscdElevation.js';
|
|
14
|
+
/**
|
|
15
|
+
* @tag oscd-app-bar
|
|
16
|
+
* @class OscdAppBar
|
|
17
|
+
* @extends ScopedElementsMixin(LitElement)
|
|
18
|
+
* @summary A component that renders an app bar.
|
|
19
|
+
*
|
|
20
|
+
* The app bar is a top-level navigation component that displays information and actions relating to the current screen.
|
|
21
|
+
* It can contain a title, navigation icons, and action icons.
|
|
22
|
+
* The app bar is typically used in conjunction with a navigation drawer or bottom navigation.
|
|
23
|
+
*
|
|
24
|
+
* @slot alignStart - Slot for action icons at the start of the app bar.
|
|
25
|
+
* @slot alignMiddle - Slot for the middle content of the app bar.
|
|
26
|
+
* @slot alignEnd - Slot for action icons at the end of the app bar.
|
|
27
|
+
* @slot Default - Slot for additional content which will appear immediately under the main app bar.
|
|
28
|
+
*
|
|
29
|
+
* @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.
|
|
30
|
+
* @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.
|
|
31
|
+
* @cssprop --oscd-app-bar-color - The color of the app bar.
|
|
32
|
+
* @cssprop --oscd-app-bar-background-color - The background color of the app bar.
|
|
33
|
+
* @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.
|
|
34
|
+
* @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.
|
|
35
|
+
* @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.
|
|
36
|
+
* @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.
|
|
37
|
+
* @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export class OscdAppBar extends ScopedElementsMixin(LitElement) {
|
|
41
|
+
static get scopedElements() {
|
|
42
|
+
return {
|
|
43
|
+
'oscd-elevation': OscdElevation,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
static { this.styles = css `
|
|
47
|
+
:host {
|
|
48
|
+
--md-elevation-level: var(--oscd-app-bar-elevation, 3);
|
|
49
|
+
--md-elevation-shadow-color: var(
|
|
50
|
+
--oscd-app-bar-shadow-color,
|
|
51
|
+
var(--md-sys-color-shadow, #000)
|
|
52
|
+
);
|
|
53
|
+
--app-bar-color: var(
|
|
54
|
+
--oscd-app-bar-color,
|
|
55
|
+
var(--md-sys-color-on-primary, #1d1b20)
|
|
56
|
+
);
|
|
57
|
+
--app-bar-background-color: var(
|
|
58
|
+
--oscd-app-bar-background-color,
|
|
59
|
+
var(--md-sys-color-primary, #fff)
|
|
60
|
+
);
|
|
61
|
+
--app-bar-title-font-family: var(
|
|
62
|
+
--oscd-app-bar-title-font-family,
|
|
63
|
+
var(
|
|
64
|
+
--md-sys-typescale-body-large-font,
|
|
65
|
+
var(--md-ref-typeface-plain, Roboto)
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
--app-bar-title-font-size: var(
|
|
69
|
+
--oscd-app-bar-title-font-size,
|
|
70
|
+
var(--md-sys-typescale-body-large-size, 1.25rem)
|
|
71
|
+
);
|
|
72
|
+
--app-bar-title-line-height: var(
|
|
73
|
+
--oscd-app-bar-title-line-height,
|
|
74
|
+
var(--md-sys-typescale-body-large-line-height, 2rem)
|
|
75
|
+
);
|
|
76
|
+
--app-bar-title-font-weight: var(
|
|
77
|
+
--oscd-app-bar-title-font-weight,
|
|
78
|
+
var(
|
|
79
|
+
--md-sys-typescale-body-large-weight,
|
|
80
|
+
var(--md-ref-typeface-weight-regular, 500)
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
--md-icon-button-icon-color: var(--app-bar-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
header {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
flex-grow: 1;
|
|
90
|
+
position: sticky;
|
|
91
|
+
top: 0;
|
|
92
|
+
z-index: 4;
|
|
93
|
+
color: var(--app-bar-color);
|
|
94
|
+
background-color: var(--app-bar-background-color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.main-header {
|
|
98
|
+
padding: 0 12px;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-grow: 1;
|
|
101
|
+
align-items: center;
|
|
102
|
+
height: var(--app-bar-height, 54px);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (max-width: 599px) {
|
|
106
|
+
.main-header {
|
|
107
|
+
height: var(--app-bar-small-height, 48px);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
::slotted([slot='title']) {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: 4px;
|
|
115
|
+
margin-left: 16px;
|
|
116
|
+
font-family: var(--app-bar-title-font-family);
|
|
117
|
+
font-size: var(--app-bar-title-font-size);
|
|
118
|
+
font-weight: var(--app-bar-title-font-weight);
|
|
119
|
+
line-height: var(--app-bar-title-line-height);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sub-header {
|
|
123
|
+
display: flex;
|
|
124
|
+
width: 100%;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.spacer {
|
|
128
|
+
flex: 1;
|
|
129
|
+
}
|
|
130
|
+
`; }
|
|
131
|
+
// eslint-disable-next-line class-methods-use-this
|
|
132
|
+
render() {
|
|
133
|
+
return html `
|
|
134
|
+
<header>
|
|
135
|
+
<div>
|
|
136
|
+
<div class="main-header">
|
|
137
|
+
<slot name="alignStart"></slot>
|
|
138
|
+
<span class="spacer"></span>
|
|
139
|
+
<slot name="alignMiddle"></slot>
|
|
140
|
+
<span class="spacer"></span>
|
|
141
|
+
<slot name="alignEnd"></slot>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="sub-header">
|
|
144
|
+
<slot></slot>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<oscd-elevation part="elevation"></oscd-elevation>
|
|
148
|
+
</header>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=OscdAppBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdAppBar.js","sourceRoot":"","sources":["OscdAppBar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,UAAW,SAAQ,mBAAmB,CAAC,UAAU,CAAC;IAC7D,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,gBAAgB,EAAE,aAAa;SAChC,CAAC;IACJ,CAAC;aAEe,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoF3B,CAAC;IAEF,kDAAkD;IACzC,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;;KAgBV,CAAC;IACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { LitElement, html, css } from 'lit';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { OscdElevation } from '../elevation/OscdElevation.js';\n\n/**\n * @tag oscd-app-bar\n * @class OscdAppBar\n * @extends ScopedElementsMixin(LitElement)\n * @summary A component that renders an app bar.\n *\n * The app bar is a top-level navigation component that displays information and actions relating to the current screen.\n * It can contain a title, navigation icons, and action icons.\n * The app bar is typically used in conjunction with a navigation drawer or bottom navigation.\n *\n * @slot alignStart - Slot for action icons at the start of the app bar.\n * @slot alignMiddle - Slot for the middle content of the app bar.\n * @slot alignEnd - Slot for action icons at the end of the app bar.\n * @slot Default - Slot for additional content which will appear immediately under the main app bar.\n *\n * @cssprop --oscd-app-bar-elevation - The elevation level of the app bar.\n * @cssprop --oscd-app-bar-shadow-color - The shadow color of the app bar.\n * @cssprop --oscd-app-bar-color - The color of the app bar.\n * @cssprop --oscd-app-bar-background-color - The background color of the app bar.\n * @cssprop --oscd-app-bar-title-font-family - The font family of the app bar title.\n * @cssprop --oscd-app-bar-title-font-size - The font size of the app bar title.\n * @cssprop --oscd-app-bar-title-line-height - The line height of the app bar title.\n * @cssprop --oscd-app-bar-title-font-weight - The font weight of the app bar title.\n * @cssprop --md-icon-button-icon-color - The color of the icon button in the app bar.\n *\n */\nexport class OscdAppBar extends ScopedElementsMixin(LitElement) {\n static get scopedElements() {\n return {\n 'oscd-elevation': OscdElevation,\n };\n }\n\n static override styles = css`\n :host {\n --md-elevation-level: var(--oscd-app-bar-elevation, 3);\n --md-elevation-shadow-color: var(\n --oscd-app-bar-shadow-color,\n var(--md-sys-color-shadow, #000)\n );\n --app-bar-color: var(\n --oscd-app-bar-color,\n var(--md-sys-color-on-primary, #1d1b20)\n );\n --app-bar-background-color: var(\n --oscd-app-bar-background-color,\n var(--md-sys-color-primary, #fff)\n );\n --app-bar-title-font-family: var(\n --oscd-app-bar-title-font-family,\n var(\n --md-sys-typescale-body-large-font,\n var(--md-ref-typeface-plain, Roboto)\n )\n );\n --app-bar-title-font-size: var(\n --oscd-app-bar-title-font-size,\n var(--md-sys-typescale-body-large-size, 1.25rem)\n );\n --app-bar-title-line-height: var(\n --oscd-app-bar-title-line-height,\n var(--md-sys-typescale-body-large-line-height, 2rem)\n );\n --app-bar-title-font-weight: var(\n --oscd-app-bar-title-font-weight,\n var(\n --md-sys-typescale-body-large-weight,\n var(--md-ref-typeface-weight-regular, 500)\n )\n );\n --md-icon-button-icon-color: var(--app-bar-color);\n }\n\n header {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n position: sticky;\n top: 0;\n z-index: 4;\n color: var(--app-bar-color);\n background-color: var(--app-bar-background-color);\n }\n\n .main-header {\n padding: 0 12px;\n display: flex;\n flex-grow: 1;\n align-items: center;\n height: var(--app-bar-height, 54px);\n }\n\n @media (max-width: 599px) {\n .main-header {\n height: var(--app-bar-small-height, 48px);\n }\n }\n\n ::slotted([slot='title']) {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 16px;\n font-family: var(--app-bar-title-font-family);\n font-size: var(--app-bar-title-font-size);\n font-weight: var(--app-bar-title-font-weight);\n line-height: var(--app-bar-title-line-height);\n }\n\n .sub-header {\n display: flex;\n width: 100%;\n }\n\n .spacer {\n flex: 1;\n }\n `;\n\n // eslint-disable-next-line class-methods-use-this\n override render() {\n return html`\n <header>\n <div>\n <div class=\"main-header\">\n <slot name=\"alignStart\"></slot>\n <span class=\"spacer\"></span>\n <slot name=\"alignMiddle\"></slot>\n <span class=\"spacer\"></span>\n <slot name=\"alignEnd\"></slot>\n </div>\n <div class=\"sub-header\">\n <slot></slot>\n </div>\n </div>\n <oscd-elevation part=\"elevation\"></oscd-elevation>\n </header>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OscdAppBar } from './OscdAppBar.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'oscd-app-bar': OscdAppBar;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { OscdAppBar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OscdAppBar } from './OscdAppBar.js';
|
|
7
|
+
window.customElements.define('oscd-app-bar', OscdAppBar);
|
|
8
|
+
export { OscdAppBar };
|
|
9
|
+
//# sourceMappingURL=oscd-app-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-app-bar.js","sourceRoot":"","sources":["oscd-app-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OscdAppBar } from './OscdAppBar.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-app-bar': OscdAppBar;\n }\n}\n\nwindow.customElements.define('oscd-app-bar', OscdAppBar);\nexport { OscdAppBar };\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { FilledButton } from '@material/web/button/internal/filled-button.js';
|
|
12
|
+
import { CSSResult } from '@lit/reactive-element';
|
|
13
|
+
/**
|
|
14
|
+
* @tag "oscd-filled-button"
|
|
15
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
16
|
+
* document, or liking a comment.
|
|
17
|
+
*
|
|
18
|
+
* __Emphasis:__ High emphasis – For the primary, most important, or most common
|
|
19
|
+
* action on a screen
|
|
20
|
+
*
|
|
21
|
+
* __Rationale:__ The filled button’s contrasting surface color makes it the
|
|
22
|
+
* most prominent button after the FAB. It’s used for final or unblocking
|
|
23
|
+
* actions in a flow.
|
|
24
|
+
*
|
|
25
|
+
* __Example usages:__
|
|
26
|
+
* - Save
|
|
27
|
+
* - Confirm
|
|
28
|
+
* - Done
|
|
29
|
+
*
|
|
30
|
+
* @event click Fired when the user clicks the button.
|
|
31
|
+
*
|
|
32
|
+
* @final
|
|
33
|
+
* @suppress {visibility}
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdFilledButton extends FilledButton {
|
|
37
|
+
static styles: CSSResult[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { FilledButton } from '@material/web/button/internal/filled-button.js';
|
|
12
|
+
import { styles as filledStyles } from '@material/web/button/internal/filled-styles.js';
|
|
13
|
+
import { styles as sharedElevationStyles } from '@material/web/button/internal/shared-elevation-styles.js';
|
|
14
|
+
import { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';
|
|
15
|
+
/**
|
|
16
|
+
* @tag "oscd-filled-button"
|
|
17
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
18
|
+
* document, or liking a comment.
|
|
19
|
+
*
|
|
20
|
+
* __Emphasis:__ High emphasis – For the primary, most important, or most common
|
|
21
|
+
* action on a screen
|
|
22
|
+
*
|
|
23
|
+
* __Rationale:__ The filled button’s contrasting surface color makes it the
|
|
24
|
+
* most prominent button after the FAB. It’s used for final or unblocking
|
|
25
|
+
* actions in a flow.
|
|
26
|
+
*
|
|
27
|
+
* __Example usages:__
|
|
28
|
+
* - Save
|
|
29
|
+
* - Confirm
|
|
30
|
+
* - Done
|
|
31
|
+
*
|
|
32
|
+
* @event click Fired when the user clicks the button.
|
|
33
|
+
*
|
|
34
|
+
* @final
|
|
35
|
+
* @suppress {visibility}
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export class OscdFilledButton extends FilledButton {
|
|
39
|
+
static { this.styles = [
|
|
40
|
+
sharedStyles,
|
|
41
|
+
sharedElevationStyles,
|
|
42
|
+
filledStyles,
|
|
43
|
+
]; }
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=OscdFilledButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledButton.js","sourceRoot":"","sources":["OscdFilledButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAC3G,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAGxF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;aAChC,WAAM,GAAgB;QACpC,YAAY;QACZ,qBAAqB;QACrB,YAAY;KACb,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { FilledButton } from '@material/web/button/internal/filled-button.js';\nimport { styles as filledStyles } from '@material/web/button/internal/filled-styles.js';\nimport { styles as sharedElevationStyles } from '@material/web/button/internal/shared-elevation-styles.js';\nimport { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';\nimport { CSSResult } from '@lit/reactive-element';\n\n/**\n * @tag \"oscd-filled-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * __Emphasis:__ High emphasis – For the primary, most important, or most common\n * action on a screen\n *\n * __Rationale:__ The filled button’s contrasting surface color makes it the\n * most prominent button after the FAB. It’s used for final or unblocking\n * actions in a flow.\n *\n * __Example usages:__\n * - Save\n * - Confirm\n * - Done\n *\n * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdFilledButton extends FilledButton {\n static override styles: CSSResult[] = [\n sharedStyles,\n sharedElevationStyles,\n filledStyles,\n ];\n}\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2024 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
/* This is a PoC unit test.
|
|
8
|
+
* Purpose was to show how we can copy 1:1 the tests from Material Web Components
|
|
9
|
+
* and use them for our custom elements.
|
|
10
|
+
* This has been left in place as an example of how its done.
|
|
11
|
+
*/
|
|
12
|
+
import { html } from 'lit';
|
|
13
|
+
import { customElement } from 'lit/decorators.js';
|
|
14
|
+
import { ButtonHarness } from '@material/web/button/harness.js';
|
|
15
|
+
import { Environment } from '../testing/environment.js';
|
|
16
|
+
import { OscdFilledButton as Button } from './OscdFilledButton.js';
|
|
17
|
+
let TestButton = class TestButton extends Button {
|
|
18
|
+
};
|
|
19
|
+
TestButton = __decorate([
|
|
20
|
+
customElement('test-button')
|
|
21
|
+
], TestButton);
|
|
22
|
+
describe('Button', () => {
|
|
23
|
+
const env = new Environment();
|
|
24
|
+
async function setupTest() {
|
|
25
|
+
const button = new TestButton();
|
|
26
|
+
env.render(html `${button}`);
|
|
27
|
+
await env.waitForStability();
|
|
28
|
+
return { button, harness: new ButtonHarness(button) };
|
|
29
|
+
}
|
|
30
|
+
it('should not be focusable when disabled', async () => {
|
|
31
|
+
// Arrange
|
|
32
|
+
const { button } = await setupTest();
|
|
33
|
+
button.disabled = true;
|
|
34
|
+
await env.waitForStability();
|
|
35
|
+
// Act
|
|
36
|
+
button.focus();
|
|
37
|
+
// Assert
|
|
38
|
+
expect(document.activeElement)
|
|
39
|
+
.withContext('disabled button should not be focused')
|
|
40
|
+
.not.toBe(button);
|
|
41
|
+
});
|
|
42
|
+
it('should be focusable when soft-disabled', async () => {
|
|
43
|
+
// Arrange
|
|
44
|
+
const { button } = await setupTest();
|
|
45
|
+
button.softDisabled = true;
|
|
46
|
+
await env.waitForStability();
|
|
47
|
+
// Act
|
|
48
|
+
button.focus();
|
|
49
|
+
// Assert
|
|
50
|
+
expect(document.activeElement)
|
|
51
|
+
.withContext('soft-disabled button should be focused')
|
|
52
|
+
.toBe(button);
|
|
53
|
+
});
|
|
54
|
+
it('should not be clickable when disabled', async () => {
|
|
55
|
+
// Arrange
|
|
56
|
+
const clickListener = jasmine.createSpy('clickListener');
|
|
57
|
+
const { button } = await setupTest();
|
|
58
|
+
button.disabled = true;
|
|
59
|
+
button.addEventListener('click', clickListener);
|
|
60
|
+
await env.waitForStability();
|
|
61
|
+
// Act
|
|
62
|
+
button.click();
|
|
63
|
+
// Assert
|
|
64
|
+
expect(clickListener).not.toHaveBeenCalled();
|
|
65
|
+
});
|
|
66
|
+
it('should not be clickable when soft-disabled', async () => {
|
|
67
|
+
// Arrange
|
|
68
|
+
const clickListener = jasmine.createSpy('clickListener');
|
|
69
|
+
const { button } = await setupTest();
|
|
70
|
+
button.softDisabled = true;
|
|
71
|
+
button.addEventListener('click', clickListener);
|
|
72
|
+
await env.waitForStability();
|
|
73
|
+
// Act
|
|
74
|
+
button.click();
|
|
75
|
+
// Assert
|
|
76
|
+
expect(clickListener).not.toHaveBeenCalled();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=OscdFilledButton.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdFilledButton.spec.js","sourceRoot":"","sources":["OscdFilledButton.spec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGnE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,MAAM;CAAG,CAAA;AAA5B,UAAU;IADf,aAAa,CAAC,aAAa,CAAC;GACvB,UAAU,CAAkB;AAElC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;IAE9B,KAAK,UAAU,SAAS;QACtB,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAA,GAAG,MAAM,EAAE,CAAC,CAAC;QAC5B,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,UAAU;QACV,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAE7B,MAAM;QACN,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,SAAS;QACT,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC;aAC3B,WAAW,CAAC,uCAAuC,CAAC;aACpD,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,UAAU;QACV,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAE7B,MAAM;QACN,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,SAAS;QACT,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC;aAC3B,WAAW,CAAC,wCAAwC,CAAC;aACrD,IAAI,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,UAAU;QACV,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACzD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAChD,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAE7B,MAAM;QACN,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,SAAS;QACT,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,UAAU;QACV,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACzD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,CAAC;QACrC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAChD,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAE7B,MAAM;QACN,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,SAAS;QACT,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* This is a PoC unit test.\n * Purpose was to show how we can copy 1:1 the tests from Material Web Components\n * and use them for our custom elements.\n * This has been left in place as an example of how its done.\n */\n\nimport { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { ButtonHarness } from '@material/web/button/harness.js';\nimport { Environment } from '../testing/environment.js';\n\nimport { OscdFilledButton as Button } from './OscdFilledButton.js';\n\n@customElement('test-button')\nclass TestButton extends Button {}\n\ndescribe('Button', () => {\n const env = new Environment();\n\n async function setupTest() {\n const button = new TestButton();\n env.render(html`${button}`);\n await env.waitForStability();\n return { button, harness: new ButtonHarness(button) };\n }\n\n it('should not be focusable when disabled', async () => {\n // Arrange\n const { button } = await setupTest();\n button.disabled = true;\n await env.waitForStability();\n\n // Act\n button.focus();\n\n // Assert\n expect(document.activeElement)\n .withContext('disabled button should not be focused')\n .not.toBe(button);\n });\n\n it('should be focusable when soft-disabled', async () => {\n // Arrange\n const { button } = await setupTest();\n button.softDisabled = true;\n await env.waitForStability();\n\n // Act\n button.focus();\n\n // Assert\n expect(document.activeElement)\n .withContext('soft-disabled button should be focused')\n .toBe(button);\n });\n\n it('should not be clickable when disabled', async () => {\n // Arrange\n const clickListener = jasmine.createSpy('clickListener');\n const { button } = await setupTest();\n button.disabled = true;\n button.addEventListener('click', clickListener);\n await env.waitForStability();\n\n // Act\n button.click();\n\n // Assert\n expect(clickListener).not.toHaveBeenCalled();\n });\n\n it('should not be clickable when soft-disabled', async () => {\n // Arrange\n const clickListener = jasmine.createSpy('clickListener');\n const { button } = await setupTest();\n button.softDisabled = true;\n button.addEventListener('click', clickListener);\n await env.waitForStability();\n\n // Act\n button.click();\n\n // Assert\n expect(clickListener).not.toHaveBeenCalled();\n });\n});\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
11
|
+
import { CSSResultOrNative } from 'lit';
|
|
12
|
+
import { OutlinedButton } from '@material/web/button/internal/outlined-button.js';
|
|
13
|
+
/**
|
|
14
|
+
* @tag "oscd-outlined-button"
|
|
15
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
16
|
+
* document, or liking a comment.
|
|
17
|
+
*
|
|
18
|
+
* __Emphasis:__ Medium emphasis – For important actions that don’t distract
|
|
19
|
+
* from other onscreen elements.
|
|
20
|
+
*
|
|
21
|
+
* __Rationale:__ Use an outlined button for actions that need attention but
|
|
22
|
+
* aren’t the primary action, such as “See all” or “Add to cart.” This is also
|
|
23
|
+
* the button to use for giving someone the opportunity to change their mind or
|
|
24
|
+
* escape a flow.
|
|
25
|
+
*
|
|
26
|
+
* __Example usages:__
|
|
27
|
+
* - Reply
|
|
28
|
+
* - View all
|
|
29
|
+
* - Add to cart
|
|
30
|
+
* - Take out of trash
|
|
31
|
+
*
|
|
32
|
+
* @event click Fired when the user clicks the button.
|
|
33
|
+
*
|
|
34
|
+
* @final
|
|
35
|
+
* @suppress {visibility}
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare class OscdOutlinedButton extends OutlinedButton {
|
|
39
|
+
static styles: CSSResultOrNative[];
|
|
40
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OutlinedButton } from '@material/web/button/internal/outlined-button.js';
|
|
7
|
+
import { styles as outlinedStyles } from '@material/web/button/internal/outlined-styles.js';
|
|
8
|
+
import { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';
|
|
9
|
+
/**
|
|
10
|
+
* @tag "oscd-outlined-button"
|
|
11
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
12
|
+
* document, or liking a comment.
|
|
13
|
+
*
|
|
14
|
+
* __Emphasis:__ Medium emphasis – For important actions that don’t distract
|
|
15
|
+
* from other onscreen elements.
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ Use an outlined button for actions that need attention but
|
|
18
|
+
* aren’t the primary action, such as “See all” or “Add to cart.” This is also
|
|
19
|
+
* the button to use for giving someone the opportunity to change their mind or
|
|
20
|
+
* escape a flow.
|
|
21
|
+
*
|
|
22
|
+
* __Example usages:__
|
|
23
|
+
* - Reply
|
|
24
|
+
* - View all
|
|
25
|
+
* - Add to cart
|
|
26
|
+
* - Take out of trash
|
|
27
|
+
*
|
|
28
|
+
* @event click Fired when the user clicks the button.
|
|
29
|
+
*
|
|
30
|
+
* @final
|
|
31
|
+
* @suppress {visibility}
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export class OscdOutlinedButton extends OutlinedButton {
|
|
35
|
+
static { this.styles = [sharedStyles, outlinedStyles]; }
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=OscdOutlinedButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdOutlinedButton.js","sourceRoot":"","sources":["OscdOutlinedButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;aACpC,WAAM,GAAwB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from 'lit';\n\nimport { OutlinedButton } from '@material/web/button/internal/outlined-button.js';\nimport { styles as outlinedStyles } from '@material/web/button/internal/outlined-styles.js';\nimport { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';\n\n/**\n * @tag \"oscd-outlined-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * __Emphasis:__ Medium emphasis – For important actions that don’t distract\n * from other onscreen elements.\n *\n * __Rationale:__ Use an outlined button for actions that need attention but\n * aren’t the primary action, such as “See all” or “Add to cart.” This is also\n * the button to use for giving someone the opportunity to change their mind or\n * escape a flow.\n *\n * __Example usages:__\n * - Reply\n * - View all\n * - Add to cart\n * - Take out of trash\n *\n * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdOutlinedButton extends OutlinedButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, outlinedStyles];\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { TextButton } from '@material/web/button/internal/text-button.js';
|
|
13
|
+
/**
|
|
14
|
+
* @tag "oscd-text-button"
|
|
15
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
16
|
+
* document, or liking a comment.
|
|
17
|
+
*
|
|
18
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
19
|
+
* least amount of prominence
|
|
20
|
+
*
|
|
21
|
+
* __Rationale:__ Text buttons have less visual prominence, so should be used
|
|
22
|
+
* for low emphasis actions, such as an alternative option.
|
|
23
|
+
*
|
|
24
|
+
* __Example usages:__
|
|
25
|
+
* - Learn more
|
|
26
|
+
* - View all
|
|
27
|
+
* - Change account
|
|
28
|
+
* - Turn on
|
|
29
|
+
*
|
|
30
|
+
* @event click Fired when the user clicks the button.
|
|
31
|
+
*
|
|
32
|
+
* @final
|
|
33
|
+
* @suppress {visibility}
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare class OscdTextButton extends TextButton {
|
|
37
|
+
static styles: CSSResultOrNative[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';
|
|
7
|
+
import { TextButton } from '@material/web/button/internal/text-button.js';
|
|
8
|
+
import { styles as textStyles } from '@material/web/button/internal/text-styles.js';
|
|
9
|
+
/**
|
|
10
|
+
* @tag "oscd-text-button"
|
|
11
|
+
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
12
|
+
* document, or liking a comment.
|
|
13
|
+
*
|
|
14
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
15
|
+
* least amount of prominence
|
|
16
|
+
*
|
|
17
|
+
* __Rationale:__ Text buttons have less visual prominence, so should be used
|
|
18
|
+
* for low emphasis actions, such as an alternative option.
|
|
19
|
+
*
|
|
20
|
+
* __Example usages:__
|
|
21
|
+
* - Learn more
|
|
22
|
+
* - View all
|
|
23
|
+
* - Change account
|
|
24
|
+
* - Turn on
|
|
25
|
+
*
|
|
26
|
+
* @event click Fired when the user clicks the button.
|
|
27
|
+
*
|
|
28
|
+
* @final
|
|
29
|
+
* @suppress {visibility}
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export class OscdTextButton extends TextButton {
|
|
33
|
+
static { this.styles = [sharedStyles, textStyles]; }
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=OscdTextButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdTextButton.js","sourceRoot":"","sources":["OscdTextButton.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;aAC5B,WAAM,GAAwB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from 'lit';\nimport { styles as sharedStyles } from '@material/web/button/internal/shared-styles.js';\nimport { TextButton } from '@material/web/button/internal/text-button.js';\nimport { styles as textStyles } from '@material/web/button/internal/text-styles.js';\n\n/**\n * @tag \"oscd-text-button\"\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence\n *\n * __Rationale:__ Text buttons have less visual prominence, so should be used\n * for low emphasis actions, such as an alternative option.\n *\n * __Example usages:__\n * - Learn more\n * - View all\n * - Change account\n * - Turn on\n *\n * @event click Fired when the user clicks the button.\n *\n * @final\n * @suppress {visibility}\n *\n */\nexport class OscdTextButton extends TextButton {\n static override styles: CSSResultOrNative[] = [sharedStyles, textStyles];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-filled-button.js","sourceRoot":"","sources":["oscd-filled-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQzD,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { OscdFilledButton } from './OscdFilledButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-filled-button': OscdFilledButton;\n }\n}\n\ncustomElements.define('oscd-filled-button', OscdFilledButton);\nexport { OscdFilledButton };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OscdOutlinedButton } from './OscdOutlinedButton.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'oscd-outlined-button': OscdOutlinedButton;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { OscdOutlinedButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OscdOutlinedButton } from './OscdOutlinedButton.js';
|
|
7
|
+
customElements.define('oscd-outlined-button', OscdOutlinedButton);
|
|
8
|
+
export { OscdOutlinedButton };
|
|
9
|
+
//# sourceMappingURL=oscd-outlined-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-outlined-button.js","sourceRoot":"","sources":["oscd-outlined-button.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAQ7D,cAAc,CAAC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OscdOutlinedButton } from './OscdOutlinedButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-outlined-button': OscdOutlinedButton;\n }\n}\n\ncustomElements.define('oscd-outlined-button', OscdOutlinedButton);\nexport { OscdOutlinedButton };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 OMICRON Electronics GmbH
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OscdTextButton } from './OscdTextButton.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'oscd-text-button': OscdTextButton;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { OscdTextButton };
|