@pequity/squirrel 5.4.10 → 5.5.0
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.
- package/dist/cjs/chunks/p-date-picker.js +2 -0
- package/dist/cjs/p-modal.js +10 -7
- package/dist/cjs/p-select-pill.js +2 -1
- package/dist/es/chunks/p-date-picker.js +2 -0
- package/dist/es/p-modal.js +10 -7
- package/dist/es/p-select-pill.js +2 -1
- package/dist/style.css +14 -14
- package/package.json +1 -1
- package/squirrel/components/p-date-picker/p-date-picker.vue +2 -0
- package/squirrel/components/p-modal/p-modal.vue +2 -2
- package/squirrel/components/p-select-pill/p-select-pill.spec.js +2 -0
- package/squirrel/components/p-select-pill/p-select-pill.vue +1 -0
|
@@ -132,6 +132,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
132
132
|
res.required = props.required;
|
|
133
133
|
res.disabled = props.disabled;
|
|
134
134
|
res.placeholder = props.placeholder ? props.placeholder : props.format;
|
|
135
|
+
res.name = props.name;
|
|
136
|
+
res.readonly = props.readonly;
|
|
135
137
|
return res;
|
|
136
138
|
});
|
|
137
139
|
const handleInput = (e, onInputFn, onClearFn) => {
|
package/dist/cjs/p-modal.js
CHANGED
|
@@ -15,7 +15,10 @@ const _hoisted_7 = {
|
|
|
15
15
|
class: "mb-4 px-8"
|
|
16
16
|
};
|
|
17
17
|
const _hoisted_8 = ["id"];
|
|
18
|
-
const _hoisted_9 = {
|
|
18
|
+
const _hoisted_9 = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "px-8 pt-6"
|
|
21
|
+
};
|
|
19
22
|
const FOCUSABLE_ELEMENTS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
20
23
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
24
|
...{
|
|
@@ -111,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
111
114
|
],
|
|
112
115
|
setup(__props, { emit: __emit }) {
|
|
113
116
|
vue.useCssVars((_ctx) => ({
|
|
114
|
-
"
|
|
117
|
+
"4895a587": __props.maxWidth
|
|
115
118
|
}));
|
|
116
119
|
let animatingZIndex = 0;
|
|
117
120
|
const emit = __emit;
|
|
@@ -352,11 +355,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
352
355
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
353
356
|
], 10, _hoisted_8)
|
|
354
357
|
], true),
|
|
355
|
-
|
|
356
|
-
vue.
|
|
358
|
+
vue.renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
|
|
359
|
+
_ctx.$slots["footer"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
357
360
|
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
358
|
-
])
|
|
359
|
-
], true)
|
|
361
|
+
])) : vue.createCommentVNode("", true)
|
|
362
|
+
], true)
|
|
360
363
|
], 14, _hoisted_3)
|
|
361
364
|
], 46, _hoisted_2), [
|
|
362
365
|
[vue.vShow, show.value]
|
|
@@ -368,5 +371,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
368
371
|
};
|
|
369
372
|
}
|
|
370
373
|
});
|
|
371
|
-
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
374
|
+
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5fd440a3"]]);
|
|
372
375
|
module.exports = pModal;
|
|
@@ -91,7 +91,7 @@ const _hoisted_2 = {
|
|
|
91
91
|
ref: "pill",
|
|
92
92
|
class: "absolute left-0 top-0 inline-block h-full rounded-full bg-surface duration-200 ease-in-out"
|
|
93
93
|
};
|
|
94
|
-
const _hoisted_3 = ["disabled", "onClick"];
|
|
94
|
+
const _hoisted_3 = ["disabled", "data-selected", "onClick"];
|
|
95
95
|
const _hoisted_4 = { class: "flex" };
|
|
96
96
|
const _hoisted_5 = {
|
|
97
97
|
key: 0,
|
|
@@ -109,6 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
109
109
|
_ctx.modelValue === o[_ctx.itemValue] ? `${_ctx.ACTIVE_CLASS} hover:text-p-purple-70` : "hover:text-p-gray-60",
|
|
110
110
|
{ "opacity-25": o.disabled }
|
|
111
111
|
]]),
|
|
112
|
+
"data-selected": _ctx.modelValue === o[_ctx.itemValue],
|
|
112
113
|
onClick: ($event) => _ctx.click($event, o)
|
|
113
114
|
}, [
|
|
114
115
|
vue.createElementVNode("div", _hoisted_4, [
|
|
@@ -131,6 +131,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
131
|
res.required = props.required;
|
|
132
132
|
res.disabled = props.disabled;
|
|
133
133
|
res.placeholder = props.placeholder ? props.placeholder : props.format;
|
|
134
|
+
res.name = props.name;
|
|
135
|
+
res.readonly = props.readonly;
|
|
134
136
|
return res;
|
|
135
137
|
});
|
|
136
138
|
const handleInput = (e, onInputFn, onClearFn) => {
|
package/dist/es/p-modal.js
CHANGED
|
@@ -14,7 +14,10 @@ const _hoisted_7 = {
|
|
|
14
14
|
class: "mb-4 px-8"
|
|
15
15
|
};
|
|
16
16
|
const _hoisted_8 = ["id"];
|
|
17
|
-
const _hoisted_9 = {
|
|
17
|
+
const _hoisted_9 = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "px-8 pt-6"
|
|
20
|
+
};
|
|
18
21
|
const FOCUSABLE_ELEMENTS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
19
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
23
|
...{
|
|
@@ -110,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
113
|
],
|
|
111
114
|
setup(__props, { emit: __emit }) {
|
|
112
115
|
useCssVars((_ctx) => ({
|
|
113
|
-
"
|
|
116
|
+
"4895a587": __props.maxWidth
|
|
114
117
|
}));
|
|
115
118
|
let animatingZIndex = 0;
|
|
116
119
|
const emit = __emit;
|
|
@@ -351,11 +354,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
351
354
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
352
355
|
], 10, _hoisted_8)
|
|
353
356
|
], true),
|
|
354
|
-
|
|
355
|
-
|
|
357
|
+
renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
|
|
358
|
+
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
356
359
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
357
|
-
])
|
|
358
|
-
], true)
|
|
360
|
+
])) : createCommentVNode("", true)
|
|
361
|
+
], true)
|
|
359
362
|
], 14, _hoisted_3)
|
|
360
363
|
], 46, _hoisted_2), [
|
|
361
364
|
[vShow, show.value]
|
|
@@ -367,7 +370,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
367
370
|
};
|
|
368
371
|
}
|
|
369
372
|
});
|
|
370
|
-
const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
373
|
+
const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5fd440a3"]]);
|
|
371
374
|
export {
|
|
372
375
|
pModal as default
|
|
373
376
|
};
|
package/dist/es/p-select-pill.js
CHANGED
|
@@ -90,7 +90,7 @@ const _hoisted_2 = {
|
|
|
90
90
|
ref: "pill",
|
|
91
91
|
class: "absolute left-0 top-0 inline-block h-full rounded-full bg-surface duration-200 ease-in-out"
|
|
92
92
|
};
|
|
93
|
-
const _hoisted_3 = ["disabled", "onClick"];
|
|
93
|
+
const _hoisted_3 = ["disabled", "data-selected", "onClick"];
|
|
94
94
|
const _hoisted_4 = { class: "flex" };
|
|
95
95
|
const _hoisted_5 = {
|
|
96
96
|
key: 0,
|
|
@@ -108,6 +108,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
108
108
|
_ctx.modelValue === o[_ctx.itemValue] ? `${_ctx.ACTIVE_CLASS} hover:text-p-purple-70` : "hover:text-p-gray-60",
|
|
109
109
|
{ "opacity-25": o.disabled }
|
|
110
110
|
]]),
|
|
111
|
+
"data-selected": _ctx.modelValue === o[_ctx.itemValue],
|
|
111
112
|
onClick: ($event) => _ctx.click($event, o)
|
|
112
113
|
}, [
|
|
113
114
|
createElementVNode("div", _hoisted_4, [
|
package/dist/style.css
CHANGED
|
@@ -367,33 +367,33 @@ to {
|
|
|
367
367
|
opacity: 0;
|
|
368
368
|
transform: translate3d(0, -100%, 0);
|
|
369
369
|
}
|
|
370
|
-
}.pm[data-v-
|
|
370
|
+
}.pm[data-v-5fd440a3] {
|
|
371
371
|
width: calc(100% - 32px);
|
|
372
372
|
min-width: 110px;
|
|
373
|
-
max-width: var(--
|
|
373
|
+
max-width: var(--4895a587);
|
|
374
374
|
max-height: calc(100vh - 32px);
|
|
375
375
|
}
|
|
376
|
-
.fadeIn[data-v-
|
|
376
|
+
.fadeIn[data-v-5fd440a3] {
|
|
377
377
|
animation-duration: 0.4s;
|
|
378
|
-
animation-name: fadeInFrames-
|
|
378
|
+
animation-name: fadeInFrames-5fd440a3;
|
|
379
379
|
animation-fill-mode: both;
|
|
380
380
|
}
|
|
381
|
-
.fadeOut[data-v-
|
|
381
|
+
.fadeOut[data-v-5fd440a3] {
|
|
382
382
|
animation-duration: 0.2s;
|
|
383
|
-
animation-name: fadeOutFrames-
|
|
383
|
+
animation-name: fadeOutFrames-5fd440a3;
|
|
384
384
|
animation-fill-mode: both;
|
|
385
385
|
}
|
|
386
|
-
.slideInTop[data-v-
|
|
386
|
+
.slideInTop[data-v-5fd440a3] {
|
|
387
387
|
animation-duration: 0.4s;
|
|
388
|
-
animation-name: fadeInFrames-
|
|
388
|
+
animation-name: fadeInFrames-5fd440a3,slideInTopFrames-5fd440a3;
|
|
389
389
|
animation-fill-mode: both;
|
|
390
390
|
}
|
|
391
|
-
.slideOutTop[data-v-
|
|
391
|
+
.slideOutTop[data-v-5fd440a3] {
|
|
392
392
|
animation-duration: 0.2s;
|
|
393
|
-
animation-name: fadeOutFrames-
|
|
393
|
+
animation-name: fadeOutFrames-5fd440a3,slideOutTopFrames-5fd440a3;
|
|
394
394
|
animation-fill-mode: both;
|
|
395
395
|
}
|
|
396
|
-
@keyframes slideInTopFrames-
|
|
396
|
+
@keyframes slideInTopFrames-5fd440a3 {
|
|
397
397
|
from {
|
|
398
398
|
transform: translate(0, -12px);
|
|
399
399
|
animation-timing-function: cubic-bezier(0, 0, 0, 1);
|
|
@@ -402,7 +402,7 @@ to {
|
|
|
402
402
|
transform: translate(0, 0);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
@keyframes slideOutTopFrames-
|
|
405
|
+
@keyframes slideOutTopFrames-5fd440a3 {
|
|
406
406
|
from {
|
|
407
407
|
transform: translate(0, 0);
|
|
408
408
|
animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1);
|
|
@@ -411,7 +411,7 @@ to {
|
|
|
411
411
|
transform: translate(0, -12px);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
@keyframes fadeInFrames-
|
|
414
|
+
@keyframes fadeInFrames-5fd440a3 {
|
|
415
415
|
from {
|
|
416
416
|
opacity: 0;
|
|
417
417
|
animation-timing-function: cubic-bezier(0, 0, 1, 1);
|
|
@@ -420,7 +420,7 @@ to {
|
|
|
420
420
|
opacity: 1;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
@keyframes fadeOutFrames-
|
|
423
|
+
@keyframes fadeOutFrames-5fd440a3 {
|
|
424
424
|
from {
|
|
425
425
|
opacity: 1;
|
|
426
426
|
animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1);
|
package/package.json
CHANGED
|
@@ -64,6 +64,8 @@ const inputPropsAndAttrs = computed(() => {
|
|
|
64
64
|
res.required = props.required;
|
|
65
65
|
res.disabled = props.disabled;
|
|
66
66
|
res.placeholder = props.placeholder ? props.placeholder : props.format;
|
|
67
|
+
res.name = props.name;
|
|
68
|
+
res.readonly = props.readonly;
|
|
67
69
|
|
|
68
70
|
return res;
|
|
69
71
|
});
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
<slot></slot>
|
|
60
60
|
</div>
|
|
61
61
|
</slot>
|
|
62
|
-
<slot
|
|
63
|
-
<div class="
|
|
62
|
+
<slot name="footer-wrapper">
|
|
63
|
+
<div v-if="$slots['footer']" class="px-8 pt-6">
|
|
64
64
|
<slot name="footer"></slot>
|
|
65
65
|
</div>
|
|
66
66
|
</slot>
|
|
@@ -45,6 +45,7 @@ describe('PSelectPill.vue', () => {
|
|
|
45
45
|
const selected = wrapper.findAll('button')[3];
|
|
46
46
|
|
|
47
47
|
expect(selected.classes()).toContain(ACTIVE_CLASS);
|
|
48
|
+
expect(selected.attributes('data-selected')).toBe('true');
|
|
48
49
|
});
|
|
49
50
|
|
|
50
51
|
it(`updates the value bound with v-model when an option is clicked`, async () => {
|
|
@@ -64,6 +65,7 @@ describe('PSelectPill.vue', () => {
|
|
|
64
65
|
const selected = wrapper.findAll('button')[3];
|
|
65
66
|
|
|
66
67
|
expect(selected.classes()).toContain(ACTIVE_CLASS);
|
|
68
|
+
expect(selected.attributes('data-selected')).toBe('true');
|
|
67
69
|
});
|
|
68
70
|
|
|
69
71
|
it('works with custom itemValue and itemText', async () => {
|