fds-vue-core 8.2.4 → 8.3.0

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/components.d.ts CHANGED
@@ -32,6 +32,7 @@ import type { FdsInputProps } from './src/components/Form/FdsInput/types'
32
32
  import type { FdsRadioProps } from './src/components/Form/FdsRadio/types'
33
33
  import type { FdsSelectProps } from './src/components/Form/FdsSelect/types'
34
34
  import type { FdsPhonenumberEmits, FdsPhonenumberProps } from './src/components/Form/FdsPhonenumber/types'
35
+ import type { FdsSsnEmits, FdsSsnProps } from './src/components/Form/FdsSsn/types'
35
36
  import type { FdsTextareaEmits, FdsTextareaProps } from './src/components/Form/FdsTextarea/types'
36
37
  import type { FdsTableProps } from './src/components/Table/FdsTable/types'
37
38
  import type { FdsTableHeadProps } from './src/components/Table/FdsTableHead/types'
@@ -64,6 +65,7 @@ declare module 'vue' {
64
65
  FdsCheckbox: DefineComponent<FdsCheckboxProps>
65
66
  FdsTextarea: DefineComponent<FdsTextareaProps, {}, {}, {}, {}, {}, {}, FdsTextareaEmits>
66
67
  FdsPhonenumber: DefineComponent<FdsPhonenumberProps, {}, {}, {}, {}, {}, {}, FdsPhonenumberEmits>
68
+ FdsSsn: DefineComponent<FdsSsnProps, {}, {}, {}, {}, {}, {}, FdsSsnEmits>
67
69
  FdsSelect: DefineComponent<FdsSelectProps>
68
70
  FdsTable: DefineComponent<FdsTableProps>
69
71
  FdsTableHead: DefineComponent<FdsTableHeadProps>
@@ -0,0 +1,33 @@
1
+ import { FdsSsnProps } from './types';
2
+ type __VLS_Props = FdsSsnProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: string;
5
+ } & __VLS_Props;
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ blur: (ev: FocusEvent) => any;
8
+ "update:modelValue": (...args: unknown[]) => any;
9
+ valid: (value: boolean | null) => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
12
+ "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
13
+ onValid?: ((value: boolean | null) => any) | undefined;
14
+ }>, {
15
+ disabled: boolean;
16
+ required: boolean;
17
+ id: string;
18
+ name: string;
19
+ placeholder: string;
20
+ dataTestid: string;
21
+ label: string;
22
+ meta: string;
23
+ autofocus: boolean;
24
+ inputClass: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
25
+ valid: boolean | null;
26
+ optional: boolean;
27
+ invalidMessage: string;
28
+ autocomplete: string;
29
+ readonly: boolean;
30
+ allowCoordinationNumber: boolean;
31
+ allowInterimNumber: boolean;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /** IMask pattern for ÅÅÅÅMMDDKKKK (12 digits, no separator). */
2
+ export declare const SSN_MASK = "000000000000";
3
+ /** Alphanumeric mask when interim numbers (letters in num part) are allowed. */
4
+ export declare const SSN_INTERIM_MASK = "XXXXXXXXXXXX";
5
+ export declare const SSN_INTERIM_MASK_OPTIONS: {
6
+ readonly lazy: true;
7
+ readonly definitions: {
8
+ readonly X: RegExp;
9
+ };
10
+ };
11
+ export declare function getSsnMask(allowInterimNumber: boolean): string;
12
+ export declare function getSsnMaskOptions(allowInterimNumber: boolean): {
13
+ readonly lazy: true;
14
+ readonly definitions: {
15
+ readonly X: RegExp;
16
+ };
17
+ } | {
18
+ lazy: boolean;
19
+ };
@@ -0,0 +1,24 @@
1
+ import { FdsInputProps } from '../FdsInput/types';
2
+ type FdsSsnInputPassthroughProps = Pick<FdsInputProps, 'id' | 'autocomplete' | 'required' | 'placeholder' | 'name' | 'autofocus' | 'readonly' | 'inputClass'>;
3
+ export interface FdsSsnProps extends FdsSsnInputPassthroughProps {
4
+ label?: string;
5
+ meta?: string;
6
+ optional?: boolean;
7
+ valid?: boolean | null;
8
+ invalidMessage?: string;
9
+ /** Personnummer as shown in the input (12 characters, no separator). */
10
+ modelValue?: string;
11
+ allowCoordinationNumber?: boolean;
12
+ allowInterimNumber?: boolean;
13
+ disabled?: boolean;
14
+ dataTestid?: string;
15
+ onValid?: ((value: boolean | null) => void) | Array<(value: boolean | null) => void>;
16
+ onBlur?: ((event: FocusEvent) => void) | Array<(event: FocusEvent) => void>;
17
+ 'onUpdate:modelValue'?: ((value: string) => void) | Array<(value: string) => void>;
18
+ }
19
+ export interface FdsSsnEmits {
20
+ 'update:modelValue': [value: string];
21
+ valid: [value: boolean | null];
22
+ blur: [ev: FocusEvent];
23
+ }
24
+ export {};