energy-components 1.7.0 → 1.8.1

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 (93) hide show
  1. package/dist/components/accordion.es.js +13 -13
  2. package/dist/components/accordionGroup.es.js +2 -2
  3. package/dist/components/actionButton.es.js +2 -2
  4. package/dist/components/breadcrumbs.es.js +3 -3
  5. package/dist/components/button.es.js +2 -2
  6. package/dist/components/card.es.js +5 -5
  7. package/dist/components/checkbox.es.js +5 -5
  8. package/dist/components/datepicker.es.js +588 -590
  9. package/dist/components/divider.es.js +2 -2
  10. package/dist/components/dragAndDrop.es.js +187 -0
  11. package/dist/components/dropdown.es.js +92 -92
  12. package/dist/components/filterChip.es.js +2 -2
  13. package/dist/components/floatingActionButton.es.js +2 -2
  14. package/dist/components/{icon-svg-BmDOQ0kL.js → icon-svg-_WCkLP8-.js} +12 -63
  15. package/dist/components/iconList.es.js +4 -4
  16. package/dist/components/iconSvg.es.js +1 -1
  17. package/dist/components/index.es.js +81 -75
  18. package/dist/components/indicator.es.js +6 -6
  19. package/dist/components/infoBox.es.js +16 -16
  20. package/dist/components/link.es.js +2 -2
  21. package/dist/components/modal.es.js +26 -26
  22. package/dist/components/multiselect.es.js +5 -5
  23. package/dist/components/multiselectcontentwrapper.es.js +6 -6
  24. package/dist/components/overlay.es.js +3 -3
  25. package/dist/components/pagination.es.js +1 -1
  26. package/dist/components/persistentToast.es.js +12 -12
  27. package/dist/components/progressBar.es.js +86 -0
  28. package/dist/components/quantitySelector.es.js +9 -9
  29. package/dist/components/{radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js → radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js} +2 -2
  30. package/dist/components/radioButton.es.js +4 -4
  31. package/dist/components/radioGroup.es.js +1 -1
  32. package/dist/components/selectionChip.es.js +3 -3
  33. package/dist/components/sidebar.es.js +13 -13
  34. package/dist/components/sidedrawer.es.js +11 -11
  35. package/dist/components/style/actionButton.css +1 -1
  36. package/dist/components/style/button.css +1 -1
  37. package/dist/components/style/dragAndDrop.css +1 -0
  38. package/dist/components/style/progressBar.css +1 -0
  39. package/dist/components/style/switch.css +1 -1
  40. package/dist/components/style/tabBar.css +1 -1
  41. package/dist/components/style/textField.css +1 -1
  42. package/dist/components/switch.es.js +45 -38
  43. package/dist/components/tabBar.es.js +84 -70
  44. package/dist/components/tablepaginatedcomponent.es.js +22 -22
  45. package/dist/components/tableslotedcomponent.es.js +26 -26
  46. package/dist/components/tag.es.js +2 -2
  47. package/dist/components/textArea.es.js +2 -2
  48. package/dist/components/textField.es.js +134 -110
  49. package/dist/components/toggle.es.js +2 -2
  50. package/dist/components/tooltip.es.js +319 -311
  51. package/dist/energy-components.es.js +4874 -4612
  52. package/dist/energy-components.umd.js +2 -1
  53. package/dist/style.css +1 -1
  54. package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +1 -1
  55. package/dist/types/src/components/buttons/button/button.vue.d.ts +6 -11
  56. package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +1 -1
  57. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +6 -17
  58. package/dist/types/src/components/content/acordion-group/accordion-group.vue.d.ts +6 -11
  59. package/dist/types/src/components/content/card/card.vue.d.ts +6 -11
  60. package/dist/types/src/components/content/divider/divider.vue.d.ts +1 -1
  61. package/dist/types/src/components/content/table/table-paginated/TablePaginatedComponent.vue.d.ts +88 -0
  62. package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +32 -31
  63. package/dist/types/src/components/content/tag/tag.vue.d.ts +1 -1
  64. package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -4
  65. package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +8 -18
  66. package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +8 -12
  67. package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +101 -0
  68. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +1 -1
  69. package/dist/types/src/components/index.d.ts +2 -0
  70. package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +6 -11
  71. package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +258 -0
  72. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +203 -0
  73. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +30 -550
  74. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +1 -3
  75. package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +1 -4
  76. package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
  77. package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +6 -11
  78. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +1 -3
  79. package/dist/types/src/components/input/switch/switch.vue.d.ts +24 -21
  80. package/dist/types/src/components/input/text-area/text-area.vue.d.ts +12 -15
  81. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +33 -21
  82. package/dist/types/src/components/input/toggle/toggle.vue.d.ts +1 -1
  83. package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +10 -17
  84. package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +8 -16
  85. package/dist/types/src/components/navigation/link/link.vue.d.ts +7 -11
  86. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +1 -1
  87. package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +24 -18
  88. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +10 -141
  89. package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +5 -10
  90. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +8 -20
  91. package/dist/types/src/helpers/mobileMockup.vue.d.ts +1 -1
  92. package/dist/types/tsconfig.tsbuildinfo +1 -1
  93. package/package.json +3 -3
@@ -0,0 +1,258 @@
1
+ import type VueDatePickerProps from '@vuepic/vue-datepicker';
2
+ import VueDatePicker from '@vuepic/vue-datepicker';
3
+ import '@vuepic/vue-datepicker/dist/main.css';
4
+ import type { ExtractPropTypes, PropType } from 'vue';
5
+ import { RDSTextField } from '@/components';
6
+ type OriginalVueDatePickerProps = ExtractPropTypes<typeof VueDatePicker['props']>;
7
+ type RDSTextFieldProps = ExtractPropTypes<(typeof RDSTextField)['props']>;
8
+ interface CustomVueDatePickerProps extends Partial<OriginalVueDatePickerProps> {
9
+ format?: (date: Date | Date[] | null) => string;
10
+ }
11
+ declare var __VLS_22: {
12
+ day: number;
13
+ date: Date;
14
+ }, __VLS_41: string | number, __VLS_42: any;
15
+ type __VLS_Slots = {} & {
16
+ [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
17
+ } & {
18
+ day?: (props: typeof __VLS_22) => any;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<ExtractPropTypes<{
21
+ /**
22
+ * ID del interruptor
23
+ */
24
+ id: {
25
+ type: StringConstructor;
26
+ required: true;
27
+ };
28
+ /**
29
+ * Etiqueta para el interruptor
30
+ */
31
+ label: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ /**
36
+ * Localizacion de la fecha
37
+ */
38
+ locale: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ /**
43
+ * Si el interruptor está deshabilitado
44
+ */
45
+ disabled: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ /**
50
+ * Muestra un segundo boton para limpiar el campo
51
+ */
52
+ clearable: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ /**
57
+ * Variante del botón de aceptación
58
+ */
59
+ acceptButtonVariant: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ /**
64
+ * Indica si el datepicker es de rango
65
+ */
66
+ range: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ /**
71
+ * Indica si el datepicker es selector de mes
72
+ */
73
+ monthPicker: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
77
+ /**
78
+ * Formato personalizado de la fecha
79
+ */
80
+ format: {
81
+ type: PropType<(date: Date | Date[] | null) => string>;
82
+ default: undefined;
83
+ };
84
+ /**
85
+ * Este objeto hace referencia a las propiedades de la fila de acciones
86
+ * <br />
87
+ * [Enlace a la documentación](https://vue3datepicker.com/slots/components/#action-row)
88
+ */
89
+ actionRow: {
90
+ type: () => (typeof VueDatePickerProps)["actionRow"];
91
+ default: () => {
92
+ showSelect: boolean;
93
+ showCancel: boolean;
94
+ showNow: boolean;
95
+ showPreview: boolean;
96
+ };
97
+ };
98
+ /**
99
+ * Este objeto hace referencia a las propiedades de VueDatePicker
100
+ * [Enlace a la documentación](https://vuepic.github.io/vue-datepicker/#props)
101
+ * <br />
102
+ * Esta opccion sobreescribe las propiedades por defecto del componente
103
+ */
104
+ vueDatepickerProps: {
105
+ type: PropType<CustomVueDatePickerProps>;
106
+ default: () => {};
107
+ };
108
+ /**
109
+ * Este objeto hace referencia a las propiedades de RDSTextField
110
+ * [Enlace a la documentación](https://energy-components.cloudapp.repsol.com/?path=/docs/components-input-rdstextfield--rdstextfield#rdstextfield)
111
+ * <br />
112
+ * Esta opccion sobreescribe las propiedades por defecto del componente
113
+ */
114
+ textfieldProps: {
115
+ type: PropType<RDSTextFieldProps>;
116
+ default: () => {
117
+ rightIcon: string;
118
+ };
119
+ };
120
+ modelValue: {
121
+ type: PropType<Date | Date[] | null>;
122
+ };
123
+ }>, {
124
+ /**
125
+ * Selecciona la fecha, comunmente usada para el boton de accion
126
+ */
127
+ selectDate: () => void;
128
+ /**
129
+ * Limpia el valor del datepicker
130
+ */
131
+ clearValue: () => void;
132
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
133
+ "update:modelValue": (value: Date | Date[] | null) => any;
134
+ }, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
135
+ /**
136
+ * ID del interruptor
137
+ */
138
+ id: {
139
+ type: StringConstructor;
140
+ required: true;
141
+ };
142
+ /**
143
+ * Etiqueta para el interruptor
144
+ */
145
+ label: {
146
+ type: StringConstructor;
147
+ default: string;
148
+ };
149
+ /**
150
+ * Localizacion de la fecha
151
+ */
152
+ locale: {
153
+ type: StringConstructor;
154
+ default: string;
155
+ };
156
+ /**
157
+ * Si el interruptor está deshabilitado
158
+ */
159
+ disabled: {
160
+ type: BooleanConstructor;
161
+ default: boolean;
162
+ };
163
+ /**
164
+ * Muestra un segundo boton para limpiar el campo
165
+ */
166
+ clearable: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
170
+ /**
171
+ * Variante del botón de aceptación
172
+ */
173
+ acceptButtonVariant: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ /**
178
+ * Indica si el datepicker es de rango
179
+ */
180
+ range: {
181
+ type: BooleanConstructor;
182
+ default: boolean;
183
+ };
184
+ /**
185
+ * Indica si el datepicker es selector de mes
186
+ */
187
+ monthPicker: {
188
+ type: BooleanConstructor;
189
+ default: boolean;
190
+ };
191
+ /**
192
+ * Formato personalizado de la fecha
193
+ */
194
+ format: {
195
+ type: PropType<(date: Date | Date[] | null) => string>;
196
+ default: undefined;
197
+ };
198
+ /**
199
+ * Este objeto hace referencia a las propiedades de la fila de acciones
200
+ * <br />
201
+ * [Enlace a la documentación](https://vue3datepicker.com/slots/components/#action-row)
202
+ */
203
+ actionRow: {
204
+ type: () => (typeof VueDatePickerProps)["actionRow"];
205
+ default: () => {
206
+ showSelect: boolean;
207
+ showCancel: boolean;
208
+ showNow: boolean;
209
+ showPreview: boolean;
210
+ };
211
+ };
212
+ /**
213
+ * Este objeto hace referencia a las propiedades de VueDatePicker
214
+ * [Enlace a la documentación](https://vuepic.github.io/vue-datepicker/#props)
215
+ * <br />
216
+ * Esta opccion sobreescribe las propiedades por defecto del componente
217
+ */
218
+ vueDatepickerProps: {
219
+ type: PropType<CustomVueDatePickerProps>;
220
+ default: () => {};
221
+ };
222
+ /**
223
+ * Este objeto hace referencia a las propiedades de RDSTextField
224
+ * [Enlace a la documentación](https://energy-components.cloudapp.repsol.com/?path=/docs/components-input-rdstextfield--rdstextfield#rdstextfield)
225
+ * <br />
226
+ * Esta opccion sobreescribe las propiedades por defecto del componente
227
+ */
228
+ textfieldProps: {
229
+ type: PropType<RDSTextFieldProps>;
230
+ default: () => {
231
+ rightIcon: string;
232
+ };
233
+ };
234
+ modelValue: {
235
+ type: PropType<Date | Date[] | null>;
236
+ };
237
+ }>> & Readonly<{
238
+ "onUpdate:modelValue"?: ((value: Date | Date[] | null) => any) | undefined;
239
+ }>, {
240
+ label: string;
241
+ disabled: boolean;
242
+ range: boolean;
243
+ clearable: boolean;
244
+ locale: string;
245
+ format: (date: Date | Date[] | null) => string;
246
+ monthPicker: boolean;
247
+ acceptButtonVariant: string;
248
+ actionRow: any;
249
+ vueDatepickerProps: CustomVueDatePickerProps;
250
+ textfieldProps: RDSTextFieldProps;
251
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
252
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
253
+ export default _default;
254
+ type __VLS_WithSlots<T, S> = T & {
255
+ new (): {
256
+ $slots: S;
257
+ };
258
+ };
@@ -0,0 +1,203 @@
1
+ import type { PropType } from 'vue';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ content?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ /**
8
+ * Tipos de archivo aceptados por el input (ej. '.png,.jpg,.pdf', 'image/*').
9
+ */
10
+ accept: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ /**
15
+ * Texto secundario que se muestra debajo del texto principal (ej. formatos permitidos, tamaño máximo).
16
+ */
17
+ detailText: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ /**
22
+ * Indica si el componente está deshabilitado.
23
+ */
24
+ disabled: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ /**
29
+ * Indica si el componente está en estado de error.
30
+ */
31
+ error: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ /**
36
+ * Mensaje de error específico a mostrar en lugar del texto de detalle cuando `error` es `true`.
37
+ */
38
+ errorMessage: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ /**
43
+ * Nombre del icono a mostrar. Por defecto es 'paperclip'.
44
+ */
45
+ icon: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ /**
50
+ * Identificador único para el input de archivo. Si no se proporciona, se genera uno automáticamente.
51
+ */
52
+ id: {
53
+ type: StringConstructor;
54
+ default: null;
55
+ };
56
+ /**
57
+ * Texto principal que se muestra en el componente (ej. "Arrastra para subir un archivo").
58
+ */
59
+ label: {
60
+ type: StringConstructor;
61
+ required: false;
62
+ };
63
+ /**
64
+ * Número máximo de archivos permitidos. Si es `0` o `null`, no hay límite (excepto el que imponga `multiple`).
65
+ */
66
+ maxFiles: {
67
+ type: PropType<number | null>;
68
+ default: null;
69
+ validator: (value: number | null) => boolean;
70
+ };
71
+ /**
72
+ * Indica si se permite la selección múltiple de archivos.
73
+ */
74
+ multiple: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ /**
79
+ * Controla la visibilidad del texto de detalle (`detailText` o `errorMessage`).
80
+ */
81
+ showDetailText: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ /**
86
+ * Indica si el componente debe ocupar todo el ancho disponible.
87
+ */
88
+ fullWidth: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
92
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
93
+ error: (message: string) => any;
94
+ filesSelected: (files: FileList) => any;
95
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
96
+ /**
97
+ * Tipos de archivo aceptados por el input (ej. '.png,.jpg,.pdf', 'image/*').
98
+ */
99
+ accept: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ /**
104
+ * Texto secundario que se muestra debajo del texto principal (ej. formatos permitidos, tamaño máximo).
105
+ */
106
+ detailText: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ };
110
+ /**
111
+ * Indica si el componente está deshabilitado.
112
+ */
113
+ disabled: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ /**
118
+ * Indica si el componente está en estado de error.
119
+ */
120
+ error: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
124
+ /**
125
+ * Mensaje de error específico a mostrar en lugar del texto de detalle cuando `error` es `true`.
126
+ */
127
+ errorMessage: {
128
+ type: StringConstructor;
129
+ default: string;
130
+ };
131
+ /**
132
+ * Nombre del icono a mostrar. Por defecto es 'paperclip'.
133
+ */
134
+ icon: {
135
+ type: StringConstructor;
136
+ default: string;
137
+ };
138
+ /**
139
+ * Identificador único para el input de archivo. Si no se proporciona, se genera uno automáticamente.
140
+ */
141
+ id: {
142
+ type: StringConstructor;
143
+ default: null;
144
+ };
145
+ /**
146
+ * Texto principal que se muestra en el componente (ej. "Arrastra para subir un archivo").
147
+ */
148
+ label: {
149
+ type: StringConstructor;
150
+ required: false;
151
+ };
152
+ /**
153
+ * Número máximo de archivos permitidos. Si es `0` o `null`, no hay límite (excepto el que imponga `multiple`).
154
+ */
155
+ maxFiles: {
156
+ type: PropType<number | null>;
157
+ default: null;
158
+ validator: (value: number | null) => boolean;
159
+ };
160
+ /**
161
+ * Indica si se permite la selección múltiple de archivos.
162
+ */
163
+ multiple: {
164
+ type: BooleanConstructor;
165
+ default: boolean;
166
+ };
167
+ /**
168
+ * Controla la visibilidad del texto de detalle (`detailText` o `errorMessage`).
169
+ */
170
+ showDetailText: {
171
+ type: BooleanConstructor;
172
+ default: boolean;
173
+ };
174
+ /**
175
+ * Indica si el componente debe ocupar todo el ancho disponible.
176
+ */
177
+ fullWidth: {
178
+ type: BooleanConstructor;
179
+ default: boolean;
180
+ };
181
+ }>> & Readonly<{
182
+ onError?: ((message: string) => any) | undefined;
183
+ onFilesSelected?: ((files: FileList) => any) | undefined;
184
+ }>, {
185
+ error: boolean;
186
+ icon: string;
187
+ disabled: boolean;
188
+ id: string;
189
+ multiple: boolean;
190
+ fullWidth: boolean;
191
+ accept: string;
192
+ detailText: string;
193
+ errorMessage: string;
194
+ maxFiles: number | null;
195
+ showDetailText: boolean;
196
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
197
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
198
+ export default _default;
199
+ type __VLS_WithSlots<T, S> = T & {
200
+ new (): {
201
+ $slots: S;
202
+ };
203
+ };