vueless 0.0.459 → 0.0.460

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.459",
3
+ "version": "0.0.460",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -256,8 +256,6 @@ const { buttonAttrs, loaderAttrs, leftIconAttrs, rightIconAttrs, centerIconAttrs
256
256
 
257
257
  const buttonRef = ref(null);
258
258
 
259
- defineExpose({ buttonRef });
260
-
261
259
  const loaderSize = computed(() => {
262
260
  const sizes = {
263
261
  "2xs": "sm",
@@ -291,4 +289,12 @@ const iconColor = computed(() => {
291
289
  watchEffect(() => {
292
290
  props.loading && buttonRef.value.blur();
293
291
  });
292
+
293
+ defineExpose({
294
+ /**
295
+ * A reference to the button element for direct DOM manipulation.
296
+ * @property {HTMLElement}
297
+ */
298
+ buttonRef,
299
+ });
294
300
  </script>
@@ -272,8 +272,6 @@ const { route, isActive, isExactActive } = useLink({
272
272
 
273
273
  const wrapperRef = ref(null);
274
274
 
275
- defineExpose({ wrapperRef });
276
-
277
275
  const { wrapperAttrs, linkAttrs } = useAttrs(props, { isActive, isExactActive });
278
276
 
279
277
  const targetValue = computed(() => {
@@ -309,4 +307,12 @@ function onKeydown(event) {
309
307
  function onBlur(event) {
310
308
  emit("blur", event);
311
309
  }
310
+
311
+ defineExpose({
312
+ /**
313
+ * A reference to the link wrapper element for direct DOM manipulation.
314
+ * @property {HTMLElement}
315
+ */
316
+ wrapperRef,
317
+ });
312
318
  </script>
@@ -409,8 +409,6 @@ const emit = defineEmits([
409
409
  "update:rows",
410
410
  ]);
411
411
 
412
- defineExpose({ clearSelectedItems });
413
-
414
412
  const slots = useSlots();
415
413
  const { tm } = useLocale();
416
414
 
@@ -723,4 +721,12 @@ function onToggleRowVisibility(rowId) {
723
721
  // TODO: Use map instead of forEach to get rid of implicit array mutation.
724
722
  tableRows.value.forEach((row) => toggleRowVisibility(row, rowId));
725
723
  }
724
+
725
+ defineExpose({
726
+ /**
727
+ * Allows to clear selected rows.
728
+ * @property {Function}
729
+ */
730
+ clearSelectedItems,
731
+ });
726
732
  </script>
@@ -231,16 +231,6 @@ const {
231
231
 
232
232
  const { tm } = useLocale();
233
233
 
234
- defineExpose({
235
- pointerSet,
236
- pointerBackward,
237
- pointerForward,
238
- pointerReset,
239
- addPointerElement,
240
- optionsRef,
241
- wrapperRef,
242
- });
243
-
244
234
  const i18nGlobal = tm(UDropdownList);
245
235
  const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
246
236
 
@@ -314,4 +304,48 @@ function onClickOption(rawOption) {
314
304
 
315
305
  emit("clickOption", option);
316
306
  }
307
+
308
+ defineExpose({
309
+ /**
310
+ * Allows setting the pointer to a specific index.
311
+ * @property {Function}
312
+ */
313
+ pointerSet,
314
+
315
+ /**
316
+ * Moves the pointer to the previous option in the list.
317
+ * @property {Function}
318
+ */
319
+ pointerBackward,
320
+
321
+ /**
322
+ * Advances the pointer to the next option.
323
+ * @property {Function}
324
+ */
325
+ pointerForward,
326
+
327
+ /**
328
+ * Resets the pointer to the first option.
329
+ * @property {Function}
330
+ */
331
+ pointerReset,
332
+
333
+ /**
334
+ * Adds the current pointer element to the model value.
335
+ * @property {Function}
336
+ */
337
+ addPointerElement,
338
+
339
+ /**
340
+ * A reference to the list of elements representing the available options.
341
+ * @property {HTMLElement}
342
+ */
343
+ optionsRef,
344
+
345
+ /**
346
+ * A reference to the wrapper element containing the entire list of options.
347
+ * @property {HTMLElement}
348
+ */
349
+ wrapperRef,
350
+ });
317
351
  </script>
@@ -339,8 +339,6 @@ const secondsRef = ref(null);
339
339
  const activeDate = ref(null);
340
340
  const activeMonth = ref(null);
341
341
 
342
- defineExpose({ wrapperRef });
343
-
344
342
  const currentView = ref(props.view);
345
343
 
346
344
  watch(
@@ -839,4 +837,12 @@ function onTimeInput(event, type, maxValue, minValue) {
839
837
 
840
838
  input.value = String(numericValue).padStart(2, "0");
841
839
  }
840
+
841
+ defineExpose({
842
+ /**
843
+ * A reference to the calendar element for direct DOM manipulation.
844
+ * @property {HTMLElement}
845
+ */
846
+ wrapperRef,
847
+ });
842
848
  </script>
@@ -312,12 +312,6 @@ const { isTop, isRight, adjustPositionY, adjustPositionX } = useAutoPosition(
312
312
  { x: "left", y: "bottom" },
313
313
  );
314
314
 
315
- defineExpose({
316
- calendarRef,
317
- userFormatDate,
318
- formattedDate,
319
- });
320
-
321
315
  const localValue = computed({
322
316
  get: () => props.modelValue,
323
317
  set: (value) => emit("update:modelValue", value),
@@ -401,4 +395,24 @@ function onInput() {
401
395
  });
402
396
  });
403
397
  }
398
+
399
+ defineExpose({
400
+ /**
401
+ * Reference to the UCalendar component instance.
402
+ * @property {HTMLElement}
403
+ */
404
+ calendarRef,
405
+
406
+ /**
407
+ * The user-friendly formatted date string displayed in the input.
408
+ * @property {String}
409
+ */
410
+ userFormatDate,
411
+
412
+ /**
413
+ * The internal formatted date string.
414
+ * @property {String}
415
+ */
416
+ formattedDate,
417
+ });
404
418
  </script>
@@ -264,8 +264,6 @@ watch(
264
264
  () => String(localValue.value) !== String(rawValue.value) && setValue(localValue.value),
265
265
  );
266
266
 
267
- defineExpose({ input, rawValue, formattedValue });
268
-
269
267
  onMounted(() => {
270
268
  setValue(localValue.value);
271
269
  });
@@ -283,4 +281,24 @@ function onBlur() {
283
281
  function onInput(value) {
284
282
  nextTick(() => emit("input", value));
285
283
  }
284
+
285
+ defineExpose({
286
+ /**
287
+ * Reference to the underlying input element inside UInput.
288
+ * @property {HTMLInputElement}
289
+ */
290
+ input,
291
+
292
+ /**
293
+ * The raw, unformatted value of the input.
294
+ * @property {String | Number}
295
+ */
296
+ rawValue,
297
+
298
+ /**
299
+ * The formatted value displayed in the input.
300
+ * @property {String}
301
+ */
302
+ formattedValue,
303
+ });
286
304
  </script>
@@ -259,8 +259,6 @@ let updateValueWithDebounce = createDebounce((value) => {
259
259
  const localValue = ref("");
260
260
  const inputRef = ref(null);
261
261
 
262
- defineExpose({ inputRef });
263
-
264
262
  const elementId = props.id || useId();
265
263
 
266
264
  const { config, searchInputAttrs, searchIconAttrs, clearIconAttrs, searchButtonAttrs } =
@@ -326,4 +324,12 @@ function onClickClear() {
326
324
  emit("update:modelValue", "");
327
325
  emit("clear");
328
326
  }
327
+
328
+ defineExpose({
329
+ /**
330
+ * A reference to the input element for direct DOM manipulation.
331
+ * @property {HTMLElement}
332
+ */
333
+ inputRef,
334
+ });
329
335
  </script>
@@ -190,5 +190,17 @@ function onClick(event) {
190
190
  emit("click", event);
191
191
  }
192
192
 
193
- defineExpose({ labelElement, wrapperElement });
193
+ defineExpose({
194
+ /**
195
+ * Reference to the label element.
196
+ * @property {HTMLElement}
197
+ */
198
+ labelElement,
199
+
200
+ /**
201
+ * Reference to the wrapper element containing the label and content.
202
+ * @property {HTMLElement}
203
+ */
204
+ wrapperElement,
205
+ });
194
206
  </script>
@@ -593,15 +593,6 @@ const labelComponentRef = ref(null);
593
593
  const leftSlotWrapperRef = ref(null);
594
594
  const innerWrapperRef = ref(null);
595
595
 
596
- defineExpose({
597
- dropdownListRef,
598
- wrapperRef,
599
- searchInputRef,
600
- labelComponentRef,
601
- leftSlotWrapperRef,
602
- innerWrapperRef,
603
- });
604
-
605
596
  const isTop = computed(() => {
606
597
  if (props.openDirection === DIRECTION.top) return true;
607
598
  if (props.openDirection === DIRECTION.bottom) return false;
@@ -878,4 +869,42 @@ function setLabelPosition() {
878
869
  labelComponentRef.value.labelElement.style.left = `${leftSlotWidth + innerWrapperPaddingLeft}px`;
879
870
  }
880
871
  }
872
+
873
+ defineExpose({
874
+ /**
875
+ * A reference to the dropdown list element for direct DOM manipulation.
876
+ * @property {HTMLElement}
877
+ */
878
+ dropdownListRef,
879
+
880
+ /**
881
+ * A reference to the wrapper element for direct DOM manipulation.
882
+ * @property {HTMLElement}
883
+ */
884
+ wrapperRef,
885
+
886
+ /**
887
+ * A reference to the search input element for direct DOM manipulation.
888
+ * @property {HTMLElement}
889
+ */
890
+ searchInputRef,
891
+
892
+ /**
893
+ * A reference to the label component for direct DOM manipulation.
894
+ * @property {HTMLElement}
895
+ */
896
+ labelComponentRef,
897
+
898
+ /**
899
+ * A reference to the left slot wrapper element for direct DOM manipulation.
900
+ * @property {HTMLElement}
901
+ */
902
+ leftSlotWrapperRef,
903
+
904
+ /**
905
+ * A reference to the inner wrapper element for direct DOM manipulation.
906
+ * @property {HTMLElement}
907
+ */
908
+ innerWrapperRef,
909
+ });
881
910
  </script>
@@ -282,8 +282,6 @@ const localValue = computed({
282
282
  },
283
283
  });
284
284
 
285
- defineExpose({ textareaRef });
286
-
287
285
  onMounted(() => toggleReadonly(true));
288
286
 
289
287
  function onChange() {
@@ -339,4 +337,12 @@ function setLabelPosition() {
339
337
  }
340
338
 
341
339
  onMounted(() => setLabelPosition());
340
+
341
+ defineExpose({
342
+ /**
343
+ * A reference to the textarea element for direct DOM manipulation.
344
+ * @property {HTMLElement}
345
+ */
346
+ textareaRef,
347
+ });
342
348
  </script>
@@ -213,8 +213,6 @@ const { badgeAttrs, bodyAttrs, leftIconAttrs, centerIconAttrs, rightIconAttrs }
213
213
 
214
214
  const wrapperRef = ref(null);
215
215
 
216
- defineExpose({ wrapperRef });
217
-
218
216
  const iconSize = computed(() => {
219
217
  const sizes = {
220
218
  sm: "3xs",
@@ -244,4 +242,12 @@ function onKeydown(event) {
244
242
  function onClick(event) {
245
243
  emit("click", event);
246
244
  }
245
+
246
+ defineExpose({
247
+ /**
248
+ * A reference to the component's wrapper element for direct DOM manipulation.
249
+ * @property {HTMLElement}
250
+ */
251
+ wrapperRef,
252
+ });
247
253
  </script>
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.459",
4
+ "version": "0.0.460",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -636,7 +636,13 @@
636
636
  ],
637
637
  "exposes": [
638
638
  {
639
- "name": "wrapperRef"
639
+ "name": "wrapperRef",
640
+ "description": "A reference to the component's wrapper element for direct DOM manipulation.",
641
+ "properties": [
642
+ {
643
+ "type": "HTMLElement"
644
+ }
645
+ ]
640
646
  }
641
647
  ],
642
648
  "source": {
@@ -885,7 +891,13 @@
885
891
  ],
886
892
  "exposes": [
887
893
  {
888
- "name": "buttonRef"
894
+ "name": "buttonRef",
895
+ "description": "A reference to the button element for direct DOM manipulation.",
896
+ "properties": [
897
+ {
898
+ "type": "HTMLElement"
899
+ }
900
+ ]
889
901
  }
890
902
  ],
891
903
  "source": {
@@ -1062,7 +1074,13 @@
1062
1074
  ],
1063
1075
  "exposes": [
1064
1076
  {
1065
- "name": "wrapperRef"
1077
+ "name": "wrapperRef",
1078
+ "description": "A reference to the calendar element for direct DOM manipulation.",
1079
+ "properties": [
1080
+ {
1081
+ "type": "HTMLElement"
1082
+ }
1083
+ ]
1066
1084
  }
1067
1085
  ],
1068
1086
  "source": {
@@ -2584,13 +2602,31 @@
2584
2602
  ],
2585
2603
  "exposes": [
2586
2604
  {
2587
- "name": "calendarRef"
2605
+ "name": "calendarRef",
2606
+ "description": "Reference to the UCalendar component instance.",
2607
+ "properties": [
2608
+ {
2609
+ "type": "HTMLElement"
2610
+ }
2611
+ ]
2588
2612
  },
2589
2613
  {
2590
- "name": "userFormatDate"
2614
+ "name": "userFormatDate",
2615
+ "description": "The user-friendly formatted date string displayed in the input.",
2616
+ "properties": [
2617
+ {
2618
+ "type": "String"
2619
+ }
2620
+ ]
2591
2621
  },
2592
2622
  {
2593
- "name": "formattedDate"
2623
+ "name": "formattedDate",
2624
+ "description": "The internal formatted date string.",
2625
+ "properties": [
2626
+ {
2627
+ "type": "String"
2628
+ }
2629
+ ]
2594
2630
  }
2595
2631
  ],
2596
2632
  "source": {
@@ -3848,25 +3884,67 @@
3848
3884
  ],
3849
3885
  "exposes": [
3850
3886
  {
3851
- "name": "pointerSet"
3887
+ "name": "pointerSet",
3888
+ "description": "Allows setting the pointer to a specific index.",
3889
+ "properties": [
3890
+ {
3891
+ "type": "Function"
3892
+ }
3893
+ ]
3852
3894
  },
3853
3895
  {
3854
- "name": "pointerBackward"
3896
+ "name": "pointerBackward",
3897
+ "description": "Moves the pointer to the previous option in the list.",
3898
+ "properties": [
3899
+ {
3900
+ "type": "Function"
3901
+ }
3902
+ ]
3855
3903
  },
3856
3904
  {
3857
- "name": "pointerForward"
3905
+ "name": "pointerForward",
3906
+ "description": "Advances the pointer to the next option.",
3907
+ "properties": [
3908
+ {
3909
+ "type": "Function"
3910
+ }
3911
+ ]
3858
3912
  },
3859
3913
  {
3860
- "name": "pointerReset"
3914
+ "name": "pointerReset",
3915
+ "description": "Resets the pointer to the first option.",
3916
+ "properties": [
3917
+ {
3918
+ "type": "Function"
3919
+ }
3920
+ ]
3861
3921
  },
3862
3922
  {
3863
- "name": "addPointerElement"
3923
+ "name": "addPointerElement",
3924
+ "description": "Adds the current pointer element to the model value.",
3925
+ "properties": [
3926
+ {
3927
+ "type": "Function"
3928
+ }
3929
+ ]
3864
3930
  },
3865
3931
  {
3866
- "name": "optionsRef"
3932
+ "name": "optionsRef",
3933
+ "description": "A reference to the list of elements representing the available options.",
3934
+ "properties": [
3935
+ {
3936
+ "type": "HTMLElement"
3937
+ }
3938
+ ]
3867
3939
  },
3868
3940
  {
3869
- "name": "wrapperRef"
3941
+ "name": "wrapperRef",
3942
+ "description": "A reference to the wrapper element containing the entire list of options.",
3943
+ "properties": [
3944
+ {
3945
+ "type": "HTMLElement"
3946
+ }
3947
+ ]
3870
3948
  }
3871
3949
  ],
3872
3950
  "source": {
@@ -5127,13 +5205,31 @@
5127
5205
  ],
5128
5206
  "exposes": [
5129
5207
  {
5130
- "name": "input"
5208
+ "name": "input",
5209
+ "description": "Reference to the underlying input element inside UInput.",
5210
+ "properties": [
5211
+ {
5212
+ "type": "HTMLInputElement"
5213
+ }
5214
+ ]
5131
5215
  },
5132
5216
  {
5133
- "name": "rawValue"
5217
+ "name": "rawValue",
5218
+ "description": "The raw, unformatted value of the input.",
5219
+ "properties": [
5220
+ {
5221
+ "type": "String | Number"
5222
+ }
5223
+ ]
5134
5224
  },
5135
5225
  {
5136
- "name": "formattedValue"
5226
+ "name": "formattedValue",
5227
+ "description": "The formatted value displayed in the input.",
5228
+ "properties": [
5229
+ {
5230
+ "type": "String"
5231
+ }
5232
+ ]
5137
5233
  }
5138
5234
  ],
5139
5235
  "source": {
@@ -5657,7 +5753,13 @@
5657
5753
  ],
5658
5754
  "exposes": [
5659
5755
  {
5660
- "name": "inputRef"
5756
+ "name": "inputRef",
5757
+ "description": "A reference to the input element for direct DOM manipulation.",
5758
+ "properties": [
5759
+ {
5760
+ "type": "HTMLElement"
5761
+ }
5762
+ ]
5661
5763
  }
5662
5764
  ],
5663
5765
  "source": {
@@ -5778,10 +5880,22 @@
5778
5880
  ],
5779
5881
  "exposes": [
5780
5882
  {
5781
- "name": "labelElement"
5883
+ "name": "labelElement",
5884
+ "description": "Reference to the label element.",
5885
+ "properties": [
5886
+ {
5887
+ "type": "HTMLElement"
5888
+ }
5889
+ ]
5782
5890
  },
5783
5891
  {
5784
- "name": "wrapperElement"
5892
+ "name": "wrapperElement",
5893
+ "description": "Reference to the wrapper element containing the label and content.",
5894
+ "properties": [
5895
+ {
5896
+ "type": "HTMLElement"
5897
+ }
5898
+ ]
5785
5899
  }
5786
5900
  ],
5787
5901
  "source": {
@@ -6020,7 +6134,13 @@
6020
6134
  ],
6021
6135
  "exposes": [
6022
6136
  {
6023
- "name": "wrapperRef"
6137
+ "name": "wrapperRef",
6138
+ "description": "A reference to the link wrapper element for direct DOM manipulation.",
6139
+ "properties": [
6140
+ {
6141
+ "type": "HTMLElement"
6142
+ }
6143
+ ]
6024
6144
  }
6025
6145
  ],
6026
6146
  "source": {
@@ -8084,22 +8204,58 @@
8084
8204
  ],
8085
8205
  "exposes": [
8086
8206
  {
8087
- "name": "dropdownListRef"
8207
+ "name": "dropdownListRef",
8208
+ "description": "A reference to the dropdown list element for direct DOM manipulation.",
8209
+ "properties": [
8210
+ {
8211
+ "type": "HTMLElement"
8212
+ }
8213
+ ]
8088
8214
  },
8089
8215
  {
8090
- "name": "wrapperRef"
8216
+ "name": "wrapperRef",
8217
+ "description": "A reference to the wrapper element for direct DOM manipulation.",
8218
+ "properties": [
8219
+ {
8220
+ "type": "HTMLElement"
8221
+ }
8222
+ ]
8091
8223
  },
8092
8224
  {
8093
- "name": "searchInputRef"
8225
+ "name": "searchInputRef",
8226
+ "description": "A reference to the search input element for direct DOM manipulation.",
8227
+ "properties": [
8228
+ {
8229
+ "type": "HTMLElement"
8230
+ }
8231
+ ]
8094
8232
  },
8095
8233
  {
8096
- "name": "labelComponentRef"
8234
+ "name": "labelComponentRef",
8235
+ "description": "A reference to the label component for direct DOM manipulation.",
8236
+ "properties": [
8237
+ {
8238
+ "type": "HTMLElement"
8239
+ }
8240
+ ]
8097
8241
  },
8098
8242
  {
8099
- "name": "leftSlotWrapperRef"
8243
+ "name": "leftSlotWrapperRef",
8244
+ "description": "A reference to the left slot wrapper element for direct DOM manipulation.",
8245
+ "properties": [
8246
+ {
8247
+ "type": "HTMLElement"
8248
+ }
8249
+ ]
8100
8250
  },
8101
8251
  {
8102
- "name": "innerWrapperRef"
8252
+ "name": "innerWrapperRef",
8253
+ "description": "A reference to the inner wrapper element for direct DOM manipulation.",
8254
+ "properties": [
8255
+ {
8256
+ "type": "HTMLElement"
8257
+ }
8258
+ ]
8103
8259
  }
8104
8260
  ],
8105
8261
  "source": {
@@ -8551,7 +8707,13 @@
8551
8707
  ],
8552
8708
  "exposes": [
8553
8709
  {
8554
- "name": "clearSelectedItems"
8710
+ "name": "clearSelectedItems",
8711
+ "description": "Allows to clear selected rows.",
8712
+ "properties": [
8713
+ {
8714
+ "type": "Function"
8715
+ }
8716
+ ]
8555
8717
  }
8556
8718
  ],
8557
8719
  "source": {
@@ -9022,7 +9184,13 @@
9022
9184
  ],
9023
9185
  "exposes": [
9024
9186
  {
9025
- "name": "textareaRef"
9187
+ "name": "textareaRef",
9188
+ "description": "A reference to the textarea element for direct DOM manipulation.",
9189
+ "properties": [
9190
+ {
9191
+ "type": "HTMLElement"
9192
+ }
9193
+ ]
9026
9194
  }
9027
9195
  ],
9028
9196
  "source": {