fds-vue-core 2.1.11 → 2.1.15
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 +312 -240
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +313 -241
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +9 -11
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.stories.ts +60 -33
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +5 -1
- package/src/components/Blocks/FdsBlockContent/FdsBlockContent.stories.ts +44 -41
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.ts +33 -30
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue +51 -16
- package/src/components/Blocks/FdsBlockExpander/types.ts +2 -0
- package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.ts +42 -39
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.stories.ts +42 -39
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +7 -2
- package/src/components/Buttons/ButtonBaseProps.ts +4 -0
- package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.ts +1 -1
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.stories.ts +4 -4
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue +12 -2
- package/src/components/Buttons/FdsButtonDownload/types.ts +2 -0
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.ts +2 -2
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.ts +2 -2
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue +3 -0
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.ts +4 -4
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue +0 -5
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.ts +2 -2
- package/src/components/FdsIcon/FdsIcon.stories.ts +1 -1
- package/src/components/FdsModal/FdsModal.stories.ts +7 -7
- package/src/components/FdsModal/FdsModal.vue +6 -1
- package/src/components/FdsPagination/FdsPagination.stories.ts +5 -5
- package/src/components/FdsSearchSelect/FdsSearchSelect.stories.ts +9 -9
- package/src/components/FdsSpinner/FdsSpinner.stories.ts +1 -1
- package/src/components/FdsSticker/FdsSticker.stories.ts +23 -20
- package/src/components/FdsSticker/FdsSticker.vue +6 -5
- package/src/components/FdsTreeView/FdsTreeView.stories.ts +1 -1
- package/src/components/FdsTruncatedText/FdsTruncatedText.stories.ts +4 -4
- package/src/components/FdsTruncatedText/FdsTruncatedText.vue +6 -7
- package/src/components/Form/FdsCheckbox/FdsCheckbox.stories.ts +4 -4
- package/src/components/Form/FdsCheckbox/FdsCheckbox.vue +6 -6
- package/src/components/Form/FdsInput/FdsInput.stories.ts +5 -5
- package/src/components/Form/FdsInput/FdsInput.vue +14 -19
- package/src/components/Form/FdsRadio/FdsRadio.stories.ts +1 -1
- package/src/components/Form/FdsRadio/FdsRadio.vue +6 -6
- package/src/components/Form/FdsSelect/FdsSelect.stories.ts +4 -4
- package/src/components/Form/FdsSelect/FdsSelect.vue +5 -1
- package/src/components/Form/FdsTextarea/FdsTextarea.stories.ts +2 -2
- package/src/components/Table/FdsTable/FdsTable.stories.ts +3 -3
- package/src/components/Table/FdsTableHead/FdsTableHead.stories.ts +6 -6
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +9 -15
- package/src/components/Table/FdsTableHead/types.ts +1 -0
- package/src/components/Tabs/FdsTabs/FdsTabs.stories.ts +9 -9
- package/src/components/Tabs/FdsTabs/FdsTabs.vue +5 -1
- package/src/components/Tabs/FdsTabsItem/FdsTabsItem.vue +26 -2
- package/src/components/Tabs/FdsTabsItem/types.ts +2 -0
- package/src/components/Typography/FdsText/FdsText.stories.ts +14 -14
- package/src/components/Typography/FdsText/FdsText.vue +18 -2
- package/src/components/Typography/FdsText/types.ts +1 -0
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import FdsText from './FdsText.vue'
|
|
3
3
|
|
|
4
|
+
const textTransform = (_src: string, storyContext: { args?: { type?: string } }) => {
|
|
5
|
+
const args = storyContext?.args || {}
|
|
6
|
+
const attrsStr = args.type && args.type !== 'default' ? ` type="${args.type}"` : ''
|
|
7
|
+
return `<FdsText${attrsStr}>Text content</FdsText>`
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
const meta: Meta<typeof FdsText> = {
|
|
5
11
|
title: 'FDS/Typography/FdsText',
|
|
6
12
|
component: FdsText,
|
|
7
13
|
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
docs: {
|
|
16
|
+
source: {
|
|
17
|
+
transform: textTransform,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
8
21
|
argTypes: {
|
|
9
22
|
type: { control: { type: 'radio' }, options: ['default', 'lead', 'meta'] },
|
|
10
23
|
},
|
|
@@ -16,25 +29,12 @@ const meta: Meta<typeof FdsText> = {
|
|
|
16
29
|
export default meta
|
|
17
30
|
type Story = StoryObj<typeof meta>
|
|
18
31
|
|
|
19
|
-
const textTransform = (storyContext: { args?: { type?: string } }) => {
|
|
20
|
-
const args = storyContext?.args || {}
|
|
21
|
-
const attrsStr = args.type && args.type !== 'default' ? ` type="${args.type}"` : ''
|
|
22
|
-
return `<FdsText${attrsStr}>Text content</FdsText>`
|
|
23
|
-
}
|
|
24
|
-
|
|
25
32
|
export const Default: Story = {
|
|
26
|
-
render: (args) => ({
|
|
33
|
+
render: (args: Story['args']) => ({
|
|
27
34
|
components: { FdsText },
|
|
28
35
|
setup: () => ({ args }),
|
|
29
36
|
template: `<FdsText :type="args.type">Text content</FdsText>`,
|
|
30
37
|
}),
|
|
31
|
-
parameters: {
|
|
32
|
-
docs: {
|
|
33
|
-
source: {
|
|
34
|
-
transform: textTransform,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const Lead: Story = {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
2
|
+
import { computed, useAttrs, type Slot } from 'vue'
|
|
3
3
|
import type { FdsTextProps } from './types'
|
|
4
4
|
|
|
5
|
+
defineOptions({
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
const attrs = useAttrs()
|
|
10
|
+
|
|
5
11
|
const props = withDefaults(defineProps<FdsTextProps>(), {
|
|
6
12
|
type: 'default',
|
|
13
|
+
dataTestid: undefined,
|
|
7
14
|
})
|
|
8
15
|
|
|
9
16
|
const textClasses = computed(() => {
|
|
@@ -19,10 +26,19 @@ const textClasses = computed(() => {
|
|
|
19
26
|
|
|
20
27
|
return baseClasses
|
|
21
28
|
})
|
|
29
|
+
|
|
30
|
+
const spanAttrs = computed(() => ({
|
|
31
|
+
...attrs,
|
|
32
|
+
'data-testid': props.dataTestid,
|
|
33
|
+
}))
|
|
34
|
+
|
|
35
|
+
defineSlots<{
|
|
36
|
+
default?: Slot
|
|
37
|
+
}>()
|
|
22
38
|
</script>
|
|
23
39
|
|
|
24
40
|
<template>
|
|
25
|
-
<span :class="textClasses">
|
|
41
|
+
<span v-bind="spanAttrs" :class="textClasses">
|
|
26
42
|
<slot />
|
|
27
43
|
</span>
|
|
28
44
|
</template>
|