fds-vue-core 2.1.8 → 2.1.10

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.
Files changed (44) hide show
  1. package/dist/fds-vue-core.cjs.js +1 -1
  2. package/dist/fds-vue-core.cjs.js.map +1 -1
  3. package/dist/fds-vue-core.es.js +1 -1
  4. package/dist/fds-vue-core.es.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/App.vue +2 -2
  7. package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +6 -17
  8. package/src/components/Blocks/FdsBlockContent/FdsBlockContent.vue +3 -10
  9. package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.ts +1 -1
  10. package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue +8 -26
  11. package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.ts +1 -1
  12. package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue +2 -2
  13. package/src/components/Blocks/FdsBlockLink/FdsBlockLink.stories.ts +2 -2
  14. package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +7 -25
  15. package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue +4 -7
  16. package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue +5 -15
  17. package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.ts +1 -1
  18. package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue +3 -12
  19. package/src/components/Buttons/FdsButtonIcon/types.ts +1 -1
  20. package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.ts +1 -1
  21. package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue +7 -21
  22. package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.ts +1 -1
  23. package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue +7 -20
  24. package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.ts +1 -1
  25. package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue +7 -20
  26. package/src/components/FdsIcon/FdsIcon.stories.ts +1 -1
  27. package/src/components/FdsIcon/FdsIcon.vue +1 -1
  28. package/src/components/FdsModal/FdsModal.stories.ts +2 -2
  29. package/src/components/FdsModal/FdsModal.vue +8 -29
  30. package/src/components/FdsPagination/FdsPagination.vue +8 -27
  31. package/src/components/FdsSearchSelect/FdsSearchSelect.vue +6 -6
  32. package/src/components/FdsTreeView/FdsTreeView.vue +4 -4
  33. package/src/components/FdsTreeView/TreeNode.vue +3 -3
  34. package/src/components/FdsTreeView/useTreeState.ts +1 -1
  35. package/src/components/FdsTruncatedText/FdsTruncatedText.vue +2 -2
  36. package/src/components/Form/FdsCheckbox/FdsCheckbox.vue +1 -1
  37. package/src/components/Form/FdsInput/FdsInput.vue +3 -3
  38. package/src/components/Form/FdsRadio/FdsRadio.vue +1 -1
  39. package/src/components/Form/FdsSelect/FdsSelect.vue +7 -21
  40. package/src/components/Form/FdsTextarea/FdsTextarea.vue +8 -25
  41. package/src/components/Table/FdsTable/FdsTable.stories.ts +1 -1
  42. package/src/components/Table/FdsTableHead/FdsTableHead.vue +2 -2
  43. package/src/components/Tabs/FdsTabs/FdsTabs.stories.ts +2 -2
  44. package/src/components/Typography/FdsListHeading/FdsListHeading.vue +1 -1
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref, watch } from 'vue'
3
- import FdsButtonIcon from '@/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue'
4
- import FdsSpinner from '@/components/FdsSpinner/FdsSpinner.vue'
5
- import FdsInput from '@/components/Form/FdsInput/FdsInput.vue'
3
+ import FdsButtonIcon from '../Buttons/FdsButtonIcon/FdsButtonIcon.vue'
4
+ import FdsSpinner from '../FdsSpinner/FdsSpinner.vue'
5
+ import FdsInput from '../Form/FdsInput/FdsInput.vue'
6
6
  import type { FdsPaginationProps } from './types'
7
7
 
8
8
  const props = withDefaults(defineProps<FdsPaginationProps>(), {
@@ -94,17 +94,10 @@ const handlePagination = (action: 'start' | 'prev' | 'next' | 'end') => {
94
94
  </script>
95
95
 
96
96
  <template>
97
- <div
98
- class="my-6 flex items-between justify-between gap-2"
99
- :id="inputId"
100
- >
97
+ <div class="my-6 flex items-between justify-between gap-2" :id="inputId">
101
98
  <!-- Prev -->
102
99
  <div class="flex items-center justify-start gap-1 w-[100px]">
103
- <FdsSpinner
104
- v-if="loading && loadingIndicator === 'start'"
105
- size="32px"
106
- color="blue"
107
- />
100
+ <FdsSpinner v-if="loading && loadingIndicator === 'start'" size="32px" color="blue" />
108
101
  <FdsButtonIcon
109
102
  v-else
110
103
  icon="first"
@@ -116,11 +109,7 @@ const handlePagination = (action: 'start' | 'prev' | 'next' | 'end') => {
116
109
  @click="handlePagination('start')"
117
110
  />
118
111
 
119
- <FdsSpinner
120
- v-if="loading && loadingIndicator === 'prev'"
121
- size="24px"
122
- color="blue"
123
- />
112
+ <FdsSpinner v-if="loading && loadingIndicator === 'prev'" size="24px" color="blue" />
124
113
  <FdsButtonIcon
125
114
  v-else
126
115
  icon="arrowLeft"
@@ -157,11 +146,7 @@ const handlePagination = (action: 'start' | 'prev' | 'next' | 'end') => {
157
146
 
158
147
  <!-- Next -->
159
148
  <div class="flex items-center justify-end gap-1 order-2 sm:order-0 w-[100px]">
160
- <FdsSpinner
161
- v-if="loading && loadingIndicator === 'next'"
162
- size="24px"
163
- color="blue"
164
- />
149
+ <FdsSpinner v-if="loading && loadingIndicator === 'next'" size="24px" color="blue" />
165
150
  <FdsButtonIcon
166
151
  v-else
167
152
  icon="arrowRight"
@@ -173,11 +158,7 @@ const handlePagination = (action: 'start' | 'prev' | 'next' | 'end') => {
173
158
  @click="handlePagination('next')"
174
159
  />
175
160
 
176
- <FdsSpinner
177
- v-if="loading && loadingIndicator === 'end'"
178
- size="24px"
179
- color="blue"
180
- />
161
+ <FdsSpinner v-if="loading && loadingIndicator === 'end'" size="24px" color="blue" />
181
162
  <FdsButtonIcon
182
163
  v-else
183
164
  icon="last"
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
3
- import { useBoldQuery } from '@/composables/useBoldQuery'
4
- import { isPidString, useIsPid } from '@/composables/useIsPid'
5
- import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
6
- import FdsPagination from '@/components/FdsPagination/FdsPagination.vue'
7
- import FdsSpinner from '@/components/FdsSpinner/FdsSpinner.vue'
8
- import FdsInput from '@/components/Form/FdsInput/FdsInput.vue'
3
+ import { useBoldQuery } from '../../composables/useBoldQuery'
4
+ import { isPidString, useIsPid } from '../../composables/useIsPid'
5
+ import FdsIcon from '../FdsIcon/FdsIcon.vue'
6
+ import FdsPagination from '../FdsPagination/FdsPagination.vue'
7
+ import FdsSpinner from '../FdsSpinner/FdsSpinner.vue'
8
+ import FdsInput from '../Form/FdsInput/FdsInput.vue'
9
9
  import type { FdsSearchSelectProps } from './types'
10
10
 
11
11
  const props = withDefaults(defineProps<FdsSearchSelectProps>(), {
@@ -4,10 +4,10 @@ import useTreeState from './useTreeState'
4
4
  import TreeNode from './TreeNode.vue'
5
5
  import { getTitleFromProperties } from './utils'
6
6
  import type { FdsTreeNode as TreeNodeType, FdsNodeShape, WrapperProps } from './types'
7
- import { useElementFinalSize } from '@/composables/useElementFinalSize'
8
- import FdsInput from '@/components/Form/FdsInput/FdsInput.vue'
9
- import FdsBlockContent from '@/components/Blocks/FdsBlockContent/FdsBlockContent.vue'
10
- import FdsText from '@/components/Typography/FdsText/FdsText.vue'
7
+ import { useElementFinalSize } from '../../composables/useElementFinalSize'
8
+ import FdsInput from '../Form/FdsInput/FdsInput.vue'
9
+ import FdsBlockContent from '../Blocks/FdsBlockContent/FdsBlockContent.vue'
10
+ import FdsText from '../Typography/FdsText/FdsText.vue'
11
11
 
12
12
  const props = withDefaults(defineProps<WrapperProps<Record<string, unknown>>>(), {
13
13
  indentation: 36,
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, inject, nextTick, reactive, ref, watch } from 'vue'
3
- import FdsButtonIcon from '@/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue'
4
- import FdsCheckbox from '@/components/Form/FdsCheckbox/FdsCheckbox.vue'
5
- import FdsRadio from '@/components/Form/FdsRadio/FdsRadio.vue'
3
+ import FdsButtonIcon from '../Buttons/FdsButtonIcon/FdsButtonIcon.vue'
4
+ import FdsCheckbox from '../Form/FdsCheckbox/FdsCheckbox.vue'
5
+ import FdsRadio from '../Form/FdsRadio/FdsRadio.vue'
6
6
  import type { FdsTreeViewProps } from './types'
7
7
  import useTreeState from './useTreeState'
8
8
  import { getTitleFromProperties } from './utils'
@@ -1,6 +1,6 @@
1
1
  import { computed, reactive, ref, watch } from 'vue'
2
+ import type { FdsIconName } from '../FdsIcon/types'
2
3
  import type { FdsTreeNode, FdsTreeNodeArray, FdsTreeNodeItem } from './types'
3
- import type { FdsIconName } from '@/components/FdsIcon/types'
4
4
  import { getTitleFromProperties } from './utils'
5
5
 
6
6
  interface TreeStateOptions {
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { useHasSlot } from '@/composables/useHasSlots'
2
+ import { useHasSlot } from '../../composables/useHasSlots'
3
3
  import { computed, onMounted, ref, watch } from 'vue'
4
- import FdsButtonMinor from '@/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue'
4
+ import FdsButtonMinor from '../Buttons/FdsButtonMinor/FdsButtonMinor.vue'
5
5
  import type { FdsTruncatedTextProps } from './types'
6
6
 
7
7
  const props = withDefaults(defineProps<FdsTruncatedTextProps>(), {
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { useHasSlot } from '@/composables/useHasSlots'
2
+ import { useHasSlot } from '../../../composables/useHasSlots'
3
3
  import { computed, nextTick, watch } from 'vue'
4
4
  import type { FdsCheckboxProps } from './types'
5
5
 
@@ -2,9 +2,9 @@
2
2
  import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
3
3
  // @ts-ignore - IMask types may not be resolved in build
4
4
  import IMask from 'imask'
5
- import FdsButtonIcon from '@/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue'
6
- import FdsButtonMinor from '@/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue'
7
- import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
5
+ import FdsButtonIcon from '../../Buttons/FdsButtonIcon/FdsButtonIcon.vue'
6
+ import FdsButtonMinor from '../../Buttons/FdsButtonMinor/FdsButtonMinor.vue'
7
+ import FdsIcon from '../../FdsIcon/FdsIcon.vue'
8
8
  import type { FdsInputProps } from './types'
9
9
 
10
10
  // Support both v-model (modelValue) and :value prop for backward compatibility
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { useHasSlot } from '@/composables/useHasSlots'
2
+ import { useHasSlot } from '../../../composables/useHasSlots'
3
3
  import { computed } from 'vue'
4
4
  import type { FdsRadioProps } from './types'
5
5
 
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, useSlots } from 'vue'
3
- import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
3
+ import FdsIcon from '../../FdsIcon/FdsIcon.vue'
4
4
  import type { FdsSelectProps } from './types'
5
5
 
6
6
  // Support both v-model (modelValue) and :value prop for backward compatibility
@@ -73,12 +73,10 @@ function handleChange(ev: Event) {
73
73
  :for="selectId"
74
74
  class="block font-bold text-gray-900 cursor-pointer"
75
75
  :class="{ 'mb-0': meta, 'mb-1': !meta }"
76
- >{{ label }}</label
77
- >
78
- <div
79
- v-if="meta"
80
- class="font-thin mb-1"
81
76
  >
77
+ {{ label }}
78
+ </label>
79
+ <div v-if="meta" class="font-thin mb-1">
82
80
  {{ meta }}
83
81
  </div>
84
82
  <div class="relative">
@@ -93,21 +91,12 @@ function handleChange(ev: Event) {
93
91
  @change="handleChange"
94
92
  @input="(e) => emit('input', e)"
95
93
  >
96
- <option
97
- v-if="placeholder && !hasDefaultSlot"
98
- value=""
99
- disabled
100
- >
94
+ <option v-if="placeholder && !hasDefaultSlot" value="" disabled>
101
95
  {{ placeholder }}
102
96
  </option>
103
97
  <!-- Render options from prop if no slot is provided -->
104
98
  <template v-if="!hasDefaultSlot && options">
105
- <option
106
- v-for="option in options"
107
- :key="option.value"
108
- :value="option.value"
109
- :disabled="option.disabled"
110
- >
99
+ <option v-for="option in options" :key="option.value" :value="option.value" :disabled="option.disabled">
111
100
  {{ option.label }}
112
101
  </option>
113
102
  </template>
@@ -126,10 +115,7 @@ function handleChange(ev: Event) {
126
115
  />
127
116
  </div>
128
117
  </div>
129
- <div
130
- v-if="showInvalidMessage"
131
- class="text-red-600 font-bold mt-1"
132
- >
118
+ <div v-if="showInvalidMessage" class="text-red-600 font-bold mt-1">
133
119
  {{ invalidMessage }}
134
120
  </div>
135
121
  </div>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
3
+ import FdsIcon from '../../FdsIcon/FdsIcon.vue'
4
4
  import type { FdsTextareaProps } from './types'
5
5
 
6
6
  // Support both v-model (modelValue) and :value prop for backward compatibility
@@ -62,12 +62,10 @@ const internalValue = computed({
62
62
  :for="textareaId"
63
63
  class="block font-bold text-gray-900 cursor-pointer"
64
64
  :class="{ 'mb-0': meta, 'mb-1': !meta }"
65
- >{{ label }}</label
66
- >
67
- <div
68
- v-if="meta"
69
- class="font-thin mb-1"
70
65
  >
66
+ {{ label }}
67
+ </label>
68
+ <div v-if="meta" class="font-thin mb-1">
71
69
  {{ meta }}
72
70
  </div>
73
71
  <div class="relative">
@@ -83,28 +81,13 @@ const internalValue = computed({
83
81
  @input="(e) => emit('input', e)"
84
82
  />
85
83
  <div :class="validationIconClasses">
86
- <FdsIcon
87
- v-if="isInvalid"
88
- name="alert"
89
- class="fill-red-600"
90
- />
91
- <FdsIcon
92
- v-if="isValid"
93
- name="bigSuccess"
94
- />
84
+ <FdsIcon v-if="isInvalid" name="alert" class="fill-red-600" />
85
+ <FdsIcon v-if="isValid" name="bigSuccess" />
95
86
  </div>
96
87
  </div>
97
- <div
98
- v-if="showInvalidMessage"
99
- class="text-red-600 font-bold mt-1"
100
- >
88
+ <div v-if="showInvalidMessage" class="text-red-600 font-bold mt-1">
101
89
  {{ invalidMessage }}
102
90
  </div>
103
91
  </div>
104
- <div
105
- v-if="isValid"
106
- class="sr-only"
107
- >
108
- OK
109
- </div>
92
+ <div v-if="isValid" class="sr-only">OK</div>
110
93
  </template>
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3'
2
- import FdsTableHead from '@/components/Table/FdsTableHead/FdsTableHead.vue'
2
+ import FdsTableHead from '../FdsTableHead/FdsTableHead.vue'
3
3
  import FdsTable from './FdsTable.vue'
4
4
 
5
5
  const meta: Meta<typeof FdsTable> = {
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { useHasSlot } from '@/composables/useHasSlots'
2
+ import { useHasSlot } from '../../../composables/useHasSlots'
3
3
  import { computed } from 'vue'
4
- import FdsIcon from '@/components/FdsIcon/FdsIcon.vue'
4
+ import FdsIcon from '../../FdsIcon/FdsIcon.vue'
5
5
  import type { FdsTableHeadProps } from './types'
6
6
 
7
7
  const props = withDefaults(defineProps<FdsTableHeadProps>(), {
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3'
2
- import FdsTabs from '@/components/Tabs/FdsTabs/FdsTabs.vue'
3
- import FdsTabsItem from '@/components/Tabs/FdsTabsItem/FdsTabsItem.vue'
2
+ import FdsTabs from './FdsTabs.vue'
3
+ import FdsTabsItem from '../FdsTabsItem/FdsTabsItem.vue'
4
4
 
5
5
  const meta: Meta<typeof FdsTabs> = {
6
6
  title: 'FDS/FdsTabs',
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
- import FdsSpinner from '@/components/FdsSpinner/FdsSpinner.vue'
3
+ import FdsSpinner from '../../FdsSpinner/FdsSpinner.vue'
4
4
  import type { FdsListHeadingProps } from './types'
5
5
 
6
6
  const props = withDefaults(defineProps<FdsListHeadingProps>(), {