@pequity/squirrel 7.0.0 → 7.0.2
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/index.js +748 -504
- package/dist/cjs/chunks/p-action-bar.js +6 -6
- package/dist/cjs/chunks/p-btn.js +1 -1
- package/dist/es/chunks/index.js +748 -504
- package/dist/es/chunks/p-action-bar.js +6 -6
- package/dist/es/chunks/p-btn.js +1 -1
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +5 -245
- package/dist/squirrel/utils/inputClasses.d.ts +23 -551
- package/package.json +25 -25
- package/squirrel/components/p-action-bar/p-action-bar.spec.ts +5 -1
- package/squirrel/components/p-action-bar/p-action-bar.vue +7 -7
- package/squirrel/components/p-btn/p-btn.spec.js +1 -0
- package/squirrel/components/p-btn/p-btn.vue +1 -1
|
@@ -24,12 +24,16 @@ const createPDropdownStub = () => {
|
|
|
24
24
|
toggleShow() {
|
|
25
25
|
this.show = !this.show;
|
|
26
26
|
},
|
|
27
|
+
|
|
28
|
+
hide() {
|
|
29
|
+
this.show = false;
|
|
30
|
+
},
|
|
27
31
|
},
|
|
28
32
|
template: `
|
|
29
33
|
<div class="p-dropdown-stub">
|
|
30
34
|
<slot></slot>
|
|
31
35
|
<div v-if="show" class="p-dropdown-stub-popper">
|
|
32
|
-
<slot name="popper"></slot>
|
|
36
|
+
<slot name="popper" :hide="hide"></slot>
|
|
33
37
|
</div>
|
|
34
38
|
</div>`,
|
|
35
39
|
});
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
<div>{{ actionOrMenu.label }}</div>
|
|
30
30
|
</div>
|
|
31
31
|
</PBtn>
|
|
32
|
-
<template #popper>
|
|
33
|
-
<
|
|
34
|
-
<
|
|
32
|
+
<template #popper="{ hide }">
|
|
33
|
+
<ul class="bg-p-purple-60 py-2">
|
|
34
|
+
<li v-for="subaction in actionOrMenu.subActions" :key="`subaction-${subaction.name}`">
|
|
35
35
|
<PBtn
|
|
36
36
|
size="sm"
|
|
37
|
-
class="w-full"
|
|
37
|
+
class="w-full [&>.items-center]:justify-start"
|
|
38
38
|
type="secondary-ghost-dark"
|
|
39
|
-
@click="$emit('click:action', subaction.name)"
|
|
39
|
+
@click="($emit('click:action', subaction.name), hide())"
|
|
40
40
|
>
|
|
41
41
|
<div class="flex items-center gap-2 px-1 py-0.5">
|
|
42
42
|
<Component :is="subaction.icon" v-if="isComponent(subaction.icon)" class="h-4 w-4" />
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
<div>{{ subaction.label }}</div>
|
|
45
45
|
</div>
|
|
46
46
|
</PBtn>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
49
|
</template>
|
|
50
50
|
</PDropdown>
|
|
51
51
|
</template>
|
|
@@ -47,7 +47,7 @@ type Icon = InstanceType<typeof PIcon>['$props']['icon'];
|
|
|
47
47
|
const btnClasses = {
|
|
48
48
|
slots: {
|
|
49
49
|
button:
|
|
50
|
-
'relative inline-block rounded font-medium outline-none disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50',
|
|
50
|
+
'relative inline-block whitespace-nowrap rounded font-medium outline-none disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50',
|
|
51
51
|
content: 'flex items-center justify-center has-[.slot-wrapper:empty]:gap-0',
|
|
52
52
|
loader: 'absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center font-medium',
|
|
53
53
|
icon: 'shrink-0',
|