fds-vue-core 7.2.5 → 7.2.7
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 +93 -68
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +93 -68
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +17 -1
- package/src/components/Form/FdsInput/FdsInput.vue +1 -0
- package/src/components/Form/FdsPhonenumber/countries.ts +1 -1
- package/src/components/Form/FdsPhonenumber/validatePhone.ts +1 -2
- package/src/lang/en.json +1 -1
- package/src/lang/sv.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fds-vue-core",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.7",
|
|
4
4
|
"description": "FDS Vue Core Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/fds-vue-core.cjs.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"axios": "1.16.1",
|
|
52
|
-
"date-fns": "4.
|
|
52
|
+
"date-fns": "4.4.0",
|
|
53
53
|
"imask": "7.6.1",
|
|
54
54
|
"libphonenumber-js": "1.12.36",
|
|
55
55
|
"tailwindcss": "4.3.0",
|
|
@@ -58,23 +58,23 @@
|
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@chromatic-com/storybook": "5.2.1",
|
|
60
60
|
"@intlify/unplugin-vue-i18n": "11.2.3",
|
|
61
|
-
"@storybook/addon-a11y": "10.4.
|
|
62
|
-
"@storybook/addon-docs": "10.4.
|
|
63
|
-
"@storybook/addon-vitest": "10.4.
|
|
64
|
-
"@storybook/vue3": "10.4.
|
|
65
|
-
"@storybook/vue3-vite": "10.4.
|
|
61
|
+
"@storybook/addon-a11y": "10.4.1",
|
|
62
|
+
"@storybook/addon-docs": "10.4.1",
|
|
63
|
+
"@storybook/addon-vitest": "10.4.1",
|
|
64
|
+
"@storybook/vue3": "10.4.1",
|
|
65
|
+
"@storybook/vue3-vite": "10.4.1",
|
|
66
66
|
"@tailwindcss/vite": "4.3.0",
|
|
67
67
|
"@types/node": "22.16.5",
|
|
68
68
|
"@vitejs/plugin-vue": "6.0.7",
|
|
69
69
|
"@vitest/browser": "3.2.4",
|
|
70
|
-
"fg-devkit": "1.8.
|
|
71
|
-
"storybook": "10.4.
|
|
72
|
-
"tsx": "4.22.
|
|
70
|
+
"fg-devkit": "1.8.6",
|
|
71
|
+
"storybook": "10.4.1",
|
|
72
|
+
"tsx": "4.22.4",
|
|
73
73
|
"vite": "7.3.2",
|
|
74
74
|
"vite-plugin-dts": "4.5.4",
|
|
75
75
|
"vite-plugin-vue-devtools": "8.1.2",
|
|
76
|
-
"vitest": "
|
|
77
|
-
"vue": "3.5.
|
|
76
|
+
"vitest": "4.1.8",
|
|
77
|
+
"vue": "3.5.35"
|
|
78
78
|
},
|
|
79
79
|
"knip": {
|
|
80
80
|
"ignoreBinaries": [
|
|
@@ -32,6 +32,7 @@ const autoId = `fds-block-link-${Math.random().toString(36).slice(2, 9)}`
|
|
|
32
32
|
const blockLinkId = computed(() => id.value ?? autoId)
|
|
33
33
|
|
|
34
34
|
const isInteractive = computed(() => !props.disabled && props.interactive)
|
|
35
|
+
const keyboardTabIndex = computed(() => (isInteractive.value ? 0 : -1))
|
|
35
36
|
|
|
36
37
|
const innerClasses = computed(() => [
|
|
37
38
|
props.disabled ? 'cursor-not-allowed shadow-none hover:border-transparent active:bg-transparent' : 'cursor-pointer',
|
|
@@ -65,7 +66,21 @@ function handleClick(event: Event) {
|
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
function handleKeydown(event: KeyboardEvent) {
|
|
68
|
-
if (
|
|
69
|
+
if (!isInteractive.value) return
|
|
70
|
+
|
|
71
|
+
const isEnter = event.key === 'Enter' || event.code === 'Enter' || event.code === 'NumpadEnter'
|
|
72
|
+
const isSpace = event.key === ' ' || event.key === 'Spacebar'
|
|
73
|
+
|
|
74
|
+
// Links (incl. router-link): Enter activates natively; only Space needs a synthetic click.
|
|
75
|
+
if (componentType.value === 'a' || componentType.value === 'router-link') {
|
|
76
|
+
if (isSpace) {
|
|
77
|
+
event.preventDefault()
|
|
78
|
+
handleClick(event)
|
|
79
|
+
}
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (isEnter || isSpace) {
|
|
69
84
|
event.preventDefault()
|
|
70
85
|
handleClick(event)
|
|
71
86
|
}
|
|
@@ -117,6 +132,7 @@ defineSlots<{
|
|
|
117
132
|
:download="componentType === 'a' ? download : undefined"
|
|
118
133
|
:disabled="componentType === 'button' ? props.disabled : undefined"
|
|
119
134
|
:aria-disabled="props.disabled"
|
|
135
|
+
:tabindex="keyboardTabIndex"
|
|
120
136
|
:data-testid="dataTestid"
|
|
121
137
|
@click="handleClick"
|
|
122
138
|
@keydown="handleKeydown"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import parsePhoneNumberFromString from 'libphonenumber-js/max'
|
|
1
|
+
import parsePhoneNumberFromString, { type CountryCode, type NumberType } from 'libphonenumber-js/max'
|
|
3
2
|
import type { FdsPhonenumberNumberType } from './types'
|
|
4
3
|
|
|
5
4
|
interface ValidatePhoneOptions {
|
package/src/lang/en.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"FdsDevModeStorage.tabs.localStorage": "localStorage",
|
|
30
30
|
"FdsDevModeStorage.tabs.sessionStorage": "sessionStorage",
|
|
31
31
|
"FdsDevModeStorage.valueLabel": "Value",
|
|
32
|
-
"FdsInput.clearInput": "
|
|
32
|
+
"FdsInput.clearInput": "Delete text",
|
|
33
33
|
"FdsInput.hidePassword": "Hide",
|
|
34
34
|
"FdsInput.openDatePicker": "Open date picker",
|
|
35
35
|
"FdsInput.showPassword": "Show",
|
package/src/lang/sv.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"FdsDevModeStorage.tabs.localStorage": "localStorage",
|
|
30
30
|
"FdsDevModeStorage.tabs.sessionStorage": "sessionStorage",
|
|
31
31
|
"FdsDevModeStorage.valueLabel": "Värde",
|
|
32
|
-
"FdsInput.clearInput": "Rensa
|
|
32
|
+
"FdsInput.clearInput": "Rensa text",
|
|
33
33
|
"FdsInput.hidePassword": "Dölj",
|
|
34
34
|
"FdsInput.openDatePicker": "Öppna datumväljare",
|
|
35
35
|
"FdsInput.showPassword": "Visa",
|