vueless 1.1.1-beta.8 → 1.1.1-beta.9
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/package.json +1 -1
- package/ui.container-accordion/UAccordion.vue +6 -0
- package/ui.container-accordion/config.ts +1 -0
- package/ui.container-accordion/storybook/stories.ts +16 -1
- package/ui.data-table/UTable.vue +1 -3
- package/ui.form-listbox/UListbox.vue +1 -1
- package/ui.form-listbox/storybook/stories.ts +5 -5
- package/ui.form-select/config.ts +1 -1
- package/ui.form-select/storybook/stories.ts +5 -5
- package/ui.navigation-pagination/UPagination.vue +2 -7
- package/ui.navigation-pagination/config.ts +1 -0
- package/ui.navigation-pagination/tests/UPagination.test.ts +1 -1
- package/ui.navigation-pagination/types.ts +1 -1
package/package.json
CHANGED
|
@@ -67,6 +67,7 @@ const {
|
|
|
67
67
|
descriptionAttrs,
|
|
68
68
|
bodyAttrs,
|
|
69
69
|
titleAttrs,
|
|
70
|
+
contentAttrs,
|
|
70
71
|
toggleIconAttrs,
|
|
71
72
|
accordionDividerAttrs,
|
|
72
73
|
} = useUI<Config>(defaultConfig, mutatedProps);
|
|
@@ -94,6 +95,11 @@ const {
|
|
|
94
95
|
</div>
|
|
95
96
|
|
|
96
97
|
<div :id="`description-${elementId}`" v-bind="descriptionAttrs" v-text="description" />
|
|
98
|
+
|
|
99
|
+
<div v-if="isOpened" v-bind="contentAttrs">
|
|
100
|
+
<!-- @slot Use it to add accordion content. -->
|
|
101
|
+
<slot />
|
|
102
|
+
</div>
|
|
97
103
|
</div>
|
|
98
104
|
|
|
99
105
|
<UDivider v-bind="accordionDividerAttrs" />
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import UAccordion from "../../ui.container-accordion/UAccordion.vue";
|
|
11
11
|
import UButton from "../../ui.button/UButton.vue";
|
|
12
12
|
import ULink from "../../ui.button-link/ULink.vue";
|
|
13
|
+
import UCol from "../../ui.container-col/UCol.vue";
|
|
13
14
|
|
|
14
15
|
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
15
16
|
import type { Props } from "../types.ts";
|
|
@@ -41,7 +42,7 @@ export default {
|
|
|
41
42
|
} as Meta;
|
|
42
43
|
|
|
43
44
|
const DefaultTemplate: StoryFn<UAccordionArgs> = (args: UAccordionArgs) => ({
|
|
44
|
-
components: { UAccordion, ULink },
|
|
45
|
+
components: { UAccordion, ULink, UButton, UCol },
|
|
45
46
|
setup: () => ({ args, slots: getSlotNames(UAccordion.__name) }),
|
|
46
47
|
template: `
|
|
47
48
|
<UAccordion v-bind="args">
|
|
@@ -113,6 +114,20 @@ Accordions.args = {};
|
|
|
113
114
|
export const Sizes = EnumTemplate.bind({});
|
|
114
115
|
Sizes.args = { enum: "size", description: "{enumValue}" };
|
|
115
116
|
|
|
117
|
+
export const DefaultSlot = DefaultTemplate.bind({});
|
|
118
|
+
DefaultSlot.args = {
|
|
119
|
+
description: "",
|
|
120
|
+
slotTemplate: `
|
|
121
|
+
<template #default>
|
|
122
|
+
<UCol gap="sm">
|
|
123
|
+
<ULink label="Email services" />
|
|
124
|
+
<ULink label="VPN" />
|
|
125
|
+
<ULink label="SEO Tools" />
|
|
126
|
+
</UCol>
|
|
127
|
+
</template>
|
|
128
|
+
`,
|
|
129
|
+
};
|
|
130
|
+
|
|
116
131
|
export const ToggleSlot = DefaultTemplate.bind({});
|
|
117
132
|
ToggleSlot.args = {
|
|
118
133
|
slotTemplate: `
|
package/ui.data-table/UTable.vue
CHANGED
|
@@ -378,9 +378,7 @@ function onChangeLocalSelectedRows(selectedRows: Row[]) {
|
|
|
378
378
|
|
|
379
379
|
selectAll.value = !!selectedRows.length;
|
|
380
380
|
|
|
381
|
-
|
|
382
|
-
emit("update:selectedRows", localSelectedRows.value);
|
|
383
|
-
}
|
|
381
|
+
emit("update:selectedRows", localSelectedRows.value);
|
|
384
382
|
}
|
|
385
383
|
|
|
386
384
|
function clearSelectedItems() {
|
|
@@ -26,11 +26,11 @@ export default {
|
|
|
26
26
|
component: UListbox,
|
|
27
27
|
args: {
|
|
28
28
|
options: [
|
|
29
|
-
{ label: "New York", id:
|
|
30
|
-
{ label: "Los Angeles", id:
|
|
31
|
-
{ label: "Chicago", id:
|
|
32
|
-
{ label: "Houston", id:
|
|
33
|
-
{ label: "San Francisco", id:
|
|
29
|
+
{ label: "New York", id: 1 },
|
|
30
|
+
{ label: "Los Angeles", id: 2 },
|
|
31
|
+
{ label: "Chicago", id: 3 },
|
|
32
|
+
{ label: "Houston", id: 4 },
|
|
33
|
+
{ label: "San Francisco", id: 5 },
|
|
34
34
|
],
|
|
35
35
|
},
|
|
36
36
|
argTypes: {
|
package/ui.form-select/config.ts
CHANGED
|
@@ -118,7 +118,7 @@ export default /*tw*/ {
|
|
|
118
118
|
clear: "{>toggle}",
|
|
119
119
|
clearIcon: "{UIcon} {>selectIcon}",
|
|
120
120
|
placeholder: {
|
|
121
|
-
base: "flex items-center text-muted !leading-none",
|
|
121
|
+
base: "flex items-center text-muted !leading-none shrink-0",
|
|
122
122
|
variants: {
|
|
123
123
|
size: {
|
|
124
124
|
sm: "text-small",
|
|
@@ -38,11 +38,11 @@ export default {
|
|
|
38
38
|
label: "Choose a city",
|
|
39
39
|
modelValue: null,
|
|
40
40
|
options: [
|
|
41
|
-
{ label: "New York", id:
|
|
42
|
-
{ label: "Los Angeles", id:
|
|
43
|
-
{ label: "Chicago", id:
|
|
44
|
-
{ label: "Houston", id:
|
|
45
|
-
{ label: "San Francisco", id:
|
|
41
|
+
{ label: "New York", id: 1 },
|
|
42
|
+
{ label: "Los Angeles", id: 2 },
|
|
43
|
+
{ label: "Chicago", id: 3 },
|
|
44
|
+
{ label: "Houston", id: 4 },
|
|
45
|
+
{ label: "San Francisco", id: 5 },
|
|
46
46
|
],
|
|
47
47
|
},
|
|
48
48
|
argTypes: {
|
|
@@ -124,6 +124,7 @@ const {
|
|
|
124
124
|
nextButtonAttrs,
|
|
125
125
|
activeButtonAttrs,
|
|
126
126
|
inactiveButtonAttrs,
|
|
127
|
+
ellipsisAttrs,
|
|
127
128
|
lastIconAttrs,
|
|
128
129
|
firstIconAttrs,
|
|
129
130
|
prevIconAttrs,
|
|
@@ -181,13 +182,7 @@ const {
|
|
|
181
182
|
</UButton>
|
|
182
183
|
|
|
183
184
|
<template v-for="page in pageButtons" :key="page">
|
|
184
|
-
<UButton
|
|
185
|
-
v-if="!isFinite(page.number)"
|
|
186
|
-
square
|
|
187
|
-
disabled
|
|
188
|
-
variant="ghost"
|
|
189
|
-
v-bind="inactiveButtonAttrs"
|
|
190
|
-
>
|
|
185
|
+
<UButton v-if="!isFinite(page.number)" square disabled variant="ghost" v-bind="ellipsisAttrs">
|
|
191
186
|
<!-- @slot Use it to add something instead of the ellipsis. -->
|
|
192
187
|
<slot name="ellipsis">…</slot>
|
|
193
188
|
</UButton>
|
|
@@ -12,7 +12,7 @@ describe("UPagination.vue", () => {
|
|
|
12
12
|
describe("Props", () => {
|
|
13
13
|
// Variant prop
|
|
14
14
|
it("applies the correct variant to buttons", async () => {
|
|
15
|
-
const variants = ["solid", "outlined", "soft", "ghost"];
|
|
15
|
+
const variants = ["solid", "outlined", "subtle", "soft", "ghost"];
|
|
16
16
|
|
|
17
17
|
variants.forEach((variant) => {
|
|
18
18
|
const component = mount(UPagination, {
|