@davincihealthcare/elty-design-system-vue 1.17.1 → 1.18.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/README.md CHANGED
@@ -14,7 +14,7 @@ Then install required plugins and the design system package itself
14
14
 
15
15
  ```bash
16
16
  # using yarn (or any other package manager)
17
- yarn add -D @tailwindcss/forms @tailwindcss/typography
17
+ yarn add -D tailwindcss postcss autoprefixer @tailwindcss/forms @tailwindcss/typography
18
18
  yarn add @davincihealthcare/elty-design-system-vue
19
19
  ```
20
20
 
@@ -22,25 +22,26 @@ yarn add @davincihealthcare/elty-design-system-vue
22
22
 
23
23
  in tailwind.config file
24
24
 
25
- ```js
25
+ ```ts
26
+ import {EltyTailwindPlugin, EltyTailwindPreset} from '@davincihealthcare/elty-design-system-vue'
26
27
 
27
28
  module.exports = {
28
29
  ...
29
30
  content: [..., './node_modules/@davincihealthcare/elty-design-system-vue/**/*.{tsx,js}'],
31
+ presets: [EltyTailwindPreset],
30
32
  plugins: [
31
33
  require('@tailwindcss/forms'),
32
34
  require('@tailwindcss/typography'),
33
- require('@davincihealthcare/elty-design-system-vue').EltyTailwindPlugin
35
+ EltyTailwindPlugin
34
36
  ]
35
37
  ...
36
38
  }
37
39
  ```
38
40
 
39
- Note: content needs a new entry in the array, alongside other you may already have.
40
-
41
- Make sure to:
41
+ Note: The Preset way of loading the css was introduced from version 1.18.0
42
42
 
43
- - do NOT to import the elty foundations which are already imported alongside this plugin.
43
+ Note: content needs a new entry in the array, alongside other you may already have.
44
+ You may also change the require with a neater
44
45
 
45
46
  in main.ts file
46
47
 
@@ -83,6 +84,10 @@ const onClick = () => {
83
84
 
84
85
  ## Tech stuff and instructions 🔥🔥
85
86
 
87
+ - EltyTailwindPlugin contains some custom css to be applied on forms and so on.
88
+ - EltyTailwindPreset contains the base style for the elty design system. Exported as a preset, and not as a plugin so that it can be easily overridden by the user application
89
+ - EltyVuePlugin contains the vee-validate rules for the inputs
90
+
86
91
  As it has been set the following as `peer dependencies`
87
92
 
88
93
  - @tailwindcss/forms
@@ -10,10 +10,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
10
10
  semiboldText: string;
11
11
  check: boolean;
12
12
  leadingIcon: import('./ElIcon.vue').ElIconProps;
13
+ focused: boolean;
13
14
  }> & Omit<{
14
15
  readonly disabled: boolean;
15
16
  readonly text: string;
16
17
  readonly check: boolean;
18
+ readonly focused: boolean;
17
19
  readonly avatar?: import('./types').AvatarParameters | undefined;
18
20
  readonly semiboldText?: string | undefined;
19
21
  readonly leadingIcon?: import('./ElIcon.vue').ElIconProps | undefined;
@@ -43,7 +45,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
43
45
  type: import('vue').PropType<import('./ElIcon.vue').ElIconProps>;
44
46
  default: undefined;
45
47
  };
46
- }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon">)[] | undefined;
48
+ focused: {
49
+ type: import('vue').PropType<boolean>;
50
+ default: boolean;
51
+ };
52
+ }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon" | "focused">)[] | undefined;
47
53
  }>, {
48
54
  open: undefined;
49
55
  items: undefined;
@@ -61,10 +67,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
61
67
  semiboldText: string;
62
68
  check: boolean;
63
69
  leadingIcon: import('./ElIcon.vue').ElIconProps;
70
+ focused: boolean;
64
71
  }> & Omit<{
65
72
  readonly disabled: boolean;
66
73
  readonly text: string;
67
74
  readonly check: boolean;
75
+ readonly focused: boolean;
68
76
  readonly avatar?: import('./types').AvatarParameters | undefined;
69
77
  readonly semiboldText?: string | undefined;
70
78
  readonly leadingIcon?: import('./ElIcon.vue').ElIconProps | undefined;
@@ -94,7 +102,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
94
102
  type: import('vue').PropType<import('./ElIcon.vue').ElIconProps>;
95
103
  default: undefined;
96
104
  };
97
- }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon">)[] | undefined;
105
+ focused: {
106
+ type: import('vue').PropType<boolean>;
107
+ default: boolean;
108
+ };
109
+ }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon" | "focused">)[] | undefined;
98
110
  }>, {
99
111
  open: undefined;
100
112
  items: undefined;
@@ -111,10 +123,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
111
123
  semiboldText: string;
112
124
  check: boolean;
113
125
  leadingIcon: import('./ElIcon.vue').ElIconProps;
126
+ focused: boolean;
114
127
  }> & Omit<{
115
128
  readonly disabled: boolean;
116
129
  readonly text: string;
117
130
  readonly check: boolean;
131
+ readonly focused: boolean;
118
132
  readonly avatar?: import('./types').AvatarParameters | undefined;
119
133
  readonly semiboldText?: string | undefined;
120
134
  readonly leadingIcon?: import('./ElIcon.vue').ElIconProps | undefined;
@@ -144,7 +158,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
144
158
  type: import('vue').PropType<import('./ElIcon.vue').ElIconProps>;
145
159
  default: undefined;
146
160
  };
147
- }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon">)[];
161
+ focused: {
162
+ type: import('vue').PropType<boolean>;
163
+ default: boolean;
164
+ };
165
+ }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon" | "focused">)[];
148
166
  }, {}>, {
149
167
  default?(_: {}): any;
150
168
  }>;
@@ -1,47 +1,10 @@
1
+ import { default as ElItem } from './ElItem.vue';
2
+
3
+ type Item = {
4
+ onClick?: () => void;
5
+ } & InstanceType<typeof ElItem>['$props'];
1
6
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
- items: ({
3
- onClick?: (() => void) | undefined;
4
- } & Partial<{
5
- disabled: boolean;
6
- text: string;
7
- avatar: import('./types').AvatarParameters;
8
- semiboldText: string;
9
- check: boolean;
10
- leadingIcon: import('./ElIcon.vue').ElIconProps;
11
- }> & Omit<{
12
- readonly disabled: boolean;
13
- readonly text: string;
14
- readonly check: boolean;
15
- readonly avatar?: import('./types').AvatarParameters | undefined;
16
- readonly semiboldText?: string | undefined;
17
- readonly leadingIcon?: import('./ElIcon.vue').ElIconProps | undefined;
18
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
19
- disabled: {
20
- type: import('vue').PropType<boolean>;
21
- default: boolean;
22
- };
23
- text: {
24
- type: import('vue').PropType<string>;
25
- required: true;
26
- default: string;
27
- };
28
- avatar: {
29
- type: import('vue').PropType<import('./types').AvatarParameters>;
30
- default: undefined;
31
- };
32
- semiboldText: {
33
- type: import('vue').PropType<string>;
34
- default: undefined;
35
- };
36
- check: {
37
- type: import('vue').PropType<boolean>;
38
- default: boolean;
39
- };
40
- leadingIcon: {
41
- type: import('vue').PropType<import('./ElIcon.vue').ElIconProps>;
42
- default: undefined;
43
- };
44
- }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon">)[];
7
+ items: Item[];
45
8
  title?: string | undefined;
46
9
  action?: Omit<Partial<{
47
10
  disabled: boolean;
@@ -129,53 +92,15 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
129
92
  isOpen: undefined;
130
93
  minWidth: undefined;
131
94
  maxHeight: number;
132
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
95
+ }>, {
96
+ show: () => boolean;
97
+ hide: () => boolean;
98
+ toggle: () => boolean;
99
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
133
100
  "click:action": () => void;
134
101
  "update:is-open": (isOpen: boolean) => void;
135
102
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
136
- items: ({
137
- onClick?: (() => void) | undefined;
138
- } & Partial<{
139
- disabled: boolean;
140
- text: string;
141
- avatar: import('./types').AvatarParameters;
142
- semiboldText: string;
143
- check: boolean;
144
- leadingIcon: import('./ElIcon.vue').ElIconProps;
145
- }> & Omit<{
146
- readonly disabled: boolean;
147
- readonly text: string;
148
- readonly check: boolean;
149
- readonly avatar?: import('./types').AvatarParameters | undefined;
150
- readonly semiboldText?: string | undefined;
151
- readonly leadingIcon?: import('./ElIcon.vue').ElIconProps | undefined;
152
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
153
- disabled: {
154
- type: import('vue').PropType<boolean>;
155
- default: boolean;
156
- };
157
- text: {
158
- type: import('vue').PropType<string>;
159
- required: true;
160
- default: string;
161
- };
162
- avatar: {
163
- type: import('vue').PropType<import('./types').AvatarParameters>;
164
- default: undefined;
165
- };
166
- semiboldText: {
167
- type: import('vue').PropType<string>;
168
- default: undefined;
169
- };
170
- check: {
171
- type: import('vue').PropType<boolean>;
172
- default: boolean;
173
- };
174
- leadingIcon: {
175
- type: import('vue').PropType<import('./ElIcon.vue').ElIconProps>;
176
- default: undefined;
177
- };
178
- }>>, "disabled" | "text" | "avatar" | "semiboldText" | "check" | "leadingIcon">)[];
103
+ items: Item[];
179
104
  title?: string | undefined;
180
105
  action?: Omit<Partial<{
181
106
  disabled: boolean;
@@ -8,6 +8,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
8
8
  leadingIcon?: ElIconProps | undefined;
9
9
  avatar?: AvatarParameters | undefined;
10
10
  disabled?: boolean | undefined;
11
+ focused?: boolean | undefined;
11
12
  }>, {
12
13
  text: string;
13
14
  semiboldText: undefined;
@@ -15,6 +16,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
15
16
  leadingIcon: undefined;
16
17
  avatar: undefined;
17
18
  disabled: boolean;
19
+ focused: boolean;
18
20
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
19
21
  text: string;
20
22
  semiboldText?: string | undefined;
@@ -22,6 +24,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
22
24
  leadingIcon?: ElIconProps | undefined;
23
25
  avatar?: AvatarParameters | undefined;
24
26
  disabled?: boolean | undefined;
27
+ focused?: boolean | undefined;
25
28
  }>, {
26
29
  text: string;
27
30
  semiboldText: undefined;
@@ -29,6 +32,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
29
32
  leadingIcon: undefined;
30
33
  avatar: undefined;
31
34
  disabled: boolean;
35
+ focused: boolean;
32
36
  }>>>, {
33
37
  disabled: boolean;
34
38
  text: string;
@@ -36,6 +40,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
36
40
  semiboldText: string;
37
41
  check: boolean;
38
42
  leadingIcon: ElIconProps;
43
+ focused: boolean;
39
44
  }, {}>;
40
45
  export default _default;
41
46
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
  export { default as EltyVuePlugin } from './vue.plugin';
3
3
  export { default as EltyTailwindPlugin } from './tailwind.plugin';
4
+ export { default as EltyTailwindPreset } from './preset';
4
5
  export * from './types';
5
6
  export * from './ElAccordion.vue';
6
7
  export { default as ElAccordion } from './ElAccordion.vue';