pdap-design-system 3.1.0-beta.3 → 3.1.0-beta.31
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/components/Form/types.d.ts +4 -15
- package/dist/components/FormV2/PdapFormV2.vue.d.ts +17 -17
- package/dist/components/FormV2/types.d.ts +4 -14
- package/dist/components/InputCheckbox/PdapInputCheckbox.vue.d.ts +2 -6
- package/dist/components/InputDatePicker/PdapInputDatePicker.vue.d.ts +21 -0
- package/dist/components/InputDatePicker/index.d.ts +1 -0
- package/dist/components/InputDatePicker/types.d.ts +6 -0
- package/dist/components/InputPassword/PdapInputPassword.vue.d.ts +2 -6
- package/dist/components/InputRadio/PdapInputRadio.vue.d.ts +19 -0
- package/dist/components/InputRadio/index.d.ts +1 -0
- package/dist/components/InputRadio/types.d.ts +7 -0
- package/dist/components/InputRadioGroup/PdapInputRadioGroup.vue.d.ts +23 -0
- package/dist/components/InputRadioGroup/index.d.ts +1 -0
- package/dist/components/InputSelect/PdapInputSelect.vue.d.ts +44 -0
- package/dist/components/InputSelect/index.d.ts +1 -0
- package/dist/components/InputSelect/types.d.ts +13 -0
- package/dist/components/InputText/PdapInputText.vue.d.ts +2 -6
- package/dist/components/InputTextArea/PdapInputTextArea.vue.d.ts +34 -0
- package/dist/components/InputTextArea/index.d.ts +1 -0
- package/dist/components/InputTextArea/types.d.ts +6 -0
- package/dist/components/Spinner/PdapSpinner.vue.d.ts +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/index.cjs +11 -11
- package/dist/index.d.ts +5 -1
- package/dist/index.js +11682 -2519
- package/dist/styles.css +1 -1
- package/dist/utils/isKey.d.ts +1 -0
- package/dist/utils/vuelidate.d.ts +10 -43
- package/docs/components.md +3 -0
- package/package.json +3 -1
@@ -1,22 +1,11 @@
|
|
1
1
|
import { PdapInputProps } from '../Input/types';
|
2
|
-
|
2
|
+
import * as validators from '@vuelidate/validators';
|
3
3
|
export interface PdapFormValidator<T> {
|
4
4
|
message?: string;
|
5
|
-
value
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Keyed by currently used validators.
|
9
|
-
* Add any Vuelidate validators or custom ones here as we need them.
|
10
|
-
* See https://vuelidate-next.netlify.app/validators.html#using-builtin-validators for more.
|
11
|
-
*
|
12
|
-
*/
|
13
|
-
export interface PdapFormValidators {
|
14
|
-
maxLength: PdapFormValidator<number>;
|
15
|
-
minLength: PdapFormValidator<number>;
|
16
|
-
required: PdapFormValidator<boolean>;
|
17
|
-
email: PdapFormValidator<boolean>;
|
18
|
-
password: PdapFormValidator<boolean>;
|
5
|
+
value?: T;
|
6
|
+
predicate?: (value: T) => boolean;
|
19
7
|
}
|
8
|
+
export type PdapFormValidators = Record<keyof typeof validators, PdapFormValidator<boolean | string | number>>;
|
20
9
|
export type PdapFormInputProps = PdapInputProps & {
|
21
10
|
validators?: Partial<PdapFormValidators>;
|
22
11
|
};
|
@@ -1,19 +1,27 @@
|
|
1
1
|
import { PdapFormPropsV2 } from './types';
|
2
2
|
declare const values: import("vue").Ref<Record<PropertyKey, unknown>>;
|
3
3
|
declare function setValues(val: Partial<typeof values.value>): void;
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<
|
5
|
-
error: null;
|
6
|
-
}>, {
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapFormPropsV2>, {
|
7
5
|
setValues: typeof setValues;
|
6
|
+
v$: import("vue").Ref<import("@vuelidate/core").Validation<Record<string, {
|
7
|
+
password: any;
|
8
|
+
} | {
|
9
|
+
[x: string]: any;
|
10
|
+
custom?: undefined;
|
11
|
+
} | {
|
12
|
+
custom: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
13
|
+
} | {
|
14
|
+
custom: ((value: unknown) => boolean) | ((value: unknown) => boolean);
|
15
|
+
} | undefined>, Record<PropertyKey, unknown>>>;
|
8
16
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
17
|
+
change: (...args: any[]) => void;
|
18
|
+
error: (...args: any[]) => void;
|
9
19
|
submit: (...args: any[]) => void;
|
10
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<
|
11
|
-
|
12
|
-
}>>> & {
|
20
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapFormPropsV2>>> & {
|
21
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
13
22
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
14
|
-
|
15
|
-
|
16
|
-
}, {}>, {
|
23
|
+
onError?: ((...args: any[]) => any) | undefined;
|
24
|
+
}, {}, {}>, {
|
17
25
|
error?(_: {}): any;
|
18
26
|
default?(_: {}): any;
|
19
27
|
}>;
|
@@ -27,14 +35,6 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
27
35
|
required: true;
|
28
36
|
};
|
29
37
|
};
|
30
|
-
type __VLS_WithDefaults<P, D> = {
|
31
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
32
|
-
default: D[K];
|
33
|
-
}> : P[K];
|
34
|
-
};
|
35
|
-
type __VLS_Prettify<T> = {
|
36
|
-
[K in keyof T]: T[K];
|
37
|
-
} & {};
|
38
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
39
39
|
new (): {
|
40
40
|
$slots: S;
|
@@ -1,23 +1,13 @@
|
|
1
1
|
import useVuelidate from '@vuelidate/core';
|
2
2
|
import { makeRules } from './util';
|
3
3
|
import { Ref } from 'vue';
|
4
|
+
import * as validators from '@vuelidate/validators';
|
4
5
|
export interface PdapFormValidatorV2<T> {
|
5
6
|
message?: string;
|
6
|
-
value
|
7
|
-
|
8
|
-
/**
|
9
|
-
* Keyed by currently used validators.
|
10
|
-
* Add any Vuelidate validators or custom ones here as we need them.
|
11
|
-
* See https://vuelidate-next.netlify.app/validators.html#using-builtin-validators for more.
|
12
|
-
*
|
13
|
-
*/
|
14
|
-
export interface PdapFormValidatorsV2 {
|
15
|
-
maxLength: PdapFormValidatorV2<number>;
|
16
|
-
minLength: PdapFormValidatorV2<number>;
|
17
|
-
required: PdapFormValidatorV2<boolean>;
|
18
|
-
email: PdapFormValidatorV2<boolean>;
|
19
|
-
password: PdapFormValidatorV2<boolean>;
|
7
|
+
value?: T;
|
8
|
+
predicate?: (value: T) => boolean;
|
20
9
|
}
|
10
|
+
export type PdapFormValidatorsV2 = Record<keyof typeof validators, PdapFormValidatorV2<string | number | boolean>>;
|
21
11
|
export type ValidationSchemaV2 = {
|
22
12
|
name: string;
|
23
13
|
validators: Partial<PdapFormValidatorsV2>;
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import { PdapInputCheckboxProps } from './types';
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapInputCheckboxProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapInputCheckboxProps>>>, {}, {}>, {
|
3
|
-
error?(_: {
|
4
|
-
|
5
|
-
}): any;
|
6
|
-
label?(_: {
|
7
|
-
for: string;
|
8
|
-
}): any;
|
3
|
+
error?(_: {}): any;
|
4
|
+
label?(_: {}): any;
|
9
5
|
}>;
|
10
6
|
export default _default;
|
11
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
2
|
+
import { PdapDatePickerProps } from './types';
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapDatePickerProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapDatePickerProps>>>, {}, {}>, {
|
4
|
+
label?(_: {}): any;
|
5
|
+
error?(_: {}): any;
|
6
|
+
}>;
|
7
|
+
export default _default;
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
9
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
12
|
+
} : {
|
13
|
+
type: import('vue').PropType<T[K]>;
|
14
|
+
required: true;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
18
|
+
new (): {
|
19
|
+
$slots: S;
|
20
|
+
};
|
21
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as InputDatePicker } from './PdapInputDatePicker.vue';
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import { PdapInputTextProps } from '../InputText/types';
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapInputTextProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapInputTextProps>>>, {}, {}>, {
|
3
|
-
|
4
|
-
|
5
|
-
}): any;
|
6
|
-
label?(_: {
|
7
|
-
for: string;
|
8
|
-
}): any;
|
3
|
+
label?(_: {}): any;
|
4
|
+
error?(_: {}): any;
|
9
5
|
}>;
|
10
6
|
export default _default;
|
11
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { PdapInputRadioProps } from './types';
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapInputRadioProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapInputRadioProps>>>, {}, {}>, {
|
3
|
+
label?(_: {}): any;
|
4
|
+
}>;
|
5
|
+
export default _default;
|
6
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
7
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
8
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
9
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
10
|
+
} : {
|
11
|
+
type: import('vue').PropType<T[K]>;
|
12
|
+
required: true;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
16
|
+
new (): {
|
17
|
+
$slots: S;
|
18
|
+
};
|
19
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as InputRadio } from './PdapInputRadio.vue';
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
2
|
+
name: string;
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
4
|
+
name: string;
|
5
|
+
}>>>, {}, {}>, {
|
6
|
+
error?(_: {}): any;
|
7
|
+
default?(_: {}): any;
|
8
|
+
}>;
|
9
|
+
export default _default;
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
14
|
+
} : {
|
15
|
+
type: import('vue').PropType<T[K]>;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
20
|
+
new (): {
|
21
|
+
$slots: S;
|
22
|
+
};
|
23
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as RadioGroup } from './PdapInputRadioGroup.vue';
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { PdapSelectOption as Option, PdapInputSelectProps } from './types';
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapInputSelectProps>, {
|
3
|
+
combobox: boolean;
|
4
|
+
placeholder: string;
|
5
|
+
filter: (searchText: any, options: any) => any;
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
7
|
+
change: (...args: any[]) => void;
|
8
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapInputSelectProps>, {
|
9
|
+
combobox: boolean;
|
10
|
+
placeholder: string;
|
11
|
+
filter: (searchText: any, options: any) => any;
|
12
|
+
}>>> & {
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
14
|
+
}, {
|
15
|
+
filter: (searchText: string, options: Option[]) => Option[];
|
16
|
+
placeholder: string;
|
17
|
+
combobox: boolean;
|
18
|
+
}, {}>, {
|
19
|
+
label?(_: {}): any;
|
20
|
+
error?(_: {}): any;
|
21
|
+
}>;
|
22
|
+
export default _default;
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
27
|
+
} : {
|
28
|
+
type: import('vue').PropType<T[K]>;
|
29
|
+
required: true;
|
30
|
+
};
|
31
|
+
};
|
32
|
+
type __VLS_WithDefaults<P, D> = {
|
33
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
34
|
+
default: D[K];
|
35
|
+
}> : P[K];
|
36
|
+
};
|
37
|
+
type __VLS_Prettify<T> = {
|
38
|
+
[K in keyof T]: T[K];
|
39
|
+
} & {};
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
41
|
+
new (): {
|
42
|
+
$slots: S;
|
43
|
+
};
|
44
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as InputSelect } from './PdapInputSelect.vue';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface PdapSelectOption {
|
2
|
+
value: string;
|
3
|
+
label: string;
|
4
|
+
}
|
5
|
+
export interface PdapInputSelectProps {
|
6
|
+
id: string;
|
7
|
+
label?: string;
|
8
|
+
name: string;
|
9
|
+
placeholder?: string;
|
10
|
+
options: PdapSelectOption[];
|
11
|
+
combobox?: boolean;
|
12
|
+
filter?: (searchText: string, options: PdapSelectOption[]) => PdapSelectOption[];
|
13
|
+
}
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import { PdapInputTextProps } from './types';
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PdapInputTextProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PdapInputTextProps>>>, {}, {}>, {
|
3
|
-
|
4
|
-
|
5
|
-
}): any;
|
6
|
-
label?(_: {
|
7
|
-
for: string;
|
8
|
-
}): any;
|
3
|
+
label?(_: {}): any;
|
4
|
+
error?(_: {}): any;
|
9
5
|
}>;
|
10
6
|
export default _default;
|
11
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { PdapInputTextAreaProps } from './types';
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapInputTextAreaProps>, {
|
3
|
+
placeholder: string;
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<PdapInputTextAreaProps>, {
|
5
|
+
placeholder: string;
|
6
|
+
}>>>, {
|
7
|
+
placeholder: string;
|
8
|
+
}, {}>, {
|
9
|
+
label?(_: {}): any;
|
10
|
+
error?(_: {}): any;
|
11
|
+
}>;
|
12
|
+
export default _default;
|
13
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
14
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
16
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
17
|
+
} : {
|
18
|
+
type: import('vue').PropType<T[K]>;
|
19
|
+
required: true;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
type __VLS_WithDefaults<P, D> = {
|
23
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
24
|
+
default: D[K];
|
25
|
+
}> : P[K];
|
26
|
+
};
|
27
|
+
type __VLS_Prettify<T> = {
|
28
|
+
[K in keyof T]: T[K];
|
29
|
+
} & {};
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
31
|
+
new (): {
|
32
|
+
$slots: S;
|
33
|
+
};
|
34
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as InputTextArea } from './PdapInputTextArea.vue';
|
@@ -5,8 +5,13 @@ export { Form } from './Form';
|
|
5
5
|
export { FormV2 } from './FormV2';
|
6
6
|
export { Input } from './Input';
|
7
7
|
export { InputCheckbox } from './InputCheckbox';
|
8
|
+
export { InputDatePicker } from './InputDatePicker';
|
8
9
|
export { InputPassword } from './InputPassword';
|
10
|
+
export { InputRadio } from './InputRadio';
|
11
|
+
export { RadioGroup } from './InputRadioGroup';
|
12
|
+
export { InputSelect } from './InputSelect';
|
9
13
|
export { InputText } from './InputText';
|
14
|
+
export { InputTextArea } from './InputTextArea';
|
10
15
|
export { Header } from './Header';
|
11
16
|
export { Nav } from './Nav';
|
12
17
|
export { QuickSearchForm } from './QuickSearchForm';
|