@bethinkpl/design-system 43.0.0 → 44.0.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.
Files changed (51) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +11664 -11121
  3. package/dist/design-system.js.map +1 -1
  4. package/dist/lib/js/components/Form/PinInputField/PinInputField.consts.d.ts +14 -0
  5. package/dist/lib/js/components/Form/PinInputField/PinInputField.types.d.ts +12 -0
  6. package/dist/lib/js/components/Form/PinInputField/PinInputField.utils.d.ts +2 -0
  7. package/dist/lib/js/components/Form/PinInputField/PinInputField.vue.d.ts +91 -0
  8. package/dist/lib/js/components/Form/PinInputField/index.d.ts +5 -0
  9. package/dist/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.d.ts +8 -0
  10. package/dist/lib/js/components/Form/TextAreaField/TextAreaField.types.d.ts +9 -0
  11. package/dist/lib/js/components/Form/TextAreaField/TextAreaField.vue.d.ts +76 -0
  12. package/dist/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue.d.ts +6 -0
  13. package/dist/lib/js/components/Form/TextAreaField/index.d.ts +4 -0
  14. package/dist/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue.d.ts +12 -1
  15. package/dist/lib/js/components/Toast/Toast.consts.d.ts +11 -9
  16. package/dist/lib/js/components/Toast/Toast.vue.d.ts +51 -433
  17. package/dist/lib/js/{components/Form/InputField/useInputFieldWithinForm.d.ts → composables/useTextFieldWithinForm.d.ts} +1 -1
  18. package/dist/lib/js/index.d.ts +4 -0
  19. package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.spec.ts +15 -0
  20. package/lib/js/components/Form/CheckboxGroupField/CheckboxGroupField.vue +5 -2
  21. package/lib/js/components/Form/Form.stories.ts +23 -2
  22. package/lib/js/components/Form/InputField/InputField.spec.ts +11 -1
  23. package/lib/js/components/Form/InputField/InputField.vue +7 -4
  24. package/lib/js/components/Form/PinInputField/PinInputField.consts.ts +18 -0
  25. package/lib/js/components/Form/PinInputField/PinInputField.spec.ts +394 -0
  26. package/lib/js/components/Form/PinInputField/PinInputField.stories.ts +124 -0
  27. package/lib/js/components/Form/PinInputField/PinInputField.types.ts +42 -0
  28. package/lib/js/components/Form/PinInputField/PinInputField.utils.ts +5 -0
  29. package/lib/js/components/Form/PinInputField/PinInputField.vue +211 -0
  30. package/lib/js/components/Form/PinInputField/index.ts +6 -0
  31. package/lib/js/components/Form/PinInputField/usePinInputFieldWithinForm.ts +29 -0
  32. package/lib/js/components/Form/SelectField/SelectField.stories.ts +0 -5
  33. package/lib/js/components/Form/SelectField/useSelectFieldWithinForm.ts +1 -1
  34. package/lib/js/components/Form/TextAreaField/TextAreaField.spec.ts +341 -0
  35. package/lib/js/components/Form/TextAreaField/TextAreaField.stories.ts +99 -0
  36. package/lib/js/components/Form/TextAreaField/TextAreaField.types.ts +23 -0
  37. package/lib/js/components/Form/TextAreaField/TextAreaField.vue +190 -0
  38. package/lib/js/components/Form/TextAreaField/TextAreaFieldAutosized.vue +19 -0
  39. package/lib/js/components/Form/TextAreaField/index.ts +5 -0
  40. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.spec.ts +26 -0
  41. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.stories.ts +16 -3
  42. package/lib/js/components/LabelValue/LabelValueItem/LabelValueItem.vue +5 -0
  43. package/lib/js/components/LoadingBar/LoadingBar.spec.ts +84 -0
  44. package/lib/js/components/LoadingBar/LoadingBar.vue +30 -19
  45. package/lib/js/components/Toast/Toast.consts.ts +4 -2
  46. package/lib/js/components/Toast/Toast.spec.ts +177 -0
  47. package/lib/js/components/Toast/Toast.stories.ts +65 -31
  48. package/lib/js/components/Toast/Toast.vue +176 -195
  49. package/lib/js/{components/Form/InputField/useInputFieldWithinForm.ts → composables/useTextFieldWithinForm.ts} +7 -2
  50. package/lib/js/index.ts +4 -0
  51. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import { Value } from '../../../utils/type.utils';
2
+
3
+ export declare const PIN_INPUT_FIELD_STATES: {
4
+ readonly DEFAULT: "default";
5
+ readonly ERROR: "error";
6
+ readonly LOADING: "loading";
7
+ };
8
+ export type PinInputFieldState = Value<typeof PIN_INPUT_FIELD_STATES>;
9
+ export declare const PIN_INPUT_FIELD_TYPES: {
10
+ readonly TEXT: "text";
11
+ readonly NUMBER: "number";
12
+ };
13
+ export type PinInputFieldType = Value<typeof PIN_INPUT_FIELD_TYPES>;
14
+ export declare const PIN_INPUT_FIELD_DEFAULT_LENGTH = 6;
@@ -0,0 +1,12 @@
1
+ import { FormFieldProps, FormFieldSlots } from '../FormField';
2
+ import { PinInputFieldState, PinInputFieldType } from './PinInputField.consts';
3
+
4
+ export interface PinInputFieldProps extends Omit<FormFieldProps, 'state'> {
5
+ state?: PinInputFieldState;
6
+ length?: number;
7
+ otp?: boolean;
8
+ type?: PinInputFieldType;
9
+ name?: string;
10
+ ariaLabel?: string;
11
+ }
12
+ export type PinInputFieldSlots = Omit<FormFieldSlots, 'field'>;
@@ -0,0 +1,2 @@
1
+ export type PinChars = Array<string | number>;
2
+ export declare function toPinChars(value: string | undefined, length: number): PinChars;
@@ -0,0 +1,91 @@
1
+ import { PinInputFieldSlots } from './PinInputField.types';
2
+
3
+ declare function __VLS_template(): Readonly<PinInputFieldSlots> & PinInputFieldSlots;
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ modelValue: import('vue').PropType<string>;
6
+ state: {
7
+ type: import('vue').PropType<import('./PinInputField.consts').PinInputFieldState>;
8
+ };
9
+ length: {
10
+ type: import('vue').PropType<number>;
11
+ };
12
+ otp: {
13
+ type: import('vue').PropType<boolean>;
14
+ };
15
+ type: {
16
+ type: import('vue').PropType<import('./PinInputField.consts').PinInputFieldType>;
17
+ };
18
+ name: {
19
+ type: import('vue').PropType<string>;
20
+ };
21
+ ariaLabel: {
22
+ type: import('vue').PropType<string>;
23
+ };
24
+ label: {
25
+ type: import('vue').PropType<string>;
26
+ };
27
+ hasRequiredIndicator: {
28
+ type: import('vue').PropType<boolean>;
29
+ };
30
+ labelInfo: {
31
+ type: import('vue').PropType<string>;
32
+ };
33
+ subLabel: {
34
+ type: import('vue').PropType<string>;
35
+ };
36
+ fieldId: {
37
+ type: import('vue').PropType<string>;
38
+ };
39
+ messageText: {
40
+ type: import('vue').PropType<string>;
41
+ };
42
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
43
+ complete: (value: string) => void;
44
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
45
+ modelValue: import('vue').PropType<string>;
46
+ state: {
47
+ type: import('vue').PropType<import('./PinInputField.consts').PinInputFieldState>;
48
+ };
49
+ length: {
50
+ type: import('vue').PropType<number>;
51
+ };
52
+ otp: {
53
+ type: import('vue').PropType<boolean>;
54
+ };
55
+ type: {
56
+ type: import('vue').PropType<import('./PinInputField.consts').PinInputFieldType>;
57
+ };
58
+ name: {
59
+ type: import('vue').PropType<string>;
60
+ };
61
+ ariaLabel: {
62
+ type: import('vue').PropType<string>;
63
+ };
64
+ label: {
65
+ type: import('vue').PropType<string>;
66
+ };
67
+ hasRequiredIndicator: {
68
+ type: import('vue').PropType<boolean>;
69
+ };
70
+ labelInfo: {
71
+ type: import('vue').PropType<string>;
72
+ };
73
+ subLabel: {
74
+ type: import('vue').PropType<string>;
75
+ };
76
+ fieldId: {
77
+ type: import('vue').PropType<string>;
78
+ };
79
+ messageText: {
80
+ type: import('vue').PropType<string>;
81
+ };
82
+ }>> & Readonly<{
83
+ onComplete?: ((value: string) => any) | undefined;
84
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
85
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
86
+ export default _default;
87
+ type __VLS_WithTemplateSlots<T, S> = T & {
88
+ new (): {
89
+ $slots: S;
90
+ };
91
+ };
@@ -0,0 +1,5 @@
1
+ import { default as PinInputField } from './PinInputField.vue';
2
+
3
+ export * from './PinInputField.consts';
4
+ export * from './PinInputField.types';
5
+ export default PinInputField;
@@ -0,0 +1,8 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+
3
+ export declare function usePinInputFieldWithinForm(name: MaybeRefOrGetter<string | undefined>, modelValue: Ref<string | undefined>): {
4
+ value: Ref<string | undefined, string | undefined>;
5
+ errors: import('vue').ComputedRef<string[]>;
6
+ onComplete: (event: Event) => void;
7
+ onBlur: (event: Event) => void;
8
+ };
@@ -0,0 +1,9 @@
1
+ import { TextareaHTMLAttributes } from 'vue';
2
+ import { FormFieldProps, FormFieldSlots } from '../FormField';
3
+
4
+ export interface TextAreaFieldProps extends FormFieldProps {
5
+ inputProps?: TextareaHTMLAttributes;
6
+ isAutoresizing?: boolean;
7
+ name?: string;
8
+ }
9
+ export type TextAreaFieldSlots = Omit<FormFieldSlots, 'field'>;
@@ -0,0 +1,76 @@
1
+ import { TextareaHTMLAttributes } from 'vue';
2
+ import { TextAreaFieldSlots } from './TextAreaField.types';
3
+
4
+ declare function __VLS_template(): Readonly<TextAreaFieldSlots> & TextAreaFieldSlots;
5
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ modelValue: import('vue').PropType<string>;
7
+ inputProps: {
8
+ type: import('vue').PropType<TextareaHTMLAttributes>;
9
+ };
10
+ isAutoresizing: {
11
+ type: import('vue').PropType<boolean>;
12
+ };
13
+ name: {
14
+ type: import('vue').PropType<string>;
15
+ };
16
+ label: {
17
+ type: import('vue').PropType<string>;
18
+ };
19
+ state: {
20
+ type: import('vue').PropType<"default" | "success" | "error" | "disabled">;
21
+ };
22
+ hasRequiredIndicator: {
23
+ type: import('vue').PropType<boolean>;
24
+ };
25
+ labelInfo: {
26
+ type: import('vue').PropType<string>;
27
+ };
28
+ subLabel: {
29
+ type: import('vue').PropType<string>;
30
+ };
31
+ fieldId: {
32
+ type: import('vue').PropType<string>;
33
+ };
34
+ messageText: {
35
+ type: import('vue').PropType<string>;
36
+ };
37
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
38
+ modelValue: import('vue').PropType<string>;
39
+ inputProps: {
40
+ type: import('vue').PropType<TextareaHTMLAttributes>;
41
+ };
42
+ isAutoresizing: {
43
+ type: import('vue').PropType<boolean>;
44
+ };
45
+ name: {
46
+ type: import('vue').PropType<string>;
47
+ };
48
+ label: {
49
+ type: import('vue').PropType<string>;
50
+ };
51
+ state: {
52
+ type: import('vue').PropType<"default" | "success" | "error" | "disabled">;
53
+ };
54
+ hasRequiredIndicator: {
55
+ type: import('vue').PropType<boolean>;
56
+ };
57
+ labelInfo: {
58
+ type: import('vue').PropType<string>;
59
+ };
60
+ subLabel: {
61
+ type: import('vue').PropType<string>;
62
+ };
63
+ fieldId: {
64
+ type: import('vue').PropType<string>;
65
+ };
66
+ messageText: {
67
+ type: import('vue').PropType<string>;
68
+ };
69
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
70
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
71
+ export default _default;
72
+ type __VLS_WithTemplateSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };
@@ -0,0 +1,6 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ modelValue: import('vue').PropType<string>;
3
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
4
+ modelValue: import('vue').PropType<string>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as TextAreaField } from './TextAreaField.vue';
2
+
3
+ export * from './TextAreaField.types';
4
+ export default TextAreaField;
@@ -1,6 +1,11 @@
1
1
  import { LabelValueItemSize, LabelValueItemState, LabelValueItemValueColor } from './LabelValueItem.consts';
2
2
 
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
+ declare function __VLS_template(): Readonly<{
4
+ accessory?: () => any;
5
+ }> & {
6
+ accessory?: () => any;
7
+ };
8
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
9
  state?: LabelValueItemState;
5
10
  label: string;
6
11
  valueText: string;
@@ -15,6 +20,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
15
20
  isLabelStrong?: boolean;
16
21
  valueColor?: LabelValueItemValueColor;
17
22
  }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
18
24
  export default _default;
19
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
26
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -25,3 +31,8 @@ type __VLS_TypePropsToRuntimeProps<T> = {
25
31
  required: true;
26
32
  };
27
33
  };
34
+ type __VLS_WithTemplateSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -3,20 +3,22 @@ import { Value } from '../../utils/type.utils';
3
3
  export declare const TOAST_SIZES: {
4
4
  readonly SMALL: "small";
5
5
  readonly MEDIUM: "medium";
6
+ readonly LARGE: "large";
6
7
  };
7
8
  export type ToastSizes = Value<typeof TOAST_SIZES>;
8
9
  export declare const TOAST_COLORS: {
9
- NEUTRAL_HEAVY: string;
10
- NEUTRAL_STRONG: string;
11
- SUCCESS: string;
12
- WARNING: string;
13
- DANGER: string;
14
- INFO: string;
10
+ readonly NEUTRAL_HEAVY: "neutralHeavy";
11
+ readonly NEUTRAL_STRONG: "neutralStrong";
12
+ readonly SUCCESS: "success";
13
+ readonly WARNING: "warning";
14
+ readonly DANGER: "danger";
15
+ readonly INFO: "info";
15
16
  };
16
17
  export type ToastColors = Value<typeof TOAST_COLORS>;
17
18
  export declare const TOAST_POSITIONS: {
18
- LEFT: string;
19
- CENTER: string;
20
- RIGHT: string;
19
+ readonly LEFT: "left";
20
+ readonly CENTER: "center";
21
+ readonly RIGHT: "right";
22
+ readonly NONE: "none";
21
23
  };
22
24
  export type ToastPositions = Value<typeof TOAST_POSITIONS>;