lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
542 lines • 25.7 kB
JavaScript
import { TextAlignMode } from '../helpers/TextHelper.js';
import { FlexAlignment } from './FlexAlignment.js';
import { Alignment } from './Alignment.js';
/**
* The base class for {@link Widget} and {@link Theme}. The backbone of the
* theming system.
*
* @category Theme
*/
export class BaseTheme {
/**
* The fallback theme. If this theme has a missing property, the fallback
* theme's property will be used instead. This will automatically
* (un)subscribe to/from the fallback theme.
*/
get fallbackTheme() {
return this._fallbackTheme;
}
set fallbackTheme(newTheme) {
if (this._fallbackTheme === newTheme) {
return;
}
// Unsubscribe from old theme
const oldTheme = this._fallbackTheme;
if (typeof oldTheme !== 'undefined' && this.listener !== null) {
oldTheme.unsubscribe(this.listener);
}
// Subscribe to new theme
if (typeof newTheme !== 'undefined') {
this.listener = (property) => this.onThemeUpdated(property);
newTheme.subscribe(this.listener);
}
// Set theme
this._fallbackTheme = newTheme;
// Notify that the fallback theme has changed
this.onThemeUpdated();
}
/**
* Called when the fallback theme changes. Does nothing by default.
*
* @param property - The property name of the theme property that was updated. If a general theme update, then this will be null and all theme properties should be treated as changed.
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
onThemeUpdated(property = null) { }
constructor(properties, fallbackTheme) {
/** Listener for theme fallback */
this.listener = null;
this._fallbackTheme = fallbackTheme;
if (typeof properties === 'undefined') {
return;
}
// XXX BASETHEME CTOR AUTO-GENERATED CODE START
this._canvasFill = properties.canvasFill;
this._containerPadding = properties.containerPadding;
this._containerAlignment = properties.containerAlignment;
this._multiContainerSpacing = properties.multiContainerSpacing;
this._multiContainerAlignment = properties.multiContainerAlignment;
this._primaryFill = properties.primaryFill;
this._accentFill = properties.accentFill;
this._backgroundFill = properties.backgroundFill;
this._backgroundGlowFill = properties.backgroundGlowFill;
this._sliderMinLength = properties.sliderMinLength;
this._sliderThickness = properties.sliderThickness;
this._bodyTextFont = properties.bodyTextFont;
this._bodyTextFill = properties.bodyTextFill;
this._bodyTextHeight = properties.bodyTextHeight;
this._bodyTextSpacing = properties.bodyTextSpacing;
this._bodyTextAlign = properties.bodyTextAlign;
this._checkboxLength = properties.checkboxLength;
this._checkboxInnerPadding = properties.checkboxInnerPadding;
this._inputBackgroundFill = properties.inputBackgroundFill;
this._inputSelectBackgroundFill = properties.inputSelectBackgroundFill;
this._inputTextFont = properties.inputTextFont;
this._inputTextFill = properties.inputTextFill;
this._inputTextFillDisabled = properties.inputTextFillDisabled;
this._inputTextFillInvalid = properties.inputTextFillInvalid;
this._inputTextHeight = properties.inputTextHeight;
this._inputTextSpacing = properties.inputTextSpacing;
this._inputTextInnerPadding = properties.inputTextInnerPadding;
this._inputTextMinWidth = properties.inputTextMinWidth;
this._inputTextAlign = properties.inputTextAlign;
this._blinkRate = properties.blinkRate;
this._cursorThickness = properties.cursorThickness;
this._cursorIndicatorSize = properties.cursorIndicatorSize;
this._scrollBarThickness = properties.scrollBarThickness;
this._scrollBarMinPercent = properties.scrollBarMinPercent;
this._scrollBarMinPixels = properties.scrollBarMinPixels;
this._radioButtonLength = properties.radioButtonLength;
this._radioButtonInnerPadding = properties.radioButtonInnerPadding;
this._roundedCornersRadii = properties.roundedCornersRadii;
this._tooltipFill = properties.tooltipFill;
this._tooltipPadding = properties.tooltipPadding;
this._tooltipRadii = properties.tooltipRadii;
this._scrollbarCornersRadii = properties.scrollbarCornersRadii;
this._scrollbarPadding = properties.scrollbarPadding;
this._mediaFallbackFill = properties.mediaFallbackFill;
// XXX BASETHEME CTOR AUTO-GENERATED CODE END
}
get canvasFill() {
var _a, _b, _c;
return (_c = (_a = this._canvasFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.canvasFill) !== null && _c !== void 0 ? _c : 'rgba(0,0,0,0.5)';
}
set canvasFill(value) {
if (this._canvasFill !== value) {
this._canvasFill = value;
this.onThemeUpdated('canvasFill');
}
}
get containerPadding() {
var _a, _b, _c;
return (_c = (_a = this._containerPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.containerPadding) !== null && _c !== void 0 ? _c : { left: 4, right: 4, top: 4, bottom: 4 };
}
set containerPadding(value) {
if (this._containerPadding !== value) {
this._containerPadding = value;
this.onThemeUpdated('containerPadding');
}
}
get containerAlignment() {
var _a, _b, _c;
return (_c = (_a = this._containerAlignment) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.containerAlignment) !== null && _c !== void 0 ? _c : { horizontal: Alignment.Stretch, vertical: Alignment.Stretch };
}
set containerAlignment(value) {
if (this._containerAlignment !== value) {
this._containerAlignment = value;
this.onThemeUpdated('containerAlignment');
}
}
get multiContainerSpacing() {
var _a, _b, _c;
return (_c = (_a = this._multiContainerSpacing) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.multiContainerSpacing) !== null && _c !== void 0 ? _c : 4;
}
set multiContainerSpacing(value) {
if (this._multiContainerSpacing !== value) {
this._multiContainerSpacing = value;
this.onThemeUpdated('multiContainerSpacing');
}
}
get multiContainerAlignment() {
var _a, _b, _c;
return (_c = (_a = this._multiContainerAlignment) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.multiContainerAlignment) !== null && _c !== void 0 ? _c : { main: FlexAlignment.SpaceBetween, cross: Alignment.Stretch };
}
set multiContainerAlignment(value) {
if (this._multiContainerAlignment !== value) {
this._multiContainerAlignment = value;
this.onThemeUpdated('multiContainerAlignment');
}
}
get primaryFill() {
var _a, _b, _c;
return (_c = (_a = this._primaryFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.primaryFill) !== null && _c !== void 0 ? _c : 'rgb(0,127,255)';
}
set primaryFill(value) {
if (this._primaryFill !== value) {
this._primaryFill = value;
this.onThemeUpdated('primaryFill');
}
}
get accentFill() {
var _a, _b, _c;
return (_c = (_a = this._accentFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.accentFill) !== null && _c !== void 0 ? _c : 'rgb(0,195,255)';
}
set accentFill(value) {
if (this._accentFill !== value) {
this._accentFill = value;
this.onThemeUpdated('accentFill');
}
}
get backgroundFill() {
var _a, _b, _c;
return (_c = (_a = this._backgroundFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.backgroundFill) !== null && _c !== void 0 ? _c : 'rgb(32,32,32)';
}
set backgroundFill(value) {
if (this._backgroundFill !== value) {
this._backgroundFill = value;
this.onThemeUpdated('backgroundFill');
}
}
get backgroundGlowFill() {
var _a, _b, _c;
return (_c = (_a = this._backgroundGlowFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.backgroundGlowFill) !== null && _c !== void 0 ? _c : 'rgb(48,48,48)';
}
set backgroundGlowFill(value) {
if (this._backgroundGlowFill !== value) {
this._backgroundGlowFill = value;
this.onThemeUpdated('backgroundGlowFill');
}
}
get sliderMinLength() {
var _a, _b, _c;
return (_c = (_a = this._sliderMinLength) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.sliderMinLength) !== null && _c !== void 0 ? _c : 100;
}
set sliderMinLength(value) {
if (this._sliderMinLength !== value) {
this._sliderMinLength = value;
this.onThemeUpdated('sliderMinLength');
}
}
get sliderThickness() {
var _a, _b, _c;
return (_c = (_a = this._sliderThickness) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.sliderThickness) !== null && _c !== void 0 ? _c : 10;
}
set sliderThickness(value) {
if (this._sliderThickness !== value) {
this._sliderThickness = value;
this.onThemeUpdated('sliderThickness');
}
}
get bodyTextFont() {
var _a, _b, _c;
return (_c = (_a = this._bodyTextFont) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.bodyTextFont) !== null && _c !== void 0 ? _c : '16px sans-serif';
}
set bodyTextFont(value) {
if (this._bodyTextFont !== value) {
this._bodyTextFont = value;
this.onThemeUpdated('bodyTextFont');
}
}
get bodyTextFill() {
var _a, _b, _c;
return (_c = (_a = this._bodyTextFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.bodyTextFill) !== null && _c !== void 0 ? _c : 'white';
}
set bodyTextFill(value) {
if (this._bodyTextFill !== value) {
this._bodyTextFill = value;
this.onThemeUpdated('bodyTextFill');
}
}
get bodyTextHeight() {
var _a, _b, _c;
return (_c = (_a = this._bodyTextHeight) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.bodyTextHeight) !== null && _c !== void 0 ? _c : null;
}
set bodyTextHeight(value) {
if (this._bodyTextHeight !== value) {
this._bodyTextHeight = value;
this.onThemeUpdated('bodyTextHeight');
}
}
get bodyTextSpacing() {
var _a, _b, _c;
return (_c = (_a = this._bodyTextSpacing) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.bodyTextSpacing) !== null && _c !== void 0 ? _c : null;
}
set bodyTextSpacing(value) {
if (this._bodyTextSpacing !== value) {
this._bodyTextSpacing = value;
this.onThemeUpdated('bodyTextSpacing');
}
}
get bodyTextAlign() {
var _a, _b, _c;
return (_c = (_a = this._bodyTextAlign) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.bodyTextAlign) !== null && _c !== void 0 ? _c : TextAlignMode.Start;
}
set bodyTextAlign(value) {
if (this._bodyTextAlign !== value) {
this._bodyTextAlign = value;
this.onThemeUpdated('bodyTextAlign');
}
}
get checkboxLength() {
var _a, _b, _c;
return (_c = (_a = this._checkboxLength) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.checkboxLength) !== null && _c !== void 0 ? _c : 12;
}
set checkboxLength(value) {
if (this._checkboxLength !== value) {
this._checkboxLength = value;
this.onThemeUpdated('checkboxLength');
}
}
get checkboxInnerPadding() {
var _a, _b, _c;
return (_c = (_a = this._checkboxInnerPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.checkboxInnerPadding) !== null && _c !== void 0 ? _c : 2;
}
set checkboxInnerPadding(value) {
if (this._checkboxInnerPadding !== value) {
this._checkboxInnerPadding = value;
this.onThemeUpdated('checkboxInnerPadding');
}
}
get inputBackgroundFill() {
var _a, _b, _c;
return (_c = (_a = this._inputBackgroundFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputBackgroundFill) !== null && _c !== void 0 ? _c : 'white';
}
set inputBackgroundFill(value) {
if (this._inputBackgroundFill !== value) {
this._inputBackgroundFill = value;
this.onThemeUpdated('inputBackgroundFill');
}
}
get inputSelectBackgroundFill() {
var _a, _b, _c;
return (_c = (_a = this._inputSelectBackgroundFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputSelectBackgroundFill) !== null && _c !== void 0 ? _c : 'rgb(0,195,255)';
}
set inputSelectBackgroundFill(value) {
if (this._inputSelectBackgroundFill !== value) {
this._inputSelectBackgroundFill = value;
this.onThemeUpdated('inputSelectBackgroundFill');
}
}
get inputTextFont() {
var _a, _b, _c;
return (_c = (_a = this._inputTextFont) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextFont) !== null && _c !== void 0 ? _c : '16px monospace';
}
set inputTextFont(value) {
if (this._inputTextFont !== value) {
this._inputTextFont = value;
this.onThemeUpdated('inputTextFont');
}
}
get inputTextFill() {
var _a, _b, _c;
return (_c = (_a = this._inputTextFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextFill) !== null && _c !== void 0 ? _c : 'black';
}
set inputTextFill(value) {
if (this._inputTextFill !== value) {
this._inputTextFill = value;
this.onThemeUpdated('inputTextFill');
}
}
get inputTextFillDisabled() {
var _a, _b, _c;
return (_c = (_a = this._inputTextFillDisabled) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextFillDisabled) !== null && _c !== void 0 ? _c : 'grey';
}
set inputTextFillDisabled(value) {
if (this._inputTextFillDisabled !== value) {
this._inputTextFillDisabled = value;
this.onThemeUpdated('inputTextFillDisabled');
}
}
get inputTextFillInvalid() {
var _a, _b, _c;
return (_c = (_a = this._inputTextFillInvalid) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextFillInvalid) !== null && _c !== void 0 ? _c : 'red';
}
set inputTextFillInvalid(value) {
if (this._inputTextFillInvalid !== value) {
this._inputTextFillInvalid = value;
this.onThemeUpdated('inputTextFillInvalid');
}
}
get inputTextHeight() {
var _a, _b, _c;
return (_c = (_a = this._inputTextHeight) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextHeight) !== null && _c !== void 0 ? _c : null;
}
set inputTextHeight(value) {
if (this._inputTextHeight !== value) {
this._inputTextHeight = value;
this.onThemeUpdated('inputTextHeight');
}
}
get inputTextSpacing() {
var _a, _b, _c;
return (_c = (_a = this._inputTextSpacing) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextSpacing) !== null && _c !== void 0 ? _c : null;
}
set inputTextSpacing(value) {
if (this._inputTextSpacing !== value) {
this._inputTextSpacing = value;
this.onThemeUpdated('inputTextSpacing');
}
}
get inputTextInnerPadding() {
var _a, _b, _c;
return (_c = (_a = this._inputTextInnerPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextInnerPadding) !== null && _c !== void 0 ? _c : 2;
}
set inputTextInnerPadding(value) {
if (this._inputTextInnerPadding !== value) {
this._inputTextInnerPadding = value;
this.onThemeUpdated('inputTextInnerPadding');
}
}
get inputTextMinWidth() {
var _a, _b, _c;
return (_c = (_a = this._inputTextMinWidth) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextMinWidth) !== null && _c !== void 0 ? _c : 100;
}
set inputTextMinWidth(value) {
if (this._inputTextMinWidth !== value) {
this._inputTextMinWidth = value;
this.onThemeUpdated('inputTextMinWidth');
}
}
get inputTextAlign() {
var _a, _b, _c;
return (_c = (_a = this._inputTextAlign) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.inputTextAlign) !== null && _c !== void 0 ? _c : TextAlignMode.Start;
}
set inputTextAlign(value) {
if (this._inputTextAlign !== value) {
this._inputTextAlign = value;
this.onThemeUpdated('inputTextAlign');
}
}
get blinkRate() {
var _a, _b, _c;
return (_c = (_a = this._blinkRate) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.blinkRate) !== null && _c !== void 0 ? _c : 0.8;
}
set blinkRate(value) {
if (this._blinkRate !== value) {
this._blinkRate = value;
this.onThemeUpdated('blinkRate');
}
}
get cursorThickness() {
var _a, _b, _c;
return (_c = (_a = this._cursorThickness) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.cursorThickness) !== null && _c !== void 0 ? _c : 1;
}
set cursorThickness(value) {
if (this._cursorThickness !== value) {
this._cursorThickness = value;
this.onThemeUpdated('cursorThickness');
}
}
get cursorIndicatorSize() {
var _a, _b, _c;
return (_c = (_a = this._cursorIndicatorSize) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.cursorIndicatorSize) !== null && _c !== void 0 ? _c : 6;
}
set cursorIndicatorSize(value) {
if (this._cursorIndicatorSize !== value) {
this._cursorIndicatorSize = value;
this.onThemeUpdated('cursorIndicatorSize');
}
}
get scrollBarThickness() {
var _a, _b, _c;
return (_c = (_a = this._scrollBarThickness) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.scrollBarThickness) !== null && _c !== void 0 ? _c : 8;
}
set scrollBarThickness(value) {
if (this._scrollBarThickness !== value) {
this._scrollBarThickness = value;
this.onThemeUpdated('scrollBarThickness');
}
}
get scrollBarMinPercent() {
var _a, _b, _c;
return (_c = (_a = this._scrollBarMinPercent) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.scrollBarMinPercent) !== null && _c !== void 0 ? _c : 0.1;
}
set scrollBarMinPercent(value) {
if (this._scrollBarMinPercent !== value) {
this._scrollBarMinPercent = value;
this.onThemeUpdated('scrollBarMinPercent');
}
}
get scrollBarMinPixels() {
var _a, _b, _c;
return (_c = (_a = this._scrollBarMinPixels) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.scrollBarMinPixels) !== null && _c !== void 0 ? _c : 20;
}
set scrollBarMinPixels(value) {
if (this._scrollBarMinPixels !== value) {
this._scrollBarMinPixels = value;
this.onThemeUpdated('scrollBarMinPixels');
}
}
get radioButtonLength() {
var _a, _b, _c;
return (_c = (_a = this._radioButtonLength) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.radioButtonLength) !== null && _c !== void 0 ? _c : 12;
}
set radioButtonLength(value) {
if (this._radioButtonLength !== value) {
this._radioButtonLength = value;
this.onThemeUpdated('radioButtonLength');
}
}
get radioButtonInnerPadding() {
var _a, _b, _c;
return (_c = (_a = this._radioButtonInnerPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.radioButtonInnerPadding) !== null && _c !== void 0 ? _c : 2;
}
set radioButtonInnerPadding(value) {
if (this._radioButtonInnerPadding !== value) {
this._radioButtonInnerPadding = value;
this.onThemeUpdated('radioButtonInnerPadding');
}
}
get roundedCornersRadii() {
var _a, _b, _c;
return (_c = (_a = this._roundedCornersRadii) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.roundedCornersRadii) !== null && _c !== void 0 ? _c : 8;
}
set roundedCornersRadii(value) {
if (this._roundedCornersRadii !== value) {
this._roundedCornersRadii = value;
this.onThemeUpdated('roundedCornersRadii');
}
}
get tooltipFill() {
var _a, _b, _c;
return (_c = (_a = this._tooltipFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.tooltipFill) !== null && _c !== void 0 ? _c : 'rgba(0,0,0,0.5)';
}
set tooltipFill(value) {
if (this._tooltipFill !== value) {
this._tooltipFill = value;
this.onThemeUpdated('tooltipFill');
}
}
get tooltipPadding() {
var _a, _b, _c;
return (_c = (_a = this._tooltipPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.tooltipPadding) !== null && _c !== void 0 ? _c : { left: 4, right: 4, top: 4, bottom: 4 };
}
set tooltipPadding(value) {
if (this._tooltipPadding !== value) {
this._tooltipPadding = value;
this.onThemeUpdated('tooltipPadding');
}
}
get tooltipRadii() {
var _a, _b, _c;
return (_c = (_a = this._tooltipRadii) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.tooltipRadii) !== null && _c !== void 0 ? _c : 8;
}
set tooltipRadii(value) {
if (this._tooltipRadii !== value) {
this._tooltipRadii = value;
this.onThemeUpdated('tooltipRadii');
}
}
get scrollbarCornersRadii() {
var _a, _b, _c;
return (_c = (_a = this._scrollbarCornersRadii) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.scrollbarCornersRadii) !== null && _c !== void 0 ? _c : 0;
}
set scrollbarCornersRadii(value) {
if (this._scrollbarCornersRadii !== value) {
this._scrollbarCornersRadii = value;
this.onThemeUpdated('scrollbarCornersRadii');
}
}
get scrollbarPadding() {
var _a, _b, _c;
return (_c = (_a = this._scrollbarPadding) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.scrollbarPadding) !== null && _c !== void 0 ? _c : { left: 0, right: 0, top: 0, bottom: 0 };
}
set scrollbarPadding(value) {
if (this._scrollbarPadding !== value) {
this._scrollbarPadding = value;
this.onThemeUpdated('scrollbarPadding');
}
}
get mediaFallbackFill() {
var _a, _b, _c;
return (_c = (_a = this._mediaFallbackFill) !== null && _a !== void 0 ? _a : (_b = this._fallbackTheme) === null || _b === void 0 ? void 0 : _b.mediaFallbackFill) !== null && _c !== void 0 ? _c : 'transparent';
}
set mediaFallbackFill(value) {
if (this._mediaFallbackFill !== value) {
this._mediaFallbackFill = value;
this.onThemeUpdated('mediaFallbackFill');
}
}
}
//# sourceMappingURL=BaseTheme.js.map