@kikiloaw/simple-table 1.1.1 → 1.1.2

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": "@kikiloaw/simple-table",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A lightweight, dependency-light DataTable component for Vue 3 with Tailwind CSS",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -25,6 +25,10 @@
25
25
  "@vueuse/core": "^10.0.0 || ^11.0.0 || ^12.0.0",
26
26
  "@inertiajs/vue3": "^1.0.0 || ^2.0.0"
27
27
  },
28
+ "dependencies": {
29
+ "clsx": "^2.1.1",
30
+ "tailwind-merge": "^3.2.0"
31
+ },
28
32
  "repository": {
29
33
  "type": "git",
30
34
  "url": "git+https://github.com/kikiloaw/simple-table.git"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type HTMLAttributes, computed } from 'vue'
3
- import { cn } from '@/lib/utils'
3
+ import { cn } from '../../lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
6
  class?: HTMLAttributes['class']
@@ -0,0 +1,15 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ export function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+
8
+ export function urlIsActive(urlToCheck, currentUrl) {
9
+ const href = typeof urlToCheck === 'string' ? urlToCheck : urlToCheck?.url;
10
+ return href === currentUrl;
11
+ }
12
+
13
+ export function toUrl(href) {
14
+ return typeof href === 'string' ? href : href?.url;
15
+ }