vueless 0.0.825-beta.76 → 0.0.825-beta.78

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.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M452.04-235.26 206.3-481l245.74-245.74L499.78-679 301.54-481l198.24 198-47.74 47.74Zm255.16 0L461.46-481 707.2-726.74 754.93-679l-198 198 198 198-47.73 47.74Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="m404.3-481-198-198 47.74-47.74L499.78-481 254.04-235.26 206.3-283l198-198Zm255.16 0-198-198 47.74-47.74L754.93-481 509.2-235.26 461.46-283l198-198Z"/></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.825-beta.76",
3
+ "version": "0.0.825-beta.78",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -522,6 +522,12 @@ function onClickNextButton() {
522
522
  if (isCurrentView.value.year) addActiveYear(YEARS_PER_VIEW);
523
523
  }
524
524
 
525
+ function onClickNextYearButton() {
526
+ activeDate.value = null;
527
+
528
+ addActiveYear(1);
529
+ }
530
+
525
531
  function onClickPrevButton() {
526
532
  activeDate.value = null;
527
533
 
@@ -530,6 +536,12 @@ function onClickPrevButton() {
530
536
  if (isCurrentView.value.year) addActiveYear(YEARS_PER_VIEW * -1);
531
537
  }
532
538
 
539
+ function onClickPrevYearButton() {
540
+ activeDate.value = null;
541
+
542
+ addActiveYear(-1);
543
+ }
544
+
533
545
  function enterKeyHandler() {
534
546
  if (activeDate.value !== null && isCurrentView.value.day) {
535
547
  localValue.value = activeDate.value;
@@ -739,6 +751,18 @@ const {
739
751
  <template>
740
752
  <div ref="wrapper" :tabindex="tabindex" v-bind="wrapperAttrs" @keydown="onKeydown">
741
753
  <div v-bind="navigationAttrs">
754
+ <UButton
755
+ v-if="range"
756
+ square
757
+ size="sm"
758
+ color="grayscale"
759
+ variant="ghost"
760
+ :icon="config.defaults.prevYearIcon"
761
+ v-bind="nextPrevButtonAttrs"
762
+ @mousedown.prevent.capture
763
+ @click="onClickPrevYearButton"
764
+ />
765
+
742
766
  <UButton
743
767
  square
744
768
  size="sm"
@@ -749,6 +773,7 @@ const {
749
773
  @mousedown.prevent.capture
750
774
  @click="onClickPrevButton"
751
775
  />
776
+
752
777
  <UButton
753
778
  size="sm"
754
779
  color="grayscale"
@@ -769,6 +794,18 @@ const {
769
794
  @mousedown.prevent.capture
770
795
  @click="onClickNextButton"
771
796
  />
797
+
798
+ <UButton
799
+ v-if="range"
800
+ square
801
+ size="sm"
802
+ color="grayscale"
803
+ variant="ghost"
804
+ :icon="config.defaults.nextYearIcon"
805
+ v-bind="nextPrevButtonAttrs"
806
+ @mousedown.prevent.capture
807
+ @click="onClickNextYearButton"
808
+ />
772
809
  </div>
773
810
 
774
811
  <DayView
@@ -155,6 +155,8 @@ export default /*tw*/ {
155
155
  timepicker: false,
156
156
  /* icons */
157
157
  viewSwitchIcon: "keyboard_arrow_down",
158
+ nextYearIcon: "keyboard_double_arrow_right",
159
+ prevYearIcon: "keyboard_double_arrow_left",
158
160
  nextIcon: "keyboard_arrow_right",
159
161
  prevIcon: "keyboard_arrow_left",
160
162
  },
@@ -258,6 +258,14 @@ function onClickRemoveItem(id: string | number) {
258
258
  }
259
259
  }
260
260
 
261
+ defineExpose({
262
+ /**
263
+ * An error.
264
+ * @property {boolean}
265
+ */
266
+ error: currentError,
267
+ });
268
+
261
269
  /**
262
270
  * Get element / nested component attributes for each config token ✨
263
271
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
@@ -267,14 +275,6 @@ const mutatedProps = computed(() => ({
267
275
  label: Boolean(props.label),
268
276
  }));
269
277
 
270
- defineExpose({
271
- /**
272
- * An error.
273
- * @property {boolean}
274
- */
275
- error: currentError,
276
- });
277
-
278
278
  const {
279
279
  getDataTest,
280
280
  config,
@@ -61,6 +61,10 @@ defineExpose({
61
61
  * Get element / nested component attributes for each config token ✨
62
62
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
63
63
  */
64
+ const mutatedProps = computed(() => ({
65
+ imageUrl: Boolean(props.imageUrl),
66
+ }));
67
+
64
68
  const {
65
69
  getDataTest,
66
70
  config,
@@ -70,7 +74,7 @@ const {
70
74
  fileLabelAttrs,
71
75
  fileImageAttrs,
72
76
  removeIconAttrs,
73
- } = useUI<Config>(defaultConfig);
77
+ } = useUI<Config>(defaultConfig, mutatedProps);
74
78
  </script>
75
79
 
76
80
  <template>
@@ -9,19 +9,10 @@ export default /*tw*/ {
9
9
  },
10
10
  },
11
11
  },
12
- body: {
13
- base: "flex items-center",
14
- variants: {
15
- size: {
16
- sm: "gap-1",
17
- md: "gap-1.5",
18
- lg: "gap-2",
19
- },
20
- },
21
- },
12
+ body: "flex items-center gap-2",
22
13
  fileImage: "rounded-sm max-w-7",
23
14
  fileIcon: {
24
- base: "{UIcon}",
15
+ base: "{UIcon} -mr-1",
25
16
  defaults: {
26
17
  size: {
27
18
  sm: "xs",
@@ -30,7 +21,7 @@ export default /*tw*/ {
30
21
  },
31
22
  },
32
23
  },
33
- fileLabel: "{ULink}",
24
+ fileLabel: "{ULink} break-all !leading-[1.5]",
34
25
  removeIcon: {
35
26
  base: "{UIcon}",
36
27
  defaults: {