poe-svelte-ui-lib 1.1.17 → 1.1.18

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.
@@ -116,7 +116,7 @@
116
116
  {#if showInfo && content.info?.side === 'top'}
117
117
  <div
118
118
  transition:fly={{ y: -15, duration: 300 }}
119
- class="absolute bottom-full left-1/2 z-50 mb-2 max-w-min min-w-fit rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
119
+ class="absolute bottom-full left-1/2 z-50 mb-2 w-max max-w-xs rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
120
120
  style="transform: translateX(-50%);"
121
121
  >
122
122
  {content.info?.text}
@@ -125,7 +125,7 @@
125
125
  {:else if showInfo && content.info?.side === 'bottom'}
126
126
  <div
127
127
  transition:fly={{ y: 15, duration: 300 }}
128
- class="absolute top-full left-1/2 z-50 mt-2 max-w-min min-w-fit rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
128
+ class="absolute top-full left-1/2 z-50 mt-2 w-max max-w-xs rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
129
129
  style="transform: translateX(-50%);"
130
130
  >
131
131
  {content.info?.text}
@@ -134,7 +134,7 @@
134
134
  {:else if showInfo && content.info?.side === 'left'}
135
135
  <div
136
136
  transition:fly={{ x: 15, duration: 300 }}
137
- class="absolute top-1/2 right-full z-50 mr-2 max-w-min min-w-fit rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
137
+ class="absolute top-1/2 right-full z-50 mr-2 w-max max-w-xs rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
138
138
  style="transform: translateY(-50%);"
139
139
  >
140
140
  {content.info?.text}
@@ -143,7 +143,7 @@
143
143
  {:else if showInfo && content.info?.side === 'right'}
144
144
  <div
145
145
  transition:fly={{ x: -15, duration: 300 }}
146
- class="absolute top-1/2 left-full z-50 ml-2 max-w-min min-w-fit rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
146
+ class="absolute top-1/2 left-full z-50 ml-2 w-max max-w-xs rounded-md bg-(--container-color) px-3 py-1 text-sm shadow-lg"
147
147
  style="transform: translateY(-50%);"
148
148
  >
149
149
  {content.info?.text}
@@ -156,6 +156,13 @@
156
156
  value={component.properties.content.info.text}
157
157
  onUpdate={(value) => updateProperty('content.info.text', value as string, component, onPropertyChange)}
158
158
  />
159
+ <UI.Select
160
+ label={{ name: $t('constructor.props.info.side') }}
161
+ type="buttons"
162
+ options={$optionsStore.INFO_SIDE_OPTIONS}
163
+ value={$optionsStore.INFO_SIDE_OPTIONS.find((h) => h.value === component.properties.content.info.side)}
164
+ onUpdate={(option) => updateProperty('content.info.side', option.value as string, component, onPropertyChange)}
165
+ />
159
166
  <UI.Input
160
167
  label={{ name: $t('constructor.props.svgicon') }}
161
168
  type="text-area"
@@ -80,6 +80,11 @@ const translations = {
80
80
  'constructor.props.rows': 'Количество строк',
81
81
  'constructor.props.placeholder': 'Заполнитель',
82
82
  'constructor.props.info': 'Подсказка',
83
+ 'constructor.props.info.side': 'Положение подсказки',
84
+ 'constructor.props.info.top': 'Вверху',
85
+ 'constructor.props.info.bottom': 'Внизу',
86
+ 'constructor.props.info.left': 'Слева',
87
+ 'constructor.props.info.right': 'Справа',
83
88
  'constructor.props.disabled': 'Отключить',
84
89
  'constructor.props.readonly': 'Только для чтения',
85
90
  'constructor.props.istest': 'Тестовые данные',
package/dist/options.d.ts CHANGED
@@ -85,6 +85,11 @@ export declare const optionsStore: import("svelte/store").Readable<{
85
85
  value: string;
86
86
  name: string;
87
87
  }[];
88
+ INFO_SIDE_OPTIONS: {
89
+ id: string;
90
+ value: string;
91
+ name: string;
92
+ }[];
88
93
  FORM_OPTIONS: {
89
94
  id: string;
90
95
  value: string;
package/dist/options.js CHANGED
@@ -93,6 +93,12 @@ export const optionsStore = derived(t, ($t) => {
93
93
  { id: id(), value: 'cover', name: $t('constructor.props.type.cover') },
94
94
  { id: id(), value: 'contain', name: $t('constructor.props.type.contain') },
95
95
  ],
96
+ INFO_SIDE_OPTIONS: [
97
+ { id: id(), value: 'top', name: $t('constructor.props.info.top') },
98
+ { id: id(), value: 'bottom', name: $t('constructor.props.info.bottom') },
99
+ { id: id(), value: 'left', name: $t('constructor.props.info.left') },
100
+ { id: id(), value: 'right', name: $t('constructor.props.info.right') },
101
+ ],
96
102
  FORM_OPTIONS: [
97
103
  { id: id(), value: 'square', name: $t('constructor.props.type.square') },
98
104
  { id: id(), value: 'circle', name: $t('constructor.props.type.circle') },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {