@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,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
|
+
* @tag oscd-filled-tonal-icon-button
|
|
11
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
12
|
+
* tap.
|
|
13
|
+
*
|
|
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 { this.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;AAE5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,yBAA0B,SAAQ,UAAU;aACvC,WAAM,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\n/**\n * @tag oscd-filled-tonal-icon-button\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\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,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 { IconButton } from '@material/web/iconbutton/internal/icon-button.js';
|
|
13
|
+
/**
|
|
14
|
+
* @tag oscd-icon-button
|
|
15
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
16
|
+
* tap.
|
|
17
|
+
*
|
|
18
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
19
|
+
* least amount of prominence.
|
|
20
|
+
*
|
|
21
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
22
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
23
|
+
*
|
|
24
|
+
* __Example usages:__
|
|
25
|
+
* - Add to Favorites
|
|
26
|
+
* - Print
|
|
27
|
+
*
|
|
28
|
+
* @final
|
|
29
|
+
* @suppress {visibility}
|
|
30
|
+
*/
|
|
31
|
+
export declare class OscdIconButton extends IconButton {
|
|
32
|
+
static styles: CSSResultOrNative[];
|
|
33
|
+
protected getRenderClasses(): {
|
|
34
|
+
standard: boolean;
|
|
35
|
+
'flip-icon': boolean;
|
|
36
|
+
selected: boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -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
|
+
* @tag oscd-icon-button
|
|
11
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
12
|
+
* tap.
|
|
13
|
+
*
|
|
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 { this.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;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;aAC5B,WAAM,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\n/**\n * @tag oscd-icon-button\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\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,38 @@
|
|
|
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
|
+
/**
|
|
14
|
+
* @tag oscd-outlined-icon-button
|
|
15
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
16
|
+
* tap.
|
|
17
|
+
*
|
|
18
|
+
* __Emphasis:__ Low emphasis – For optional or supplementary actions with the
|
|
19
|
+
* least amount of prominence.
|
|
20
|
+
*
|
|
21
|
+
* __Rationale:__ The most compact and unobtrusive type of button, icon buttons
|
|
22
|
+
* are used for optional supplementary actions such as "Bookmark" or "Star."
|
|
23
|
+
*
|
|
24
|
+
* __Example usages:__
|
|
25
|
+
* - Add to Favorites
|
|
26
|
+
* - Print
|
|
27
|
+
*
|
|
28
|
+
* @final
|
|
29
|
+
* @suppress {visibility}
|
|
30
|
+
*/
|
|
31
|
+
export declare class OscdOutlinedIconButton extends IconButton {
|
|
32
|
+
static styles: CSSResultOrNative[];
|
|
33
|
+
protected getRenderClasses(): {
|
|
34
|
+
outlined: boolean;
|
|
35
|
+
'flip-icon': boolean;
|
|
36
|
+
selected: boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -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
|
+
* @tag oscd-outlined-icon-button
|
|
11
|
+
* @summary Icon buttons help people take supplementary actions with a single
|
|
12
|
+
* tap.
|
|
13
|
+
*
|
|
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 { this.styles = [sharedStyles, styles]; }
|
|
29
|
+
getRenderClasses() {
|
|
30
|
+
return {
|
|
31
|
+
...super.getRenderClasses(),
|
|
32
|
+
outlined: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=OscdOutlinedIconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdOutlinedIconButton.js","sourceRoot":"","sources":["OscdOutlinedIconButton.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;AAE5F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,sBAAuB,SAAQ,UAAU;aACpC,WAAM,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\n/**\n * @tag oscd-outlined-icon-button\n * @summary Icon buttons help people take supplementary actions with a single\n * tap.\n *\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-filled-icon-button.js","sourceRoot":"","sources":["oscd-filled-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAQjE,cAAc,CAAC,MAAM,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { OscdFilledIconButton } from './OscdFilledIconButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-filled-icon-button': OscdFilledIconButton;\n }\n}\n\ncustomElements.define('oscd-filled-icon-button', OscdFilledIconButton);\nexport { OscdFilledIconButton };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-filled-tonal-icon-button.js","sourceRoot":"","sources":["oscd-filled-tonal-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAQ3E,cAAc,CAAC,MAAM,CACnB,+BAA+B,EAC/B,yBAAyB,CAC1B,CAAC;AACF,OAAO,EAAE,yBAAyB,EAAE,CAAC","sourcesContent":["import { OscdFilledTonalIconButton } from './OscdFilledTonalIconButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-filled-tonal-icon-button': OscdFilledTonalIconButton;\n }\n}\n\ncustomElements.define(\n 'oscd-filled-tonal-icon-button',\n OscdFilledTonalIconButton,\n);\nexport { OscdFilledTonalIconButton };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-icon-button.js","sourceRoot":"","sources":["oscd-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { OscdIconButton } from './OscdIconButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-icon-button': OscdIconButton;\n }\n}\n\ncustomElements.define('oscd-icon-button', OscdIconButton);\nexport { OscdIconButton };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-outlined-icon-button.js","sourceRoot":"","sources":["oscd-outlined-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAQrE,cAAc,CAAC,MAAM,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import { OscdOutlinedIconButton } from './OscdOutlinedIconButton.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-outlined-icon-button': OscdOutlinedIconButton;\n }\n}\n\ncustomElements.define('oscd-outlined-icon-button', OscdOutlinedIconButton);\nexport { OscdOutlinedIconButton };\n"]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Accessibility Object Model reflective aria property name types.
|
|
8
|
+
*/
|
|
9
|
+
export type ARIAProperty = keyof ARIAMixin;
|
|
10
|
+
/**
|
|
11
|
+
* Accessibility Object Model reflective aria properties.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ARIA_PROPERTIES: ARIAProperty[];
|
|
14
|
+
/**
|
|
15
|
+
* Accessibility Object Model aria attribute name types.
|
|
16
|
+
*/
|
|
17
|
+
export type ARIAAttribute = ARIAPropertyToAttribute<ARIAProperty>;
|
|
18
|
+
/**
|
|
19
|
+
* Accessibility Object Model aria attributes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ARIA_ATTRIBUTES: ("aria-hidden" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext")[];
|
|
22
|
+
/**
|
|
23
|
+
* Checks if an attribute is one of the AOM aria attributes.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* isAriaAttribute('aria-label'); // true
|
|
27
|
+
*
|
|
28
|
+
* @param attribute The attribute to check.
|
|
29
|
+
* @return True if the attribute is an aria attribute, or false if not.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isAriaAttribute(attribute: string): attribute is ARIAAttribute;
|
|
32
|
+
/**
|
|
33
|
+
* Converts an AOM aria property into its corresponding attribute.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
|
|
37
|
+
*
|
|
38
|
+
* @param property The aria property.
|
|
39
|
+
* @return The aria attribute.
|
|
40
|
+
*/
|
|
41
|
+
export declare function ariaPropertyToAttribute<K extends ARIAProperty>(property: K): ARIAPropertyToAttribute<K>;
|
|
42
|
+
type ARIAPropertyToAttribute<K extends string> = K extends `aria${infer Suffix}Element${infer OptS}` ? `aria-${Lowercase<Suffix>}` : K extends `aria${infer Suffix}` ? `aria-${Lowercase<Suffix>}` : K;
|
|
43
|
+
/**
|
|
44
|
+
* An extension of `ARIAMixin` that enforces strict value types for aria
|
|
45
|
+
* properties.
|
|
46
|
+
*
|
|
47
|
+
* This is needed for correct typing in render functions with lit analyzer.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* render() {
|
|
51
|
+
* const {ariaLabel} = this as ARIAMixinStrict;
|
|
52
|
+
* return html`
|
|
53
|
+
* <button aria-label=${ariaLabel || nothing}>
|
|
54
|
+
* <slot></slot>
|
|
55
|
+
* </button>
|
|
56
|
+
* `;
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
59
|
+
export interface ARIAMixinStrict extends ARIAMixin {
|
|
60
|
+
ariaAtomic: 'true' | 'false' | null;
|
|
61
|
+
ariaAutoComplete: 'none' | 'inline' | 'list' | 'both' | null;
|
|
62
|
+
ariaBusy: 'true' | 'false' | null;
|
|
63
|
+
ariaChecked: 'true' | 'false' | null;
|
|
64
|
+
ariaColCount: `${number}` | null;
|
|
65
|
+
ariaColIndex: `${number}` | null;
|
|
66
|
+
ariaColSpan: `${number}` | null;
|
|
67
|
+
ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | null;
|
|
68
|
+
ariaDisabled: 'true' | 'false' | null;
|
|
69
|
+
ariaExpanded: 'true' | 'false' | null;
|
|
70
|
+
ariaHasPopup: 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null;
|
|
71
|
+
ariaHidden: 'true' | 'false' | null;
|
|
72
|
+
ariaInvalid: 'true' | 'false' | null;
|
|
73
|
+
ariaKeyShortcuts: string | null;
|
|
74
|
+
ariaLabel: string | null;
|
|
75
|
+
ariaLevel: `${number}` | null;
|
|
76
|
+
ariaLive: 'assertive' | 'off' | 'polite' | null;
|
|
77
|
+
ariaModal: 'true' | 'false' | null;
|
|
78
|
+
ariaMultiLine: 'true' | 'false' | null;
|
|
79
|
+
ariaMultiSelectable: 'true' | 'false' | null;
|
|
80
|
+
ariaOrientation: 'horizontal' | 'vertical' | 'undefined' | null;
|
|
81
|
+
ariaPlaceholder: string | null;
|
|
82
|
+
ariaPosInSet: `${number}` | null;
|
|
83
|
+
ariaPressed: 'true' | 'false' | null;
|
|
84
|
+
ariaReadOnly: 'true' | 'false' | null;
|
|
85
|
+
ariaRequired: 'true' | 'false' | null;
|
|
86
|
+
ariaRoleDescription: string | null;
|
|
87
|
+
ariaRowCount: `${number}` | null;
|
|
88
|
+
ariaRowIndex: `${number}` | null;
|
|
89
|
+
ariaRowSpan: `${number}` | null;
|
|
90
|
+
ariaSelected: 'true' | 'false' | null;
|
|
91
|
+
ariaSetSize: `${number}` | null;
|
|
92
|
+
ariaSort: 'ascending' | 'descending' | 'none' | 'other' | null;
|
|
93
|
+
ariaValueMax: `${number}` | null;
|
|
94
|
+
ariaValueMin: `${number}` | null;
|
|
95
|
+
ariaValueNow: `${number}` | null;
|
|
96
|
+
ariaValueText: string | null;
|
|
97
|
+
role: ARIARole | null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Valid values for `role`.
|
|
101
|
+
*/
|
|
102
|
+
export type ARIARole = 'alert' | 'alertdialog' | 'button' | 'checkbox' | 'dialog' | 'gridcell' | 'link' | 'log' | 'marquee' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'progressbar' | 'radio' | 'scrollbar' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tabpanel' | 'textbox' | 'timer' | 'tooltip' | 'treeitem' | 'combobox' | 'grid' | 'listbox' | 'menu' | 'menubar' | 'radiogroup' | 'tablist' | 'tree' | 'treegrid' | 'application' | 'article' | 'cell' | 'columnheader' | 'definition' | 'directory' | 'document' | 'feed' | 'figure' | 'group' | 'heading' | 'img' | 'list' | 'listitem' | 'math' | 'none' | 'note' | 'presentation' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'separator' | 'table' | 'term' | 'text' | 'toolbar' | 'banner' | 'complementary' | 'contentinfo' | 'form' | 'main' | 'navigation' | 'region' | 'search' | 'doc-abstract' | 'doc-acknowledgments' | 'doc-afterword' | 'doc-appendix' | 'doc-backlink' | 'doc-biblioentry' | 'doc-bibliography' | 'doc-biblioref' | 'doc-chapter' | 'doc-colophon' | 'doc-conclusion' | 'doc-cover' | 'doc-credit' | 'doc-credits' | 'doc-dedication' | 'doc-endnote' | 'doc-endnotes' | 'doc-epigraph' | 'doc-epilogue' | 'doc-errata' | 'doc-example' | 'doc-footnote' | 'doc-foreword' | 'doc-glossary' | 'doc-glossref' | 'doc-index' | 'doc-introduction' | 'doc-noteref' | 'doc-notice' | 'doc-pagebreak' | 'doc-pagelist' | 'doc-part' | 'doc-preface' | 'doc-prologue' | 'doc-pullquote' | 'doc-qna' | 'doc-subtitle' | 'doc-tip' | 'doc-toc';
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Accessibility Object Model reflective aria properties.
|
|
8
|
+
*/
|
|
9
|
+
export const ARIA_PROPERTIES = [
|
|
10
|
+
'role',
|
|
11
|
+
'ariaAtomic',
|
|
12
|
+
'ariaAutoComplete',
|
|
13
|
+
'ariaBusy',
|
|
14
|
+
'ariaChecked',
|
|
15
|
+
'ariaColCount',
|
|
16
|
+
'ariaColIndex',
|
|
17
|
+
'ariaColSpan',
|
|
18
|
+
'ariaCurrent',
|
|
19
|
+
'ariaDisabled',
|
|
20
|
+
'ariaExpanded',
|
|
21
|
+
'ariaHasPopup',
|
|
22
|
+
'ariaHidden',
|
|
23
|
+
'ariaInvalid',
|
|
24
|
+
'ariaKeyShortcuts',
|
|
25
|
+
'ariaLabel',
|
|
26
|
+
'ariaLevel',
|
|
27
|
+
'ariaLive',
|
|
28
|
+
'ariaModal',
|
|
29
|
+
'ariaMultiLine',
|
|
30
|
+
'ariaMultiSelectable',
|
|
31
|
+
'ariaOrientation',
|
|
32
|
+
'ariaPlaceholder',
|
|
33
|
+
'ariaPosInSet',
|
|
34
|
+
'ariaPressed',
|
|
35
|
+
'ariaReadOnly',
|
|
36
|
+
'ariaRequired',
|
|
37
|
+
'ariaRoleDescription',
|
|
38
|
+
'ariaRowCount',
|
|
39
|
+
'ariaRowIndex',
|
|
40
|
+
'ariaRowSpan',
|
|
41
|
+
'ariaSelected',
|
|
42
|
+
'ariaSetSize',
|
|
43
|
+
'ariaSort',
|
|
44
|
+
'ariaValueMax',
|
|
45
|
+
'ariaValueMin',
|
|
46
|
+
'ariaValueNow',
|
|
47
|
+
'ariaValueText',
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Accessibility Object Model aria attributes.
|
|
51
|
+
*/
|
|
52
|
+
export const ARIA_ATTRIBUTES = ARIA_PROPERTIES.map(ariaPropertyToAttribute);
|
|
53
|
+
/**
|
|
54
|
+
* Checks if an attribute is one of the AOM aria attributes.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* isAriaAttribute('aria-label'); // true
|
|
58
|
+
*
|
|
59
|
+
* @param attribute The attribute to check.
|
|
60
|
+
* @return True if the attribute is an aria attribute, or false if not.
|
|
61
|
+
*/
|
|
62
|
+
export function isAriaAttribute(attribute) {
|
|
63
|
+
return ARIA_ATTRIBUTES.includes(attribute);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Converts an AOM aria property into its corresponding attribute.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
|
|
70
|
+
*
|
|
71
|
+
* @param property The aria property.
|
|
72
|
+
* @return The aria attribute.
|
|
73
|
+
*/
|
|
74
|
+
export function ariaPropertyToAttribute(property) {
|
|
75
|
+
return property
|
|
76
|
+
.replace('aria', 'aria-')
|
|
77
|
+
// IDREF attributes also include an "Element" or "Elements" suffix
|
|
78
|
+
.replace(/Elements?/g, '')
|
|
79
|
+
.toLowerCase();
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=aria.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria.js","sourceRoot":"","sources":["aria.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,MAAM;IACN,YAAY;IACZ,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,WAAW;IACX,WAAW;IACX,UAAU;IACV,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,iBAAiB;IACjB,iBAAiB;IACjB,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,qBAAqB;IACrB,cAAc;IACd,cAAc;IACd,aAAa;IACb,cAAc;IACd,aAAa;IACb,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;CAChB,CAAC;AAOF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAE5E;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,eAAe,CAAC,QAAQ,CAAC,SAA0B,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CAAyB,QAAW;IACzE,OACE,QAAQ;SACL,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,kEAAkE;SACjE,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,WAAW,EACf,CAAC;AACJ,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Accessibility Object Model reflective aria property name types.\n */\nexport type ARIAProperty = keyof ARIAMixin;\n\n/**\n * Accessibility Object Model reflective aria properties.\n */\nexport const ARIA_PROPERTIES: ARIAProperty[] = [\n 'role',\n 'ariaAtomic',\n 'ariaAutoComplete',\n 'ariaBusy',\n 'ariaChecked',\n 'ariaColCount',\n 'ariaColIndex',\n 'ariaColSpan',\n 'ariaCurrent',\n 'ariaDisabled',\n 'ariaExpanded',\n 'ariaHasPopup',\n 'ariaHidden',\n 'ariaInvalid',\n 'ariaKeyShortcuts',\n 'ariaLabel',\n 'ariaLevel',\n 'ariaLive',\n 'ariaModal',\n 'ariaMultiLine',\n 'ariaMultiSelectable',\n 'ariaOrientation',\n 'ariaPlaceholder',\n 'ariaPosInSet',\n 'ariaPressed',\n 'ariaReadOnly',\n 'ariaRequired',\n 'ariaRoleDescription',\n 'ariaRowCount',\n 'ariaRowIndex',\n 'ariaRowSpan',\n 'ariaSelected',\n 'ariaSetSize',\n 'ariaSort',\n 'ariaValueMax',\n 'ariaValueMin',\n 'ariaValueNow',\n 'ariaValueText',\n];\n\n/**\n * Accessibility Object Model aria attribute name types.\n */\nexport type ARIAAttribute = ARIAPropertyToAttribute<ARIAProperty>;\n\n/**\n * Accessibility Object Model aria attributes.\n */\nexport const ARIA_ATTRIBUTES = ARIA_PROPERTIES.map(ariaPropertyToAttribute);\n\n/**\n * Checks if an attribute is one of the AOM aria attributes.\n *\n * @example\n * isAriaAttribute('aria-label'); // true\n *\n * @param attribute The attribute to check.\n * @return True if the attribute is an aria attribute, or false if not.\n */\nexport function isAriaAttribute(attribute: string): attribute is ARIAAttribute {\n return ARIA_ATTRIBUTES.includes(attribute as ARIAAttribute);\n}\n\n/**\n * Converts an AOM aria property into its corresponding attribute.\n *\n * @example\n * ariaPropertyToAttribute('ariaLabel'); // 'aria-label'\n *\n * @param property The aria property.\n * @return The aria attribute.\n */\nexport function ariaPropertyToAttribute<K extends ARIAProperty>(property: K) {\n return (\n property\n .replace('aria', 'aria-')\n // IDREF attributes also include an \"Element\" or \"Elements\" suffix\n .replace(/Elements?/g, '')\n .toLowerCase() as ARIAPropertyToAttribute<K>\n );\n}\n\n// Converts an `ariaFoo` string type to an `aria-foo` string type.\ntype ARIAPropertyToAttribute<K extends string> =\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n K extends `aria${infer Suffix}Element${infer OptS}`\n ? `aria-${Lowercase<Suffix>}`\n : K extends `aria${infer Suffix}`\n ? `aria-${Lowercase<Suffix>}`\n : K;\n\n/**\n * An extension of `ARIAMixin` that enforces strict value types for aria\n * properties.\n *\n * This is needed for correct typing in render functions with lit analyzer.\n *\n * @example\n * render() {\n * const {ariaLabel} = this as ARIAMixinStrict;\n * return html`\n * <button aria-label=${ariaLabel || nothing}>\n * <slot></slot>\n * </button>\n * `;\n * }\n */\nexport interface ARIAMixinStrict extends ARIAMixin {\n ariaAtomic: 'true' | 'false' | null;\n ariaAutoComplete: 'none' | 'inline' | 'list' | 'both' | null;\n ariaBusy: 'true' | 'false' | null;\n ariaChecked: 'true' | 'false' | null;\n ariaColCount: `${number}` | null;\n ariaColIndex: `${number}` | null;\n ariaColSpan: `${number}` | null;\n ariaCurrent:\n | 'page'\n | 'step'\n | 'location'\n | 'date'\n | 'time'\n | 'true'\n | 'false'\n | null;\n ariaDisabled: 'true' | 'false' | null;\n ariaExpanded: 'true' | 'false' | null;\n ariaHasPopup:\n | 'false'\n | 'true'\n | 'menu'\n | 'listbox'\n | 'tree'\n | 'grid'\n | 'dialog'\n | null;\n ariaHidden: 'true' | 'false' | null;\n ariaInvalid: 'true' | 'false' | null;\n ariaKeyShortcuts: string | null;\n ariaLabel: string | null;\n ariaLevel: `${number}` | null;\n ariaLive: 'assertive' | 'off' | 'polite' | null;\n ariaModal: 'true' | 'false' | null;\n ariaMultiLine: 'true' | 'false' | null;\n ariaMultiSelectable: 'true' | 'false' | null;\n ariaOrientation: 'horizontal' | 'vertical' | 'undefined' | null;\n ariaPlaceholder: string | null;\n ariaPosInSet: `${number}` | null;\n ariaPressed: 'true' | 'false' | null;\n ariaReadOnly: 'true' | 'false' | null;\n ariaRequired: 'true' | 'false' | null;\n ariaRoleDescription: string | null;\n ariaRowCount: `${number}` | null;\n ariaRowIndex: `${number}` | null;\n ariaRowSpan: `${number}` | null;\n ariaSelected: 'true' | 'false' | null;\n ariaSetSize: `${number}` | null;\n ariaSort: 'ascending' | 'descending' | 'none' | 'other' | null;\n ariaValueMax: `${number}` | null;\n ariaValueMin: `${number}` | null;\n ariaValueNow: `${number}` | null;\n ariaValueText: string | null;\n role: ARIARole | null;\n}\n\n/**\n * Valid values for `role`.\n */\nexport type ARIARole =\n | 'alert'\n | 'alertdialog'\n | 'button'\n | 'checkbox'\n | 'dialog'\n | 'gridcell'\n | 'link'\n | 'log'\n | 'marquee'\n | 'menuitem'\n | 'menuitemcheckbox'\n | 'menuitemradio'\n | 'option'\n | 'progressbar'\n | 'radio'\n | 'scrollbar'\n | 'searchbox'\n | 'slider'\n | 'spinbutton'\n | 'status'\n | 'switch'\n | 'tab'\n | 'tabpanel'\n | 'textbox'\n | 'timer'\n | 'tooltip'\n | 'treeitem'\n | 'combobox'\n | 'grid'\n | 'listbox'\n | 'menu'\n | 'menubar'\n | 'radiogroup'\n | 'tablist'\n | 'tree'\n | 'treegrid'\n | 'application'\n | 'article'\n | 'cell'\n | 'columnheader'\n | 'definition'\n | 'directory'\n | 'document'\n | 'feed'\n | 'figure'\n | 'group'\n | 'heading'\n | 'img'\n | 'list'\n | 'listitem'\n | 'math'\n | 'none'\n | 'note'\n | 'presentation'\n | 'region'\n | 'row'\n | 'rowgroup'\n | 'rowheader'\n | 'separator'\n | 'table'\n | 'term'\n | 'text'\n | 'toolbar'\n | 'banner'\n | 'complementary'\n | 'contentinfo'\n | 'form'\n | 'main'\n | 'navigation'\n | 'region'\n | 'search'\n | 'doc-abstract'\n | 'doc-acknowledgments'\n | 'doc-afterword'\n | 'doc-appendix'\n | 'doc-backlink'\n | 'doc-biblioentry'\n | 'doc-bibliography'\n | 'doc-biblioref'\n | 'doc-chapter'\n | 'doc-colophon'\n | 'doc-conclusion'\n | 'doc-cover'\n | 'doc-credit'\n | 'doc-credits'\n | 'doc-dedication'\n | 'doc-endnote'\n | 'doc-endnotes'\n | 'doc-epigraph'\n | 'doc-epilogue'\n | 'doc-errata'\n | 'doc-example'\n | 'doc-footnote'\n | 'doc-foreword'\n | 'doc-glossary'\n | 'doc-glossref'\n | 'doc-index'\n | 'doc-introduction'\n | 'doc-noteref'\n | 'doc-notice'\n | 'doc-pagebreak'\n | 'doc-pagelist'\n | 'doc-part'\n | 'doc-preface'\n | 'doc-prologue'\n | 'doc-pullquote'\n | 'doc-qna'\n | 'doc-subtitle'\n | 'doc-tip'\n | 'doc-toc';\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
import { MixinBase, MixinReturn } from '../../labs/behaviors/mixin.js';
|
|
8
|
+
/**
|
|
9
|
+
* Mixes in aria delegation for elements that delegate focus and aria to inner
|
|
10
|
+
* shadow root elements.
|
|
11
|
+
*
|
|
12
|
+
* This mixin fixes invalid aria announcements with shadow roots, caused by
|
|
13
|
+
* duplicate aria attributes on both the host and the inner shadow root element.
|
|
14
|
+
*
|
|
15
|
+
* Note: this mixin **does not yet support** ID reference attributes, such as
|
|
16
|
+
* `aria-labelledby` or `aria-controls`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* class MyButton extends mixinDelegatesAria(LitElement) {
|
|
21
|
+
* static shadowRootOptions = {mode: 'open', delegatesFocus: true};
|
|
22
|
+
*
|
|
23
|
+
* render() {
|
|
24
|
+
* return html`
|
|
25
|
+
* <button aria-label=${this.ariaLabel || nothing}>
|
|
26
|
+
* <slot></slot>
|
|
27
|
+
* </button>
|
|
28
|
+
* `;
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
* ```html
|
|
33
|
+
* <my-button aria-label="Plus one">+1</my-button>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
|
|
37
|
+
* attribute.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* return html`
|
|
42
|
+
* <button role=${(this as ARIAMixinStrict).role || nothing}>
|
|
43
|
+
* <slot></slot>
|
|
44
|
+
* </button>
|
|
45
|
+
* `;
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* In the future, updates to the Accessibility Object Model (AOM) will provide
|
|
49
|
+
* built-in aria delegation features that will replace this mixin.
|
|
50
|
+
*
|
|
51
|
+
* @param base The class to mix functionality into.
|
|
52
|
+
* @return The provided class with aria delegation mixed in.
|
|
53
|
+
*/
|
|
54
|
+
export declare function mixinDelegatesAria<T extends MixinBase<LitElement>>(base: T): MixinReturn<T>;
|