poe-svelte-ui-lib 1.0.7 → 1.0.9

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.
@@ -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 border border-[var(--bg-color)]
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,14 @@
73
74
  }}
74
75
  >
75
76
  <span class="flex flex-row items-center justify-center gap-2">
76
- {#if content.icon}
77
- {@const IconComponent = content.icon}
78
- <IconComponent />
79
- {/if}
77
+ <span
78
+ 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`}
79
+ >
80
+ {#if content?.icon}
81
+ {@const IconComponent = content?.icon}
82
+ <IconComponent />
83
+ {/if}
84
+ </span>
80
85
  {#if content.name}
81
86
  <div class="flex-1">
82
87
  {content.name}
@@ -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: !modalData.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
- class="absolute top-1/2 right-10 -translate-y-1/2 transform rounded-md bg-[var(--green-color)] px-2 py-1 text-sm shadow-lg"
237
- transition:fly={{ x: 10, duration: 200 }}
238
- >
239
-
240
- </div>
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}
package/dist/index.d.ts CHANGED
@@ -1,15 +1,25 @@
1
1
  export { default as Accordion } from './Accordion/Accordion.svelte';
2
+ export { default as AccordionProps } from './Accordion/AccordionProps.svelte';
2
3
  export { default as Button } from './Button/Button.svelte';
4
+ export { default as ButtonProps } from './Button/ButtonProps.svelte';
3
5
  export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
6
+ export { default as ColorPickerProps } from './ColorPicker/ColorPickerProps.svelte';
4
7
  export { default as FileAttach } from './FileAttach.svelte';
5
8
  export { default as Graph } from './Graph/Graph.svelte';
9
+ export { default as GraphProps } from './Graph/GraphProps.svelte';
6
10
  export { default as Input } from './Input/Input.svelte';
11
+ export { default as InputProps } from './Input/InputProps.svelte';
7
12
  export { default as Modal } from './Modal.svelte';
8
13
  export { default as ProgressBar } from './ProgressBar/ProgressBar.svelte';
14
+ export { default as ProgressBarProps } from './ProgressBar/ProgressBarProps.svelte';
9
15
  export { default as Select } from './Select/Select.svelte';
16
+ export { default as SelectProps } from './Select/SelectProps.svelte';
10
17
  export { default as Slider } from './Slider/Slider.svelte';
18
+ export { default as SliderProps } from './Slider/SliderProps.svelte';
11
19
  export { default as Switch } from './Switch/Switch.svelte';
20
+ export { default as SwitchProps } from './Switch/SwitchProps.svelte';
12
21
  export { default as Table } from './Table/Table.svelte';
22
+ export { default as TableProps } from './Table/TableProps.svelte';
13
23
  export { default as TextField } from './TextField/TextField.svelte';
14
24
  export { default as TextFieldProps } from './TextField/TextFieldProps.svelte';
15
25
  export { type UIComponent, type Position, type IUIComponentHandler, type IButtonProps, type IAccordionProps, type IInputProps, type ISelectProps, type ISelectOption, type ISwitchProps, type IColorPickerProps, type ISliderProps, type ITextFieldProps, type IProgressBarProps, type IGraphProps, type IGraphDataObject, type ITableHeader, type ITableProps, } from './types';
package/dist/index.js CHANGED
@@ -1,16 +1,26 @@
1
1
  /* Реэкспорт всех UI компонентов для удобного импорта */
2
2
  export { default as Accordion } from './Accordion/Accordion.svelte';
3
+ export { default as AccordionProps } from './Accordion/AccordionProps.svelte';
3
4
  export { default as Button } from './Button/Button.svelte';
5
+ export { default as ButtonProps } from './Button/ButtonProps.svelte';
4
6
  export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
7
+ export { default as ColorPickerProps } from './ColorPicker/ColorPickerProps.svelte';
5
8
  export { default as FileAttach } from './FileAttach.svelte';
6
9
  export { default as Graph } from './Graph/Graph.svelte';
10
+ export { default as GraphProps } from './Graph/GraphProps.svelte';
7
11
  export { default as Input } from './Input/Input.svelte';
12
+ export { default as InputProps } from './Input/InputProps.svelte';
8
13
  export { default as Modal } from './Modal.svelte';
9
14
  export { default as ProgressBar } from './ProgressBar/ProgressBar.svelte';
15
+ export { default as ProgressBarProps } from './ProgressBar/ProgressBarProps.svelte';
10
16
  export { default as Select } from './Select/Select.svelte';
17
+ export { default as SelectProps } from './Select/SelectProps.svelte';
11
18
  export { default as Slider } from './Slider/Slider.svelte';
19
+ export { default as SliderProps } from './Slider/SliderProps.svelte';
12
20
  export { default as Switch } from './Switch/Switch.svelte';
21
+ export { default as SwitchProps } from './Switch/SwitchProps.svelte';
13
22
  export { default as Table } from './Table/Table.svelte';
23
+ export { default as TableProps } from './Table/TableProps.svelte';
14
24
  export { default as TextField } from './TextField/TextField.svelte';
15
25
  export { default as TextFieldProps } from './TextField/TextFieldProps.svelte';
16
26
  export {} from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {