@thinkpixellab-public/px-vue 4.0.20 → 4.0.22
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.
|
@@ -21,7 +21,7 @@ ar
|
|
|
21
21
|
<PxIconButton
|
|
22
22
|
v-if="!disabled && !arrowsHidden"
|
|
23
23
|
:class="[bem('button', { start: true, visible: arrowStartVisible }), buttonClass]"
|
|
24
|
-
:iconClass="
|
|
24
|
+
:iconClass="combineIconClasses(bem('arrow-icon'), iconClass)"
|
|
25
25
|
:icon="arrowStartIcon"
|
|
26
26
|
:disabled="!arrowStartVisible"
|
|
27
27
|
aria-label="Scroll to previous"
|
|
@@ -40,7 +40,7 @@ ar
|
|
|
40
40
|
<PxIconButton
|
|
41
41
|
v-if="!disabled && !arrowsHidden"
|
|
42
42
|
:class="[bem('button', { end: true, visible: arrowEndVisible }), buttonClass]"
|
|
43
|
-
:iconClass="
|
|
43
|
+
:iconClass="combineIconClasses(bem('arrow-icon'), iconClass)"
|
|
44
44
|
:icon="arrowEndIcon"
|
|
45
45
|
:disabled="!arrowEndVisible"
|
|
46
46
|
aria-label="Scroll to next"
|
|
@@ -139,6 +139,9 @@ export default {
|
|
|
139
139
|
},
|
|
140
140
|
|
|
141
141
|
methods: {
|
|
142
|
+
combineIconClasses(...classNames) {
|
|
143
|
+
return classNames.filter((c) => c).join(' ');
|
|
144
|
+
},
|
|
142
145
|
pxIconProps(attrs) {
|
|
143
146
|
return propsFilter(PxIcon)(attrs);
|
|
144
147
|
},
|
|
@@ -35,6 +35,7 @@ const PxColorPicker = {
|
|
|
35
35
|
name: 'px-color-picker',
|
|
36
36
|
components: { PxFloat, PxColorPanel, PxColorPaletteButton, PxIcon },
|
|
37
37
|
mixins: [PxBaseColor],
|
|
38
|
+
emits: ['click'],
|
|
38
39
|
props: {
|
|
39
40
|
/**
|
|
40
41
|
* An icon to display inside the button. If a string is provided, it will be interpreted as
|
package/components/PxTextbox.vue
CHANGED
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
multiline: { type: Boolean, default: false },
|
|
31
31
|
|
|
32
32
|
// the value of the textbox
|
|
33
|
-
|
|
33
|
+
text: { type: String, default: null },
|
|
34
34
|
|
|
35
35
|
// whether to fire an update / v-model event on every character change ('input') or when the textbox loses focus ('change')
|
|
36
36
|
updateMode: {
|
|
@@ -58,12 +58,12 @@ export default {
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
watch: {
|
|
61
|
-
|
|
61
|
+
text(nv) {
|
|
62
62
|
this.setValue(nv);
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
mounted() {
|
|
66
|
-
this.setValue(this.
|
|
66
|
+
this.setValue(this.text);
|
|
67
67
|
},
|
|
68
68
|
|
|
69
69
|
methods: {
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
this.$refs.input.textContent = val;
|
|
100
100
|
|
|
101
101
|
// raise an update event
|
|
102
|
-
this.$emit('update:
|
|
102
|
+
this.$emit('update:text', val);
|
|
103
103
|
|
|
104
104
|
// update the caret position
|
|
105
105
|
const newPos = startPos + (val.length - prevValue.length);
|
package/components/PxVueTest.vue
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
>
|
|
130
130
|
<template #default="v">
|
|
131
131
|
<px-textbox
|
|
132
|
-
v-model="validateOne"
|
|
132
|
+
v-model:text="validateOne"
|
|
133
133
|
:class="[v.class, v.requiredClass, v.violationClasses]"
|
|
134
134
|
/>
|
|
135
135
|
</template>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
>
|
|
143
143
|
<template #default="v">
|
|
144
144
|
<px-textbox
|
|
145
|
-
v-model="validateTwo"
|
|
145
|
+
v-model:text="validateTwo"
|
|
146
146
|
:class="[v.class, v.requiredClass, v.violationClasses]"
|
|
147
147
|
/>
|
|
148
148
|
</template>
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
<px-flex :vertical="true" :gap="1">
|
|
254
254
|
<div>currentText: {{ currentText }}</div>
|
|
255
255
|
|
|
256
|
-
<px-textbox v-model="currentText" placeholder="Say what you want..." />
|
|
256
|
+
<px-textbox v-model:text="currentText" placeholder="Say what you want..." />
|
|
257
257
|
|
|
258
258
|
<px-textbox
|
|
259
259
|
multiline
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
/>
|
|
264
264
|
|
|
265
265
|
<px-textbox type="password" />
|
|
266
|
-
<px-textbox :
|
|
266
|
+
<px-textbox :text="'hello@thinkpixellab.com'" type="email" />
|
|
267
267
|
</px-flex>
|
|
268
268
|
</px-test>
|
|
269
269
|
|