poe-svelte-ui-lib 1.0.8 → 1.0.10
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/dist/Button/Button.svelte +12 -4
- package/dist/Table/Table.svelte +12 -16
- package/package.json +1 -1
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
<button
|
|
58
58
|
{id}
|
|
59
59
|
class="{twMerge(
|
|
60
|
-
`relative m-0 inline-block w-full items-center rounded-2xl
|
|
60
|
+
`relative m-0 inline-block w-full items-center rounded-2xl
|
|
61
61
|
px-2 py-1 font-semibold shadow-sm transition duration-200 select-none
|
|
62
|
+
${content.icon && !content.name ? 'bg-transparent' : 'border border-[var(--bg-color)] '}
|
|
62
63
|
${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer hover:shadow-md active:scale-97'} `,
|
|
63
64
|
componentClass,
|
|
64
65
|
)} bg-[var(--bg-color)]"
|
|
@@ -73,10 +74,17 @@
|
|
|
73
74
|
}}
|
|
74
75
|
>
|
|
75
76
|
<span class="flex flex-row items-center justify-center gap-2">
|
|
76
|
-
{#if content
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
{#if content?.icon}
|
|
78
|
+
<span
|
|
79
|
+
class={`flex h-8 w-8 shrink-0 items-center justify-center overflow-visible [&_svg]:h-full [&_svg]:max-h-full [&_svg]:w-full [&_svg]:max-w-full`}
|
|
80
|
+
>
|
|
81
|
+
{#if content?.icon}
|
|
82
|
+
{@const IconComponent = content?.icon}
|
|
83
|
+
<IconComponent />
|
|
84
|
+
{/if}
|
|
85
|
+
</span>
|
|
79
86
|
{/if}
|
|
87
|
+
|
|
80
88
|
{#if content.name}
|
|
81
89
|
<div class="flex-1">
|
|
82
90
|
{content.name}
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
import { get } from 'svelte/store'
|
|
4
4
|
import type { ITableHeader, ITableProps } from '../types'
|
|
5
|
-
import { fly } from 'svelte/transition'
|
|
5
|
+
import { fade, fly, slide } from 'svelte/transition'
|
|
6
6
|
import { twMerge } from 'tailwind-merge'
|
|
7
7
|
import { Button, Modal } from '..'
|
|
8
8
|
import { t } from '../locales/i18n'
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
const showModal = async (text: string, formatting?: (text: string) => string) => {
|
|
98
98
|
modalData = {
|
|
99
|
-
isOpen:
|
|
99
|
+
isOpen: true,
|
|
100
100
|
rawData: text,
|
|
101
101
|
formattedData: formatting ? formatting(text) : (text ?? ''),
|
|
102
102
|
}
|
|
@@ -232,21 +232,17 @@
|
|
|
232
232
|
aria-label="Копировать текст"
|
|
233
233
|
>
|
|
234
234
|
{#if copiedCell.y === index && copiedCell.x === column.key}
|
|
235
|
-
<div
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
235
|
+
<div class="rounded-md bg-[var(--green-color)] px-2 py-1 text-sm shadow-lg">✓</div>
|
|
236
|
+
{:else}
|
|
237
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
238
|
+
<g fill="none" stroke="currentColor" stroke-width="1.5">
|
|
239
|
+
<path
|
|
240
|
+
d="M6 11c0-2.828 0-4.243.879-5.121C7.757 5 9.172 5 12 5h3c2.828 0 4.243 0 5.121.879C21 6.757 21 8.172 21 11v5c0 2.828 0 4.243-.879 5.121C19.243 22 17.828 22 15 22h-3c-2.828 0-4.243 0-5.121-.879C6 20.243 6 18.828 6 16z"
|
|
241
|
+
/>
|
|
242
|
+
<path d="M6 19a3 3 0 0 1-3-3v-6c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h4a3 3 0 0 1 3 3" />
|
|
243
|
+
</g>
|
|
244
|
+
</svg>
|
|
241
245
|
{/if}
|
|
242
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
243
|
-
<g fill="none" stroke="currentColor" stroke-width="1.5">
|
|
244
|
-
<path
|
|
245
|
-
d="M6 11c0-2.828 0-4.243.879-5.121C7.757 5 9.172 5 12 5h3c2.828 0 4.243 0 5.121.879C21 6.757 21 8.172 21 11v5c0 2.828 0 4.243-.879 5.121C19.243 22 17.828 22 15 22h-3c-2.828 0-4.243 0-5.121-.879C6 20.243 6 18.828 6 16z"
|
|
246
|
-
/>
|
|
247
|
-
<path d="M6 19a3 3 0 0 1-3-3v-6c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h4a3 3 0 0 1 3 3" />
|
|
248
|
-
</g>
|
|
249
|
-
</svg>
|
|
250
246
|
</button>
|
|
251
247
|
{/if}
|
|
252
248
|
{/if}
|