uisv 0.0.23 → 0.0.24

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.
@@ -1,6 +1,6 @@
1
1
  <script module lang="ts">
2
2
  import { Tabs } from 'bits-ui';
3
- import { isComponent, isSnippet, useElementRects, type PropColor } from '../index.js';
3
+ import { isComponent, Icon, useElementRects, type PropColor } from '../index.js';
4
4
  import { tv, type ClassValue } from 'tailwind-variants';
5
5
  import { type Component, type Snippet } from 'svelte';
6
6
  import { ElementRect } from 'runed';
@@ -9,7 +9,7 @@
9
9
  | string
10
10
  | {
11
11
  label: string;
12
- icon?: string | Component | Snippet;
12
+ icon?: string | Component;
13
13
  iconposition?: 'before' | 'after';
14
14
  content?: string | Component;
15
15
  };
@@ -203,7 +203,7 @@
203
203
  class={variants.item({ class: ui.item })}
204
204
  data-variant={variant}
205
205
  >
206
- {@render RenderIcon(typeof item === 'string' ? undefined : item.icon)}
206
+ <Icon name={typeof item === 'string' ? undefined : item.icon} />
207
207
 
208
208
  {label}
209
209
  </Tabs.Trigger>
@@ -232,13 +232,3 @@
232
232
  {/if}
233
233
  {/each}
234
234
  </Tabs.Root>
235
-
236
- {#snippet RenderIcon(IconProp?: string | Component | Snippet)}
237
- {#if isSnippet(IconProp)}
238
- {@render IconProp()}
239
- {:else if isComponent(IconProp)}
240
- <IconProp class={variants.icon({ class: ui.icon })} />
241
- {:else if typeof IconProp === 'string'}
242
- <div class={variants.icon({ class: [IconProp, ui.icon] })}></div>
243
- {/if}
244
- {/snippet}
@@ -4,7 +4,7 @@ import { type ClassValue } from 'tailwind-variants';
4
4
  import { type Component, type Snippet } from 'svelte';
5
5
  export type TabItem = string | {
6
6
  label: string;
7
- icon?: string | Component | Snippet;
7
+ icon?: string | Component;
8
8
  iconposition?: 'before' | 'after';
9
9
  content?: string | Component;
10
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uisv",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "ui library for the rest of us",
5
5
  "license": "MIT",
6
6
  "repository": "ui-sv/uisv",
@@ -60,38 +60,41 @@
60
60
  "svelte": "^5.0.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@eslint/compat": "^2.0.5",
63
+ "@eslint/compat": "^2.1.0",
64
64
  "@eslint/js": "^10.0.1",
65
- "@iconify-json/lucide": "^1.2.105",
65
+ "@iconify-json/lucide": "^1.2.114",
66
+ "@iconify-json/simple-icons": "^1.2.86",
66
67
  "@sveltejs/adapter-auto": "^7.0.1",
67
- "@sveltejs/kit": "^2.59.1",
68
- "@sveltejs/package": "^2.5.7",
69
- "@sveltejs/vite-plugin-svelte": "^6.2.4",
70
- "@types/node": "^25.6.1",
71
- "@vitest/browser": "^4.1.5",
72
- "eslint": "^10.3.0",
68
+ "@sveltejs/kit": "^2.66.0",
69
+ "@sveltejs/package": "^2.5.8",
70
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
71
+ "@types/node": "^25.9.4",
72
+ "@vitest/browser": "^4.1.9",
73
+ "eslint": "^10.5.0",
73
74
  "eslint-config-prettier": "^10.1.8",
74
- "eslint-plugin-svelte": "^3.17.1",
75
+ "eslint-plugin-svelte": "^3.19.0",
75
76
  "globals": "^17.6.0",
76
- "playwright": "^1.59.1",
77
- "prettier": "^3.8.3",
78
- "prettier-plugin-svelte": "^3.5.1",
79
- "publint": "^0.3.19",
80
- "svelte": "^5.55.5",
81
- "svelte-check": "^4.4.8",
82
- "typescript": "^5.9.3",
83
- "typescript-eslint": "^8.59.2",
84
- "vite": "^7.3.3",
85
- "vitest": "^4.1.5",
77
+ "mdsvex": "^0.12.7",
78
+ "playwright": "^1.61.0",
79
+ "prettier": "^3.8.4",
80
+ "prettier-plugin-svelte": "^4.1.1",
81
+ "publint": "^0.3.21",
82
+ "shiki": "^4.2.0",
83
+ "svelte": "^5.56.3",
84
+ "svelte-check": "^4.6.0",
85
+ "typescript": "^6.0.3",
86
+ "typescript-eslint": "^8.61.1",
87
+ "vite": "^8.0.16",
88
+ "vitest": "^4.1.9",
86
89
  "vitest-browser-svelte": "^2.1.1"
87
90
  },
88
91
  "dependencies": {
89
- "@internationalized/date": "^3.12.1",
90
- "@unocss/preset-web-fonts": "^66.6.8",
92
+ "@internationalized/date": "^3.12.2",
93
+ "@unocss/preset-web-fonts": "^66.7.2",
91
94
  "bits-ui": "^2.18.1",
92
95
  "colortranslator": "^6.1.1",
93
96
  "defu": "^6.1.7",
94
- "devalue": "^5.8.0",
97
+ "devalue": "^5.8.1",
95
98
  "maska": "^3.2.0",
96
99
  "mlly": "^1.8.2",
97
100
  "mode-watcher": "^1.1.0",
@@ -102,7 +105,7 @@
102
105
  "tailwind-merge": "^3.6.0",
103
106
  "tailwind-variants": "^3.2.2",
104
107
  "theme-colors": "^0.1.0",
105
- "unocss": "^66.6.8"
108
+ "unocss": "^66.7.2"
106
109
  },
107
110
  "keywords": [
108
111
  "svelte",