fds-vue-core 7.1.2 → 7.1.3
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/fds-vue-core.cjs.js +3 -8
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +3 -8
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Table/FdsTableHead/FdsTableHead.stories.ts +2 -4
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +1 -7
- package/src/components/Table/FdsTableHead/types.ts +0 -1
package/package.json
CHANGED
|
@@ -9,13 +9,11 @@ const meta: Meta<typeof FdsTableHead> = {
|
|
|
9
9
|
heading: { control: { type: 'text' } },
|
|
10
10
|
align: { control: { type: 'radio' }, options: ['left', 'center', 'right'] },
|
|
11
11
|
icon: { control: { type: 'select' }, options: ['sort', 'ascending', 'descending'] },
|
|
12
|
-
isSortActive: { control: { type: 'boolean' } },
|
|
13
12
|
},
|
|
14
13
|
args: {
|
|
15
14
|
heading: 'Namn',
|
|
16
15
|
align: 'left',
|
|
17
16
|
icon: 'sort',
|
|
18
|
-
isSortActive: false,
|
|
19
17
|
},
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -65,7 +63,7 @@ export const Sortable: Story = {
|
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export const SortedAsc: Story = {
|
|
68
|
-
args: { icon: 'ascending'
|
|
66
|
+
args: { icon: 'ascending' },
|
|
69
67
|
render: (args: Story['args']) => ({
|
|
70
68
|
components: { FdsTableHead },
|
|
71
69
|
setup: () => ({ args }),
|
|
@@ -87,7 +85,7 @@ export const SortedAsc: Story = {
|
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
export const SortedDesc: Story = {
|
|
90
|
-
args: { icon: 'descending'
|
|
88
|
+
args: { icon: 'descending' },
|
|
91
89
|
render: (args: Story['args']) => ({
|
|
92
90
|
components: { FdsTableHead },
|
|
93
91
|
setup: () => ({ args }),
|
|
@@ -9,7 +9,6 @@ const props = withDefaults(defineProps<FdsTableHeadProps>(), {
|
|
|
9
9
|
icon: undefined,
|
|
10
10
|
heading: undefined,
|
|
11
11
|
dataTestid: undefined,
|
|
12
|
-
isSortActive: false,
|
|
13
12
|
})
|
|
14
13
|
|
|
15
14
|
const hasSlot = useHasSlot()
|
|
@@ -22,11 +21,6 @@ const headerClasses = computed(() => [
|
|
|
22
21
|
'text-blue-600! hover:bg-blue_t-200 cursor-pointer focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-blue-500 active:bg-blue_t-300',
|
|
23
22
|
])
|
|
24
23
|
|
|
25
|
-
const iconClasses = computed(() => [
|
|
26
|
-
'fill-blue-500 ml-1 transition-opacity',
|
|
27
|
-
iconName.value && !props.isSortActive && 'opacity-20',
|
|
28
|
-
])
|
|
29
|
-
|
|
30
24
|
/* Sending an icon makes the th sortable */
|
|
31
25
|
const iconName = computed(() => props.icon)
|
|
32
26
|
|
|
@@ -62,7 +56,7 @@ defineSlots<{
|
|
|
62
56
|
>
|
|
63
57
|
<span v-if="hasSlot"><slot /></span>
|
|
64
58
|
<span v-else>{{ heading }}</span>
|
|
65
|
-
<FdsIcon :name="iconName" size="24px"
|
|
59
|
+
<FdsIcon :name="iconName" size="24px" class="fill-blue-500 ml-1" />
|
|
66
60
|
</button>
|
|
67
61
|
<div v-else :class="headerClasses">
|
|
68
62
|
<span v-if="hasSlot"><slot /></span>
|