@omicronenergy/oscd-ui 0.0.6 → 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 +3 -3
- package/app-bar/OscdAppBar.js +12 -10
- package/app-bar/OscdAppBar.js.map +1 -1
- package/button/OscdFilledButton.js +2 -2
- package/button/OscdFilledButton.js.map +1 -1
- package/button/OscdOutlinedButton.js +1 -1
- package/button/OscdOutlinedButton.js.map +1 -1
- package/button/OscdTextButton.js +1 -1
- package/button/OscdTextButton.js.map +1 -1
- package/button/oscd-outlined-button.d.ts +1 -1
- package/button/oscd-outlined-button.js.map +1 -1
- package/dialog/OscdDialog.js +1 -1
- package/dialog/OscdDialog.js.map +1 -1
- package/divider/OscdDivider.js +1 -1
- package/divider/OscdDivider.js.map +1 -1
- package/elevation/OscdElevation.d.ts +1 -2
- package/elevation/OscdElevation.js +3 -4
- package/elevation/OscdElevation.js.map +1 -1
- 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/field/OscdFilledField.js +1 -1
- package/field/OscdFilledField.js.map +1 -1
- package/field/OscdOutlinedField.js +1 -1
- package/field/OscdOutlinedField.js.map +1 -1
- 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.js +1 -1
- package/icon/OscdIcon.js.map +1 -1
- package/iconbutton/OscdFilledIconButton.js +1 -1
- package/iconbutton/OscdFilledIconButton.js.map +1 -1
- package/iconbutton/OscdFilledTonalIconButton.js +1 -1
- package/iconbutton/OscdFilledTonalIconButton.js.map +1 -1
- package/iconbutton/OscdIconButton.js +1 -1
- package/iconbutton/OscdIconButton.js.map +1 -1
- package/iconbutton/OscdOutlinedIconButton.js +1 -1
- package/iconbutton/OscdOutlinedIconButton.js.map +1 -1
- 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.js +1 -1
- package/list/OscdList.js.map +1 -1
- package/list/OscdListItem.d.ts +4 -0
- package/list/OscdListItem.js +13 -1
- package/list/OscdListItem.js.map +1 -1
- package/menu/OscdMenu.js +1 -1
- package/menu/OscdMenu.js.map +1 -1
- package/menu/OscdMenuItem.js +1 -1
- package/menu/OscdMenuItem.js.map +1 -1
- package/navigation-drawer/OscdNavigationDrawer.js +2 -2
- package/navigation-drawer/OscdNavigationDrawer.js.map +1 -1
- package/navigation-drawer/OscdNavigationDrawerHeader.js +2 -2
- package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -1
- package/package.json +76 -110
- 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.js +1 -1
- package/select/OscdFilledSelect.js.map +1 -1
- package/select/OscdOutlinedSelect.js +1 -1
- package/select/OscdOutlinedSelect.js.map +1 -1
- package/select/OscdSelectOption.js +1 -1
- package/select/OscdSelectOption.js.map +1 -1
- package/tabs/OscdPrimaryTab.js +1 -1
- package/tabs/OscdPrimaryTab.js.map +1 -1
- package/tabs/OscdSecondaryTab.js +1 -1
- package/tabs/OscdSecondaryTab.js.map +1 -1
- package/tabs/OscdTabs.js +1 -1
- package/tabs/OscdTabs.js.map +1 -1
- package/textfield/OscdFilledTextField.js +5 -2
- package/textfield/OscdFilledTextField.js.map +1 -1
- package/textfield/OscdOutlinedTextField.js +5 -2
- package/textfield/OscdOutlinedTextField.js.map +1 -1
- 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.js +0 -1
- package/utils/storybook/getStorybookHelpers.js.map +1 -1
- package/utils/storybook/scopedWcDecorator.js +1 -0
- package/utils/storybook/scopedWcDecorator.js.map +1 -1
- 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 +15 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// go/keep-sorted start
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
@use 'sass:meta';
|
|
9
|
+
@use 'sass:string';
|
|
10
|
+
// go/keep-sorted end
|
|
11
|
+
// go/keep-sorted start
|
|
12
|
+
@use './string-ext';
|
|
13
|
+
// go/keep-sorted end
|
|
14
|
+
|
|
15
|
+
/// Creates a custom property `var()` string.
|
|
16
|
+
///
|
|
17
|
+
/// @param {String} $name - The name of the custom property.
|
|
18
|
+
/// @param {*} $fallback [null] - Optional `var()` fallback value.
|
|
19
|
+
/// @return {String} A custom property `var()` string.
|
|
20
|
+
@function create($name, $fallback: null) {
|
|
21
|
+
$name: create-name($name);
|
|
22
|
+
@if $fallback == null {
|
|
23
|
+
@return var(#{$name});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@if is-var($fallback) {
|
|
27
|
+
$fallback-name: name($fallback);
|
|
28
|
+
$fallback-fallback: fallback($fallback);
|
|
29
|
+
@return var(#{$name}, create($fallback-name, $fallback-fallback));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@return var(#{$name}, $fallback);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// Create a custom property variable name.
|
|
36
|
+
///
|
|
37
|
+
/// Providing a custom property name with `--*` will ignore the global prefix.
|
|
38
|
+
///
|
|
39
|
+
/// @example - scss
|
|
40
|
+
/// .foo {
|
|
41
|
+
/// color: var(#{var.create-name(foo)});
|
|
42
|
+
/// background: var(#{var.create-name(--bar)});
|
|
43
|
+
/// }
|
|
44
|
+
///
|
|
45
|
+
/// @example - css
|
|
46
|
+
/// .foo {
|
|
47
|
+
/// color: var(--md-foo);
|
|
48
|
+
/// background: var(--bar);
|
|
49
|
+
/// }
|
|
50
|
+
///
|
|
51
|
+
/// @param {String} $name - The name of the custom property.
|
|
52
|
+
/// @return {String} The full valid CSS custom property variable name.
|
|
53
|
+
@function create-name($name) {
|
|
54
|
+
@if string-ext.has-prefix($name, '--') {
|
|
55
|
+
@return $name;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@return string.unquote('--md-#{$name}');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/// Returns the custom property variable name of `var()` string.
|
|
62
|
+
///
|
|
63
|
+
/// @throw If the value is not a custom property.
|
|
64
|
+
/// @param {String} $var - A custom property `var()` string.
|
|
65
|
+
/// @return {String} The custom property variable name.
|
|
66
|
+
@function name($var) {
|
|
67
|
+
$var: _parse-and-validate($var);
|
|
68
|
+
@return map.get($var, name);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/// Returns the fallback value of a custom property `var()` string. The value
|
|
72
|
+
/// may be null if the `var()` does not have a fallback value.
|
|
73
|
+
///
|
|
74
|
+
/// @example - scss
|
|
75
|
+
/// $fallback: var.fallback(var(--foo, var(--bar, 8px));
|
|
76
|
+
/// // "var(--bar, 8px)"
|
|
77
|
+
///
|
|
78
|
+
/// @throw If the value is not a custom property.
|
|
79
|
+
/// @param {String} $var - A custom property `var()` string.
|
|
80
|
+
/// @return {String} The fallback value of the `var()` string. May be null if
|
|
81
|
+
/// the `var()` does not have a fallback value.
|
|
82
|
+
@function fallback($var) {
|
|
83
|
+
$var: _parse-and-validate($var);
|
|
84
|
+
$fallback: map.get($var, fallback);
|
|
85
|
+
@if is-var($fallback) {
|
|
86
|
+
@return create(name($fallback), fallback($fallback));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@return $fallback;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/// Returns the deep fallback value of a custom property `var()` string. The
|
|
93
|
+
/// value may be null if the `var()` does not have a fallback value.
|
|
94
|
+
///
|
|
95
|
+
/// If a fallback value is another `var()`, this function will return the final
|
|
96
|
+
/// concrete value in the chain.
|
|
97
|
+
///
|
|
98
|
+
/// @example - scss
|
|
99
|
+
/// $fallback: var.deep-fallback(var(--foo, var(--bar, 8px));
|
|
100
|
+
/// // "8px"
|
|
101
|
+
///
|
|
102
|
+
/// @throw If the value is not a custom property.
|
|
103
|
+
/// @param {String} $var - A custom property `var()` string.
|
|
104
|
+
/// @return {String} The deep fallback value of the `var()` string. May be null
|
|
105
|
+
/// if the `var()` does not have a fallback value.
|
|
106
|
+
@function deep-fallback($var) {
|
|
107
|
+
$fallback: fallback($var);
|
|
108
|
+
@if is-var($fallback) {
|
|
109
|
+
@return deep-fallback($fallback);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@return $fallback;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/// Creates a new custom property `var()` string and returns it with the
|
|
116
|
+
/// specified new fallback value.
|
|
117
|
+
///
|
|
118
|
+
/// @example - scss
|
|
119
|
+
/// $new-var: set-fallback(var(--foo, var(--bar, 8px)), 16px);
|
|
120
|
+
/// // "var(--foo, 16px)"
|
|
121
|
+
///
|
|
122
|
+
/// @throw If the value is not a custom property.
|
|
123
|
+
/// @param {String} $var - A custom property `var()` string.
|
|
124
|
+
/// @param {*} $new-fallback - The new fallback value. May be null to remove a
|
|
125
|
+
/// value.
|
|
126
|
+
/// @return {String} A custom property `var()` string with the new fallback
|
|
127
|
+
/// value.
|
|
128
|
+
@function set-fallback($var, $new-fallback) {
|
|
129
|
+
$name: name($var);
|
|
130
|
+
@return create($name, $new-fallback);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/// Creates a new custom property `var()` string and returns it with the
|
|
134
|
+
/// specified new deep fallback value.
|
|
135
|
+
///
|
|
136
|
+
/// If the provided `var()` string's fallback value is another `var()`, this
|
|
137
|
+
/// function will set the final fallback value in the chain.
|
|
138
|
+
///
|
|
139
|
+
/// @example - scss
|
|
140
|
+
/// $new-var: deep-set-fallback(var(--foo, var(--bar, 8px)), 16px);
|
|
141
|
+
/// // "var(--foo, var(--bar, 16px))"
|
|
142
|
+
///
|
|
143
|
+
/// @throw If the value is not a custom property.
|
|
144
|
+
/// @param {String} $var - A custom property `var()` string.
|
|
145
|
+
/// @param {*} $new-fallback - The new fallback value. May be null to remove a
|
|
146
|
+
/// value.
|
|
147
|
+
/// @return {String} A custom property `var()` string with the new deep
|
|
148
|
+
/// fallback value.
|
|
149
|
+
@function deep-set-fallback($var, $new-fallback) {
|
|
150
|
+
$old-fallback: fallback($var);
|
|
151
|
+
@if is-var($old-fallback) {
|
|
152
|
+
$new-fallback: deep-set-fallback($old-fallback, $new-fallback);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@return set-fallback($var, $new-fallback);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/// Indicates whether or not a value is a custom property `var()` string.
|
|
159
|
+
///
|
|
160
|
+
/// @example - scss
|
|
161
|
+
/// $is-var: var.is-var('var(--foo)'); // true
|
|
162
|
+
///
|
|
163
|
+
/// @param {*} $var - The value to test.
|
|
164
|
+
/// @return {Bool} True if the value is a custom property `var()` string, or
|
|
165
|
+
/// false if not.
|
|
166
|
+
@function is-var($var) {
|
|
167
|
+
@return _parse($var) != null;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/// Indicates whether or not a value is a `var()` string.
|
|
171
|
+
///
|
|
172
|
+
/// @param {*} $var - The value to test.
|
|
173
|
+
/// @return {Bool} True if the value is a custom property `var()` string, or
|
|
174
|
+
/// false if not.
|
|
175
|
+
@function _is-var-string($var) {
|
|
176
|
+
@return meta.type-of($var) == 'string' and string-ext.has-prefix($var, 'var(');
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/// Parses a `var()` string into a Map with `name` and `fallback` keys. This
|
|
180
|
+
/// function returns null if the value is invalid.
|
|
181
|
+
///
|
|
182
|
+
/// @param {*} $var - The value to parse.
|
|
183
|
+
/// @return {Map} A Map containing a string `name` key with the custom property
|
|
184
|
+
/// name and a `fallback` key with the fallback value (which may be null).
|
|
185
|
+
/// The returned Map itself may be null if the provided value is not valid.
|
|
186
|
+
@function _parse($var) {
|
|
187
|
+
@if meta.type-of($var) ==
|
|
188
|
+
'map' and
|
|
189
|
+
map.has-key($var, name) and
|
|
190
|
+
map.has-key($var, fallback)
|
|
191
|
+
{
|
|
192
|
+
@return $var;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@if not _is-var-string($var) {
|
|
196
|
+
@return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Remove function name and parens
|
|
200
|
+
$var: string-ext.trim($var, 'var(', ')');
|
|
201
|
+
|
|
202
|
+
$name: string-ext.trim-repeating($var, ' ');
|
|
203
|
+
$fallback: null;
|
|
204
|
+
$comma: string.index($var, ',');
|
|
205
|
+
@if $comma != null {
|
|
206
|
+
$name: string-ext.trim-repeating(string.slice($var, 1, $comma - 1), ' ');
|
|
207
|
+
$fallback: string-ext.trim-repeating(string.slice($var, $comma + 1), ' ');
|
|
208
|
+
@if _is-var-string($fallback) {
|
|
209
|
+
$fallback: _parse($fallback);
|
|
210
|
+
@if $fallback == null {
|
|
211
|
+
// Invalid var() fallback string
|
|
212
|
+
@return null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@if $name == '' or $fallback == '' {
|
|
218
|
+
@return null;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@return (name: $name, fallback: $fallback);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/// Parses a `var()` string into a Map with `name` and `fallback` keys.
|
|
225
|
+
///
|
|
226
|
+
/// @throw If the value is not a custom property.
|
|
227
|
+
/// @param {*} $var - The value to parse.
|
|
228
|
+
/// @return {Map} A Map containing a string `name` key with the custom property
|
|
229
|
+
/// name and a `fallback` key with the fallback value (which may be null).
|
|
230
|
+
@function _parse-and-validate($var) {
|
|
231
|
+
$var-map: _parse($var);
|
|
232
|
+
@if $var-map == null {
|
|
233
|
+
@error '"#{$var}" is not a valid var() string';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@return $var-map;
|
|
237
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResultOrNative } from 'lit';
|
|
7
|
+
import { Badge } from './internal/badge.js';
|
|
8
|
+
/**
|
|
9
|
+
* @final
|
|
10
|
+
* @suppress {visibility}
|
|
11
|
+
*/
|
|
12
|
+
export declare class OscdBadge extends Badge {
|
|
13
|
+
static styles: CSSResultOrNative[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Badge } from './internal/badge.js';
|
|
7
|
+
import { styles } from './internal/badge-styles.js';
|
|
8
|
+
/**
|
|
9
|
+
* @final
|
|
10
|
+
* @suppress {visibility}
|
|
11
|
+
*/
|
|
12
|
+
export class OscdBadge extends Badge {
|
|
13
|
+
static { this.styles = [styles]; }
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=OscdBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OscdBadge.js","sourceRoot":"","sources":["OscdBadge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;aAClB,WAAM,GAAwB,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { CSSResultOrNative } from 'lit';\n\nimport { Badge } from './internal/badge.js';\nimport { styles } from './internal/badge-styles.js';\n\n/**\n * @final\n * @suppress {visibility}\n */\nexport class OscdBadge extends Badge {\n static override styles: CSSResultOrNative[] = [styles];\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// stylelint-disable selector-class-pattern --
|
|
7
|
+
// Selector '.md3-*' should only be used in this project.
|
|
8
|
+
|
|
9
|
+
// go/keep-sorted start
|
|
10
|
+
@use '../../../tokens';
|
|
11
|
+
// go/keep-sorted end
|
|
12
|
+
|
|
13
|
+
@mixin theme($tokens) {
|
|
14
|
+
// $supported-tokens: tokens.$md-comp-badge-supported-tokens;
|
|
15
|
+
|
|
16
|
+
@each $token, $value in $tokens {
|
|
17
|
+
// @if list.index($supported-tokens, $token) == null {
|
|
18
|
+
// @error 'Token `#{$token}` is not a supported token.';
|
|
19
|
+
// }
|
|
20
|
+
|
|
21
|
+
@if $value {
|
|
22
|
+
--md-badge-#{$token}: #{$value};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin styles() {
|
|
28
|
+
$tokens: tokens.md-comp-badge-values();
|
|
29
|
+
|
|
30
|
+
:host {
|
|
31
|
+
@each $token, $value in $tokens {
|
|
32
|
+
--_#{$token}: #{$value};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.md3-badge {
|
|
37
|
+
inset-inline-start: 50%;
|
|
38
|
+
margin-inline-start: 6px;
|
|
39
|
+
margin-block-start: 4px;
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset-block-start: 0px;
|
|
42
|
+
background-color: var(--_color);
|
|
43
|
+
border-radius: var(--_shape);
|
|
44
|
+
height: var(--_size);
|
|
45
|
+
|
|
46
|
+
&:not(.md3-badge--large) {
|
|
47
|
+
// Separate selector since large uses min-width
|
|
48
|
+
width: var(--_size);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.md3-badge--large {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
margin-inline-start: 2px;
|
|
56
|
+
margin-block-start: 1px;
|
|
57
|
+
background-color: var(--_large-color);
|
|
58
|
+
border-radius: var(--_large-shape);
|
|
59
|
+
height: var(--_large-size);
|
|
60
|
+
min-width: var(--_large-size);
|
|
61
|
+
color: var(--_large-label-text-color);
|
|
62
|
+
|
|
63
|
+
.md3-badge__value {
|
|
64
|
+
padding: 0px 4px;
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.md3-badge__value {
|
|
71
|
+
font-family: var(--_large-label-text-font);
|
|
72
|
+
font-size: var(--_large-label-text-size);
|
|
73
|
+
line-height: var(--_large-label-text-line-height);
|
|
74
|
+
font-weight: var(--_large-label-text-weight);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}/*# sourceMappingURL=badge-styles.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["_badge.scss"],"names":[],"mappings":"AA6BE,MAEI,ghCAIJ,WACE,uBACA,wBACA,uBACA,kBACA,sBACA,+BACA,4BACA,oBAEA,kCAEE,mBAGF,4BACE,aACA,sBACA,uBACA,wBACA,uBACA,qCACA,kCACA,0BACA,6BACA,qCAEA,8CACE,gBACA,kBAKN,kBACE,0CACA,wCACA,iDACA","file":"badge-styles.css"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2024 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// Generated stylesheet for ./labs/badge/internal/badge-styles.css.
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}
|
|
9
|
+
`;
|
|
10
|
+
//# sourceMappingURL=badge-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-styles.js","sourceRoot":"","sources":["badge-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/badge/internal/badge-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}\n`;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
/**
|
|
8
|
+
* b/265340196 - add docs
|
|
9
|
+
*/
|
|
10
|
+
export declare class Badge extends LitElement {
|
|
11
|
+
value: string;
|
|
12
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
/**
|
|
11
|
+
* b/265340196 - add docs
|
|
12
|
+
*/
|
|
13
|
+
export class Badge extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.value = '';
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const classes = { 'md3-badge--large': this.value };
|
|
20
|
+
return html `<div class="md3-badge ${classMap(classes)}">
|
|
21
|
+
<p class="md3-badge__value">${this.value}</p>
|
|
22
|
+
</div>`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
property()
|
|
27
|
+
], Badge.prototype, "value", void 0);
|
|
28
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["badge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QACc,UAAK,GAAG,EAAE,CAAC;IASzB,CAAC;IAPoB,MAAM;QACvB,MAAM,OAAO,GAAG,EAAE,kBAAkB,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QAEnD,OAAO,IAAI,CAAA,yBAAyB,QAAQ,CAAC,OAAO,CAAC;oCACrB,IAAI,CAAC,KAAK;WACnC,CAAC;IACV,CAAC;CACF;AATa;IAAX,QAAQ,EAAE;oCAAY","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\n/**\n * b/265340196 - add docs\n */\nexport class Badge extends LitElement {\n @property() value = '';\n\n protected override render() {\n const classes = { 'md3-badge--large': this.value };\n\n return html`<div class=\"md3-badge ${classMap(classes)}\">\n <p class=\"md3-badge__value\">${this.value}</p>\n </div>`;\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResultOrNative } from 'lit';
|
|
7
|
+
import { Badge } from './internal/badge.js';
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'oscd-badge': OscdBadge;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @final
|
|
15
|
+
* @suppress {visibility}
|
|
16
|
+
*/
|
|
17
|
+
export declare class OscdBadge extends Badge {
|
|
18
|
+
static styles: CSSResultOrNative[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { customElement } from 'lit/decorators.js';
|
|
8
|
+
import { Badge } from './internal/badge.js';
|
|
9
|
+
import { styles } from './internal/badge-styles.js';
|
|
10
|
+
/**
|
|
11
|
+
* @final
|
|
12
|
+
* @suppress {visibility}
|
|
13
|
+
*/
|
|
14
|
+
let OscdBadge = class OscdBadge extends Badge {
|
|
15
|
+
static { this.styles = [styles]; }
|
|
16
|
+
};
|
|
17
|
+
OscdBadge = __decorate([
|
|
18
|
+
customElement('oscd-badge')
|
|
19
|
+
], OscdBadge);
|
|
20
|
+
export { OscdBadge };
|
|
21
|
+
//# sourceMappingURL=oscd-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oscd-badge.js","sourceRoot":"","sources":["oscd-badge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAQpD;;;GAGG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,KAAK;aAClB,WAAM,GAAwB,CAAC,MAAM,CAAC,AAAhC,CAAiC;;AAD5C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAErB","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { CSSResultOrNative } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { Badge } from './internal/badge.js';\nimport { styles } from './internal/badge-styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-badge': OscdBadge;\n }\n}\n\n/**\n * @final\n * @suppress {visibility}\n */\n@customElement('oscd-badge')\nexport class OscdBadge extends Badge {\n static override styles: CSSResultOrNative[] = [styles];\n}\n"]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
import { WithElementInternals } from './element-internals.js';
|
|
8
|
+
import { FormAssociated } from './form-associated.js';
|
|
9
|
+
import { MixinBase, MixinReturn } from './mixin.js';
|
|
10
|
+
import { Validator } from './validators/validator.js';
|
|
11
|
+
/**
|
|
12
|
+
* A form associated element that provides constraint validation APIs.
|
|
13
|
+
*
|
|
14
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation
|
|
15
|
+
*/
|
|
16
|
+
export interface ConstraintValidation extends FormAssociated {
|
|
17
|
+
/**
|
|
18
|
+
* Returns a ValidityState object that represents the validity states of the
|
|
19
|
+
* element.
|
|
20
|
+
*
|
|
21
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ValidityState
|
|
22
|
+
*/
|
|
23
|
+
readonly validity: ValidityState;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a validation error message or an empty string if the element is
|
|
26
|
+
* valid.
|
|
27
|
+
*
|
|
28
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/validationMessage
|
|
29
|
+
*/
|
|
30
|
+
readonly validationMessage: string;
|
|
31
|
+
/**
|
|
32
|
+
* Returns whether an element will successfully validate based on forms
|
|
33
|
+
* validation rules and constraints.
|
|
34
|
+
*
|
|
35
|
+
* Disabled and readonly elements will not validate.
|
|
36
|
+
*
|
|
37
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate
|
|
38
|
+
*/
|
|
39
|
+
readonly willValidate: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Checks the element's constraint validation and returns true if the element
|
|
42
|
+
* is valid or false if not.
|
|
43
|
+
*
|
|
44
|
+
* If invalid, this method will dispatch an `invalid` event.
|
|
45
|
+
*
|
|
46
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/checkValidity
|
|
47
|
+
*
|
|
48
|
+
* @return true if the element is valid, or false if not.
|
|
49
|
+
*/
|
|
50
|
+
checkValidity(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Checks the element's constraint validation and returns true if the element
|
|
53
|
+
* is valid or false if not.
|
|
54
|
+
*
|
|
55
|
+
* If invalid, this method will dispatch a cancelable `invalid` event. If not
|
|
56
|
+
* canceled, a the current `validationMessage` will be reported to the user.
|
|
57
|
+
*
|
|
58
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/reportValidity
|
|
59
|
+
*
|
|
60
|
+
* @return true if the element is valid, or false if not.
|
|
61
|
+
*/
|
|
62
|
+
reportValidity(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the element's constraint validation error message. When set to a
|
|
65
|
+
* non-empty string, `validity.customError` will be true and
|
|
66
|
+
* `validationMessage` will display the provided error.
|
|
67
|
+
*
|
|
68
|
+
* Use this method to customize error messages reported.
|
|
69
|
+
*
|
|
70
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity
|
|
71
|
+
*
|
|
72
|
+
* @param error The error message to display, or an empty string.
|
|
73
|
+
*/
|
|
74
|
+
setCustomValidity(error: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Creates and returns a `Validator` that is used to compute and cache
|
|
77
|
+
* validity for the element.
|
|
78
|
+
*
|
|
79
|
+
* A validator that caches validity is important since constraint validation
|
|
80
|
+
* must be computed synchronously and frequently in response to constraint
|
|
81
|
+
* validation property changes.
|
|
82
|
+
*/
|
|
83
|
+
[createValidator](): Validator<unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns shadow DOM child that is used as the anchor for the platform
|
|
86
|
+
* `reportValidity()` popup. This is often the root element or the inner
|
|
87
|
+
* focus-delegated element.
|
|
88
|
+
*/
|
|
89
|
+
[getValidityAnchor](): HTMLElement | null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A symbol property used to create a constraint validation `Validator`.
|
|
93
|
+
* Required for all `mixinConstraintValidation()` elements.
|
|
94
|
+
*/
|
|
95
|
+
export declare const createValidator: unique symbol;
|
|
96
|
+
/**
|
|
97
|
+
* A symbol property used to return an anchor for constraint validation popups.
|
|
98
|
+
* Required for all `mixinConstraintValidation()` elements.
|
|
99
|
+
*/
|
|
100
|
+
export declare const getValidityAnchor: unique symbol;
|
|
101
|
+
/**
|
|
102
|
+
* Mixes in constraint validation APIs for an element.
|
|
103
|
+
*
|
|
104
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation
|
|
105
|
+
* for more details.
|
|
106
|
+
*
|
|
107
|
+
* Implementations must provide a validator to cache and compute its validity,
|
|
108
|
+
* along with a shadow root element to anchor validation popups to.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* const baseClass = mixinConstraintValidation(
|
|
113
|
+
* mixinFormAssociated(mixinElementInternals(LitElement))
|
|
114
|
+
* );
|
|
115
|
+
*
|
|
116
|
+
* class MyCheckbox extends baseClass {
|
|
117
|
+
* \@property({type: Boolean}) checked = false;
|
|
118
|
+
* \@property({type: Boolean}) required = false;
|
|
119
|
+
*
|
|
120
|
+
* [createValidator]() {
|
|
121
|
+
* return new CheckboxValidator(() => this);
|
|
122
|
+
* }
|
|
123
|
+
*
|
|
124
|
+
* [getValidityAnchor]() {
|
|
125
|
+
* return this.renderRoot.querySelector('.root');
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @param base The class to mix functionality into.
|
|
131
|
+
* @return The provided class with `ConstraintValidation` mixed in.
|
|
132
|
+
*/
|
|
133
|
+
export declare function mixinConstraintValidation<T extends MixinBase<LitElement & FormAssociated & WithElementInternals>>(base: T): MixinReturn<T, ConstraintValidation>;
|