vueless 1.5.4-beta.0 → 1.5.4-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.5.4-beta.0",
3
+ "version": "1.5.4-beta.1",
4
4
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
@@ -59,7 +59,7 @@
59
59
  "@vue/eslint-config-typescript": "^14.7.0",
60
60
  "@vue/test-utils": "^2.4.8",
61
61
  "@vue/tsconfig": "^0.9.1",
62
- "@vueless/storybook": "^1.8.5",
62
+ "@vueless/storybook": "^1.8.6",
63
63
  "eslint": "^10.2.1",
64
64
  "eslint-plugin-storybook": "^10.3.5",
65
65
  "eslint-plugin-tailwindcss": "^4.0.0-alpha.7",
@@ -30,7 +30,7 @@ export default /*tw*/ {
30
30
  anotherMonthDate: "text-muted",
31
31
  activeDate: "bg-primary/10",
32
32
  selectedDate: "",
33
- currentDate: "border-2 border-primary",
33
+ currentDate: "",
34
34
  day: "{UButton} size-9 w-full",
35
35
  currentDay: "{>day} {>currentDate}",
36
36
  dayInRange: "{>day} {>dateInRange}",
@@ -299,7 +299,7 @@ function getDatePeriodState(date: DatePeriodRange) {
299
299
  v-else-if="getDatePeriodState(date).isCurrentDate"
300
300
  size="sm"
301
301
  color="primary"
302
- variant="outlined"
302
+ variant="ghost"
303
303
  :disabled="isDatePeriodOutOfRange(date)"
304
304
  v-bind="attrs.periodDateCurrentAttrs.value"
305
305
  :label="String(date.title)"
@@ -83,8 +83,8 @@ export default /*tw*/ {
83
83
  },
84
84
  periodDate: "w-full",
85
85
  periodDateSelected: "{>periodDate}",
86
- periodDateCurrent: "{>periodDate} border-2 border-primary",
87
- periodDateCurrentSelected: "{>periodDate} {>periodDateSelected} {>periodDateCurrent}",
86
+ periodDateCurrent: "{>periodDate}",
87
+ periodDateCurrentSelected: "{>periodDate} {>periodDateCurrent} {>periodDateSelected}",
88
88
  customRangeButton: {
89
89
  base: "{>periodButton}",
90
90
  variants: {
@@ -61,7 +61,7 @@ const dynamicComponent = computed(() => {
61
61
 
62
62
  /* Static import */
63
63
  if (src?.render) {
64
- return src.render({}, {});
64
+ return src;
65
65
  }
66
66
 
67
67
  /* Dynamic import */
@@ -2,6 +2,8 @@ import { flushPromises, mount } from "@vue/test-utils";
2
2
  import { describe, it, expect } from "vitest";
3
3
 
4
4
  import testIcon from "./assets/test-icon.svg?component";
5
+ import multipathOutlineIcon from "./assets/test-icon-multipath-outline.svg?component";
6
+ import multipathFilledIcon from "./assets/test-icon-multipath-filled.svg?component";
5
7
 
6
8
  import UIcon from "../UIcon.vue";
7
9
  import type { Props } from "../types";
@@ -34,6 +36,24 @@ describe("UIcon.vue", () => {
34
36
  expect(component.get("[vl-key='icon']")).toBeTruthy();
35
37
  });
36
38
 
39
+ it("Src – re-renders multi-path icon when src changes", async () => {
40
+ const component = mount(UIcon, {
41
+ props: {
42
+ src: multipathOutlineIcon,
43
+ },
44
+ });
45
+
46
+ await flushPromises();
47
+
48
+ expect(component.find("#outline").exists()).toBe(true);
49
+
50
+ await component.setProps({ src: multipathFilledIcon });
51
+
52
+ expect(component.findComponent(multipathFilledIcon!).exists()).toBe(true);
53
+ expect(component.find("#outline").exists()).toBe(false);
54
+ expect(component.find("#filled").exists()).toBe(true);
55
+ });
56
+
37
57
  it("Color – applies correct color classes", () => {
38
58
  const name = "check";
39
59
  const colors = [
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1 1h1"/><path d="M2 2h1"/><path d="M3 3h1"/><path d="M4 4h1"/><path d="M5 5h1"/><path id="filled" d="M6 6h1"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1 1h1"/><path d="M2 2h1"/><path d="M3 3h1"/><path d="M4 4h1"/><path d="M5 5h1"/><path id="outline" d="M6 6h1"/></svg>