vueless 1.2.5-beta.6 → 1.2.5-beta.8

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/index.d.ts CHANGED
@@ -10,7 +10,10 @@ export {
10
10
  getStored,
11
11
  getRandomId,
12
12
  createDebounce,
13
- hasSlotContent
13
+ hasSlotContent,
14
+ getCookie,
15
+ setCookie,
16
+ deleteCookie
14
17
  } from "./utils/helper";
15
18
  export { isMac, isPWA, isIOS, isAndroid, isMobileApp, isWindows } from "./utils/platform";
16
19
  export { cx, cva, compose, getDefaults, setVuelessConfig, setColor, vuelessConfig } from "./utils/ui";
package/index.ts CHANGED
@@ -16,7 +16,10 @@ export {
16
16
  getStored,
17
17
  getRandomId,
18
18
  createDebounce,
19
- hasSlotContent
19
+ hasSlotContent,
20
+ getCookie,
21
+ setCookie,
22
+ deleteCookie
20
23
  } from "./utils/helper";
21
24
  export { isMac, isPWA, isIOS, isAndroid, isMobileApp, isWindows } from "./utils/platform";
22
25
  export { cx, cva, compose, getDefaults, setVuelessConfig, setColor, vuelessConfig } from "./utils/ui";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.2.5-beta.6",
3
+ "version": "1.2.5-beta.8",
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",
@@ -25,12 +25,6 @@ const props = withDefaults(defineProps<Props>(), {
25
25
  });
26
26
 
27
27
  const emit = defineEmits([
28
- /**
29
- * Triggers when current page changes.
30
- * @property {number} value
31
- */
32
- "change",
33
-
34
28
  /**
35
29
  * Triggers when current page changes.
36
30
  * @property {number} value
@@ -44,7 +38,6 @@ const currentPage = computed({
44
38
  get: () => props.modelValue,
45
39
  set: (value) => {
46
40
  emit("update:modelValue", value);
47
- emit("change", value);
48
41
  },
49
42
  });
50
43
 
@@ -346,30 +346,6 @@ describe("UPagination.vue", () => {
346
346
 
347
347
  // Events tests
348
348
  describe("Events", () => {
349
- // Change event
350
- it("emits change event when page is changed", async () => {
351
- const component = mount(UPagination, {
352
- props: {
353
- modelValue: 1,
354
- total: 100,
355
- perPage: 10,
356
- },
357
- });
358
-
359
- // Find the second page button and click it
360
- const pageButtons = component.findAllComponents(UButton).filter((button) => {
361
- const text = button.text();
362
-
363
- return text && !isNaN(Number(text));
364
- });
365
-
366
- // Second button
367
- await pageButtons[1].trigger("click");
368
-
369
- expect(component.emitted("change")).toBeTruthy();
370
- expect(component.emitted("change")?.[0]).toEqual([2]); // Second button value
371
- });
372
-
373
349
  // Update:modelValue event
374
350
  it("emits update:modelValue event when page is changed", async () => {
375
351
  const component = mount(UPagination, {
package/utils/theme.ts CHANGED
@@ -124,7 +124,7 @@ function setCSRColorMode(mode: `${ColorMode}`): SetColorMode {
124
124
  }
125
125
 
126
126
  /* Define color mode cookies to be used in both CSR and SSR */
127
- if (mode || getCookie(AUTO_MODE_KEY) === null) {
127
+ if (mode || getCookie(AUTO_MODE_KEY) === undefined) {
128
128
  setCookie(COLOR_MODE_KEY, currentColorMode);
129
129
  setCookie(AUTO_MODE_KEY, String(Number(isAutoMode)));
130
130