@espri/vue-components 0.0.2 → 1.1.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
@@ -1,8 +1,6 @@
1
1
  # @espri/vue-components
2
2
 
3
- Une bibliothèque de composants Vue 3 réutilisables développés par **ESPRI Digital**.
4
-
5
- Cette bibliothèque est conçue pour être **modulaire** : vous pouvez importer chaque composant individuellement ou installer tous les composants globalement.
3
+ ESPRI Digital Vue 3 component library built on top of PrimeVue.
6
4
 
7
5
  ---
8
6
 
@@ -10,18 +8,15 @@ Cette bibliothèque est conçue pour être **modulaire** : vous pouvez importer
10
8
 
11
9
  ```bash
12
10
  npm install @espri/vue-components
13
- # ou
14
- yarn add @espri/vue-components
15
-
16
- vue-components/
17
- ├─ package.json
18
- ├─ vite.config.js
19
- ├─ src/
20
- │ ├─ select/
21
- │ │ ├─ Select.vue
22
- │ │ └─ index.js
23
- │ ├─ inputtext/
24
- │ │ ├─ InputText.vue
25
- │ │ └─ index.js
26
- │ └─ index.js <-- pour import global via app.use()
27
- ├─ README.md
11
+ ```
12
+
13
+ ## Import example
14
+
15
+ ```javascript
16
+ import { EspriInputText } from '@espri/vue-components';
17
+ ```
18
+
19
+ ## Available Components
20
+
21
+ - `EspriInputText`
22
+ - `EspriSelect`
@@ -1,17 +1,19 @@
1
1
  import type { DefineComponent } from 'vue';
2
- import type { InputTextEmitsForDoc } from './interfaces/input-text-emits.interface';
3
- import type InputTextProps from './interfaces/input-text-props.interface';
2
+ import type EspriInputTextEmits from './interfaces/input-text-emits.interface';
3
+ import type { EspriInputTextEmitsForDoc } from './interfaces/input-text-emits.interface';
4
+ import type EspriInputTextProps from './interfaces/input-text-props.interface';
4
5
  /**
5
6
  * **ESPRI Digital - Input Text (Vue component)**
6
7
  * --- ---
7
8
  * ![ESPRIDigital](https://espridigital.fr/wp-content/uploads/2024/09/logo_espri_digital_white-100-1.png)
8
9
  *
9
10
  */
10
- declare const EspriInputText: DefineComponent<InputTextProps, {}, // For slots if any
11
+ declare const EspriInputText: DefineComponent<EspriInputTextProps, {}, // For slots if any
11
12
  {}, // For methods or data if any
12
13
  {}, // Computed
13
14
  {}, // Methods
14
15
  {}, // Mixin
15
16
  {}, // Extends
16
- InputTextEmitsForDoc>;
17
+ EspriInputTextEmitsForDoc>;
17
18
  export default EspriInputText;
19
+ export type { EspriInputTextEmits, EspriInputTextProps };
@@ -1,8 +1,8 @@
1
1
  import type { ObjectEmitsOptions } from 'vue';
2
- export default interface InputTextEmits {
2
+ export default interface EspriInputTextEmits {
3
3
  (e: 'update:modelValue', value: any): void;
4
4
  }
5
- export interface InputTextEmitsForDoc extends ObjectEmitsOptions {
5
+ export interface EspriInputTextEmitsForDoc extends ObjectEmitsOptions {
6
6
  /**
7
7
  * Called when modelValue is updated.
8
8
  */
@@ -1,4 +1,4 @@
1
- export default interface InputTextProps {
1
+ export default interface EspriInputTextProps {
2
2
  /**
3
3
  * Label displayed above the input.
4
4
  */
@@ -1,17 +1,20 @@
1
1
  import type { DefineComponent } from 'vue';
2
- import type { SelectEmitsForDoc } from './interfaces/select-emits.interface';
3
- import type SelectProps from './interfaces/select-props.interface';
2
+ import type EspriSelectEmits from './interfaces/select-emits.interface';
3
+ import type { EspriSelectEmitsForDoc } from './interfaces/select-emits.interface';
4
+ import type EspriSelectProps from './interfaces/select-props.interface';
5
+ import type { EspriSelectOption } from './interfaces/select-props.interface';
4
6
  /**
5
7
  * **ESPRI Digital - Select (Vue component)**
6
8
  * --- ---
7
9
  * ![ESPRIDigital](https://espridigital.fr/wp-content/uploads/2024/09/logo_espri_digital_white-100-1.png)
8
10
  *
9
11
  */
10
- declare const EspriSelect: DefineComponent<SelectProps, {}, // For slots if any
12
+ declare const EspriSelect: DefineComponent<EspriSelectProps, {}, // For slots if any
11
13
  {}, // For methods or data if any
12
14
  {}, // Computed
13
15
  {}, // Methods
14
16
  {}, // Mixin
15
17
  {}, // Extends
16
- SelectEmitsForDoc>;
18
+ EspriSelectEmitsForDoc>;
17
19
  export default EspriSelect;
20
+ export type { EspriSelectEmits, EspriSelectOption, EspriSelectProps };
@@ -1,8 +1,8 @@
1
1
  import type { ObjectEmitsOptions } from 'vue';
2
- export default interface SelectEmits {
2
+ export default interface EspriSelectEmits {
3
3
  (e: 'update:modelValue', value: any): void;
4
4
  }
5
- export interface SelectEmitsForDoc extends ObjectEmitsOptions {
5
+ export interface EspriSelectEmitsForDoc extends ObjectEmitsOptions {
6
6
  /**
7
7
  * Called when modelValue is updated.
8
8
  */
@@ -1,4 +1,10 @@
1
- export default interface SelectProps {
1
+ export interface EspriSelectOption {
2
+ /** Display text for the option */
3
+ label: string;
4
+ /** Value associated with the option */
5
+ value: any;
6
+ }
7
+ export default interface EspriSelectProps {
2
8
  /**
3
9
  * Label displayed above the input.
4
10
  */
@@ -6,12 +12,7 @@ export default interface SelectProps {
6
12
  /**
7
13
  * Array of options available for selection.
8
14
  */
9
- options: Array<{
10
- /** Display text for the option */
11
- label: string;
12
- /** Value associated with the option */
13
- value: any;
14
- }>;
15
+ options: Array<EspriSelectOption>;
15
16
  /**
16
17
  * Optional CSS class applied to the input element.
17
18
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@espri/vue-components",
3
- "version": "0.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "ESPRI Digital - Vue components library",
5
5
  "author": "ESPRI Digital",
6
6
  "homepage": "https://github.com/ESPRI-Digital/vue-select#readme",
@@ -9,16 +9,16 @@
9
9
  },
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/index.es.js",
13
- "types": "./dist/types/index.d.ts"
12
+ "types": "./dist/types/index.d.ts",
13
+ "import": "./dist/index.es.js"
14
14
  },
15
15
  "./input-text": {
16
- "import": "./dist/input-text.es.js",
17
- "types": "./dist/types/input-text/index.d.ts"
16
+ "types": "./dist/types/input-text/index.d.ts",
17
+ "import": "./dist/input-text.es.js"
18
18
  },
19
19
  "./select": {
20
- "import": "./dist/select.es.js",
21
- "types": "./dist/types/select/index.d.ts"
20
+ "types": "./dist/types/select/index.d.ts",
21
+ "import": "./dist/select.es.js"
22
22
  }
23
23
  },
24
24
  "main": "dist/index.es.js",