poe-svelte-ui-lib 1.0.14 → 1.0.15

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.
@@ -21,6 +21,20 @@
21
21
 
22
22
  let showInfo = $state(false)
23
23
 
24
+ const svgSize = $derived(() => {
25
+ const widthClass = twMerge(
26
+ wrapperClass.split(' ').find((cls: string) => cls.startsWith('w-')),
27
+ componentClass.split(' ').find((cls: string) => cls.startsWith('w-')),
28
+ )
29
+ const heightClass = twMerge(
30
+ wrapperClass.split(' ').find((cls: string) => cls.startsWith('h-')),
31
+ componentClass.split(' ').find((cls: string) => cls.startsWith('h-')),
32
+ )
33
+ console.log(widthClass)
34
+
35
+ return `${widthClass} ${heightClass}`
36
+ })
37
+
24
38
  /* Обработчик клика */
25
39
  const handleClick = () => {
26
40
  if (disabled || !onClick) return
@@ -77,7 +91,7 @@
77
91
  {#if content?.icon}
78
92
  <span
79
93
  class={`flex items-center justify-center overflow-visible
80
- ${content.name ? 'h-8 w-8' : `${wrapperClass}`} [&_svg]:h-full [&_svg]:max-h-full [&_svg]:w-full [&_svg]:max-w-full`}
94
+ ${content.name ? 'h-8 w-8' : `${svgSize()}`} [&_svg]:h-full [&_svg]:max-h-full [&_svg]:w-full [&_svg]:max-w-full`}
81
95
  >
82
96
  {#if content?.icon}
83
97
  {@const IconComponent = content?.icon}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {