@thinkpixellab-public/px-vue 3.0.105 → 3.0.107

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.
@@ -36,7 +36,8 @@ export default {
36
36
  /**
37
37
  * Array of colors to display in the palette
38
38
  */
39
- palette: { type: Array, default: null },
39
+ palette: { type: Array, default: () => [] },
40
+ paletteInitColor: { type: String, default: null },
40
41
 
41
42
  // none | picker | eyedropper | eyedropper-only
42
43
  pickerMode: { type: String, default: 'none' },
@@ -87,15 +88,21 @@ export default {
87
88
  return this.pickerMode != 'none';
88
89
  },
89
90
  },
90
- // watch: {},
91
+ watch: {
92
+ paletteInitColor(val) {
93
+ this.setColorHsva(this.colorStrToHsva(val));
94
+ },
95
+ },
91
96
  mounted() {},
92
97
  methods: {
93
98
  onPaletteClick(color) {
94
99
  this.pickerActive = false;
95
100
  this.setColorHsva(color.hsva);
101
+ this.$emit('paletteClick');
96
102
  },
97
103
  onPickerClick() {
98
104
  this.pickerActive = true;
105
+ this.$emit('pickerClick');
99
106
  },
100
107
  onPickerChange(e) {
101
108
  if (this.pickerActive) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "3.0.105",
3
+ "version": "3.0.107",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": "Pixel Lab",
6
6
  "license": "MIT",