font-picker
Advanced tools
Comparing version 3.0.3 to 3.1.0
@@ -5,3 +5,3 @@ import { Font, FontList, Options } from "../shared/types"; | ||
private readonly options; | ||
private readonly onChange; | ||
private onChange; | ||
private activeFontFamily; | ||
@@ -17,3 +17,4 @@ private fonts; | ||
setActiveFont(fontFamily: string, runOnChange?: boolean): void; | ||
setOnChange(onChange: (font: Font) => void): void; | ||
} | ||
//# sourceMappingURL=FontManager.d.ts.map |
@@ -368,2 +368,5 @@ /*! ***************************************************************************** | ||
}; | ||
FontManager.prototype.setOnChange = function (onChange) { | ||
this.onChange = onChange; | ||
}; | ||
return FontManager; | ||
@@ -370,0 +373,0 @@ }()); |
@@ -374,2 +374,5 @@ (function (global, factory) { | ||
}; | ||
FontManager.prototype.setOnChange = function (onChange) { | ||
this.onChange = onChange; | ||
}; | ||
return FontManager; | ||
@@ -376,0 +379,0 @@ }()); |
@@ -5,3 +5,3 @@ import { Font, FontList, Options } from "../shared/types"; | ||
private readonly options; | ||
private readonly onChange; | ||
private onChange; | ||
private activeFontFamily; | ||
@@ -17,3 +17,4 @@ private fonts; | ||
setActiveFont(fontFamily: string, runOnChange?: boolean): void; | ||
setOnChange(onChange: (font: Font) => void): void; | ||
} | ||
//# sourceMappingURL=FontManager.d.ts.map |
@@ -22,3 +22,4 @@ import { Font, FontList, Options } from "../shared/types"; | ||
setActiveFont(fontFamily: string): void; | ||
setOnChange(onChange: (font: Font) => void): void; | ||
} | ||
//# sourceMappingURL=FontPicker.d.ts.map |
@@ -368,2 +368,5 @@ /*! ***************************************************************************** | ||
}; | ||
FontManager.prototype.setOnChange = function (onChange) { | ||
this.onChange = onChange; | ||
}; | ||
return FontManager; | ||
@@ -408,2 +411,4 @@ }()); | ||
this.expanded = false; | ||
this.closeEventListener = this.closeEventListener.bind(this); | ||
this.toggleExpanded = this.toggleExpanded.bind(this); | ||
var options = { | ||
@@ -419,3 +424,2 @@ pickerId: pickerId, | ||
this.generateUI(sort); | ||
this.closeEventListener = this.closeEventListener.bind(this); | ||
} | ||
@@ -432,4 +436,4 @@ FontPicker.prototype.generateUI = function (sort) { | ||
this.dropdownButton.classList.add("dropdown-button"); | ||
this.dropdownButton.onclick = function () { return _this.toggleExpanded(); }; | ||
this.dropdownButton.onkeypress = function () { return _this.toggleExpanded(); }; | ||
this.dropdownButton.onclick = this.toggleExpanded; | ||
this.dropdownButton.onkeypress = this.toggleExpanded; | ||
this.dropdownButton.type = "button"; | ||
@@ -550,2 +554,5 @@ this.fontPickerDiv.appendChild(this.dropdownButton); | ||
}; | ||
FontPicker.prototype.setOnChange = function (onChange) { | ||
this.fontManager.setOnChange(onChange); | ||
}; | ||
return FontPicker; | ||
@@ -552,0 +559,0 @@ }()); |
@@ -374,2 +374,5 @@ (function (global, factory) { | ||
}; | ||
FontManager.prototype.setOnChange = function (onChange) { | ||
this.onChange = onChange; | ||
}; | ||
return FontManager; | ||
@@ -414,2 +417,4 @@ }()); | ||
this.expanded = false; | ||
this.closeEventListener = this.closeEventListener.bind(this); | ||
this.toggleExpanded = this.toggleExpanded.bind(this); | ||
var options = { | ||
@@ -425,3 +430,2 @@ pickerId: pickerId, | ||
this.generateUI(sort); | ||
this.closeEventListener = this.closeEventListener.bind(this); | ||
} | ||
@@ -438,4 +442,4 @@ FontPicker.prototype.generateUI = function (sort) { | ||
this.dropdownButton.classList.add("dropdown-button"); | ||
this.dropdownButton.onclick = function () { return _this.toggleExpanded(); }; | ||
this.dropdownButton.onkeypress = function () { return _this.toggleExpanded(); }; | ||
this.dropdownButton.onclick = this.toggleExpanded; | ||
this.dropdownButton.onkeypress = this.toggleExpanded; | ||
this.dropdownButton.type = "button"; | ||
@@ -556,2 +560,5 @@ this.fontPickerDiv.appendChild(this.dropdownButton); | ||
}; | ||
FontPicker.prototype.setOnChange = function (onChange) { | ||
this.fontManager.setOnChange(onChange); | ||
}; | ||
return FontPicker; | ||
@@ -558,0 +565,0 @@ }()); |
{ | ||
"name": "font-picker", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "Font selector component for Google Fonts", | ||
@@ -33,6 +33,8 @@ "author": "Samuel Meuli <me@samuelmeuli.com>", | ||
"format": "prettier --write", | ||
"lint:css": "stylelint --fix", | ||
"lint:scss": "stylelint --fix --syntax scss", | ||
"lint:js": "eslint --ext .js,.jsx --fix", | ||
"lint:ts": "eslint --ext .ts,.tsx --fix" | ||
"lint:css": "stylelint --fix --max-warnings 0", | ||
"lint:scss": "stylelint --fix --max-warnings 0 --syntax scss", | ||
"lint:js": "eslint --ext .js,.jsx --fix --max-warnings 0", | ||
"lint:ts": "eslint --ext .ts,.tsx --fix --max-warnings 0", | ||
"version": "yarn build", | ||
"release": "np" | ||
}, | ||
@@ -52,2 +54,3 @@ "devDependencies": { | ||
"node-sass": "^4.10.0", | ||
"np": "^5.0.2", | ||
"npm-run-all": "^4.1.3", | ||
@@ -54,0 +57,0 @@ "postcss": "^7.0.14", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126230
1965
22