Gathering detailed insights and metrics for ember-spectrum-color-picker
Gathering detailed insights and metrics for ember-spectrum-color-picker
Gathering detailed insights and metrics for ember-spectrum-color-picker
Gathering detailed insights and metrics for ember-spectrum-color-picker
npm install ember-spectrum-color-picker
43.1
Supply Chain
78.6
Quality
69.2
Maintenance
100
Vulnerability
96.2
License
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
20 Stars
92 Commits
26 Forks
2 Watching
18 Branches
18 Contributors
Updated on 03 Nov 2020
JavaScript (86.89%)
HTML (13.11%)
Cumulative downloads
Total Downloads
Last day
31.4%
678
Compared to previous day
Last week
31.1%
3,150
Compared to previous week
Last month
6.9%
12,093
Compared to previous month
Last year
-30.7%
251,617
Compared to previous year
2
28
Simple Ember color picker component based on spectrum.js.
ember install ember-spectrum-color-picker
Example:
1{{spectrum-color-picker color=teamColor}}
The color
property should be set and will be updated through Ember's two-way bindings.
It's also possible to bind actions to the onChange
, onMove
, onShow
, and onHide
attributes. The action handler will receive the new color as a
parameter:
1{{spectrum-color-picker 2 color=teamColor 3 onChange=(action "colorChanged") 4 onShow=(action "pickerOpened") 5 onHide=(action "pickerClosed") 6 onMove=(action "userMovedColorPicker") 7}}
The following properties can be set to customize a particular color picker:
allowEmpty
(default: false
): whether or not the color value may be null.disabled
(default: false
): when set to true, the color picker is disabled.showInput
(default: false
): whether or not to show an input field in the color picker with the current color
value.preferredFormat
(default: null
): the preferred format for the color values displayed in the input. Values can be
"hex"
, "hex3"
, "hsl"
, "rgb"
or "name"
. When set to null, the format will adapt to a previously entered
format.showAlpha
(default: false
): whether or not to allow setting the alpha value in the color picker.showInitial
(default: false
): whether or not to show a box with the original color for comparison.showButtons
(default: true
): whether or not to show the 'choose' and 'cancel' buttons.showPalette
(default: false
): whether or not to show a color palette.showPaletteOnly
(default: false
): when set to true, only a color palette is shown.palette
(default: []
): array of color values to show in the palette. Can be an array of arrays, where each array
is a row in the palette. Pass this as a JSON string in the HBS file, like
palette='[["red","lime"],["yellow","blue"]]'
.togglePaletteOnly
(default: false
): initialy shows only the palette, but a 'more' button can be clicked for custom
colors.showSelectionPalette
(default: false
): shows a palette with the colors that were picked previously by the user.hideAfterPaletteSelect
(default: false
): when set to true, the palette will close when a color is selected.maxSelectionSize
(default: 7): sets the maximum number of colors shown on the palette.moveFiresChange
(default: false
): when set to true, the color value will be updated in real time, instead of only
once the user clicks the 'choose' button.clickoutFiresChange
(default: false
): when set to true, the color value will also update when the user clicks
outside the widget, instead of only once the user clicks the 'choose' button.chooseText
(default: 'Choose'
): the text displayed on the 'choose' button.cancelText
(default: 'Cancel'
): the text displayed on the 'cancel' button.togglePaletteMoreText
(default: 'More'
): the text displayed on the 'more' button when togglePaletteOnly
is set
to true.togglePaletteLessText
(default: 'Less'
): the text displayed on the 'less' button when togglePaletteOnly
is set
to true.appendTo
(default: 'body'
): the element the color picker widget is appended to. Changing this can help resolve
issues with opening the colorpicker in a modal dialog or fixed position container, for instance.localStorageKey
(default: 'spectrum-color-picker'
): the key used for local storage when showSelectionPalette
is
set to true.flatMode
(default: false
): when set to true, the color picker is always shown fully expanded.For a more detailed documentation on these options, see the spectrum.js documentation.
If you want to set different defaults for all color pickers in your application, extend the component and override the defaults with your own:
1// app/components/spectrum-color-picker.js 2import SpectrumColorPickerComponent from 'ember-spectrum-color-picker/components/spectrum-color-picker'; 3 4export default SpectrumColorPickerComponent.extend({ 5 showInput: true, 6 7 showAlpha: true 8});
See the Contributing guide for details.
This project is licensed under the MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 9/29 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
68 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More