poe-svelte-ui-lib 1.1.15 → 1.1.16

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.
@@ -59,7 +59,7 @@
59
59
  )
60
60
  </script>
61
61
 
62
- {#if component && component.properties}
62
+ {#if forConstructor}
63
63
  <div class="relative mb-4 flex flex-row items-start justify-center">
64
64
  <div class="flex w-1/3 flex-col items-center px-2">
65
65
  <UI.Select
@@ -67,10 +67,20 @@
67
67
  options={VARIABLE_OPTIONS}
68
68
  value={VARIABLE_OPTIONS.find((opt) => opt.value === component.properties.id)}
69
69
  onUpdate={(value) => {
70
- updateProperty('id', value.value as string, component, onPropertyChange, value.name?.split('—')[1].trim())
70
+ updateProperty('id', value.value as string, component, onPropertyChange)
71
71
  updateProperty('eventHandler.Variables', value.value as string, component, onPropertyChange)
72
72
  }}
73
73
  />
74
+ <UI.Select
75
+ label={{ name: $t('constructor.props.argument') }}
76
+ type="buttons"
77
+ value={$optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === component.properties.eventHandler.Argument) ??
78
+ $optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === '')}
79
+ options={$optionsStore.FULL_ARGUMENT_OPTION}
80
+ onUpdate={(option) => {
81
+ updateProperty('eventHandler.Argument', option.value as string, component, onPropertyChange)
82
+ }}
83
+ />
74
84
 
75
85
  <UI.Input
76
86
  wrapperClass="{Header.value === 'SET' ? 'mt-1' : ''} "
@@ -80,15 +90,7 @@
80
90
  help={{ info: $t('constructor.props.argument.info'), autocomplete: 'on', regExp: /^[a-zA-Z0-9\-_]{0,32}$/ }}
81
91
  onUpdate={(value) => updateProperty('eventHandler.Argument', value as string, component, onPropertyChange)}
82
92
  />
83
- <UI.Select
84
- label={{ name: $t('constructor.props.variable') }}
85
- options={VARIABLE_OPTIONS}
86
- value={VARIABLE_OPTIONS.find((opt) => opt.value === component.properties.id)}
87
- onUpdate={(value) => {
88
- updateProperty('id', value.value as string, component, onPropertyChange)
89
- updateProperty('eventHandler.Variables', value.value as string, component, onPropertyChange)
90
- }}
91
- />
93
+
92
94
  <UI.Select
93
95
  label={{ name: $t('constructor.props.type') }}
94
96
  type="buttons"
@@ -149,6 +151,151 @@
149
151
 
150
152
  <hr class="border-gray-400" />
151
153
 
154
+ <!-- Настройки опций -->
155
+ <div class="space-y-4">
156
+ <div class="m-0 flex items-center justify-center gap-2">
157
+ <h4>{$t('constructor.props.options.title')}</h4>
158
+ <UI.Button
159
+ wrapperClass="w-8"
160
+ content={{ icon: ButtonAdd }}
161
+ onClick={() => {
162
+ const newOption: ISelectOption = {
163
+ id: crypto.randomUUID(),
164
+ name: 'New Button',
165
+ class: 'bg-max',
166
+ }
167
+ const options = [...(component.properties?.options || []), newOption]
168
+ updateProperty('options', options, component, onPropertyChange)
169
+ }}
170
+ />
171
+ </div>
172
+
173
+ {#each component.properties.options || [] as option, index (option.id)}
174
+ <div class="m-0 flex items-end justify-around gap-2 border-gray-400">
175
+ <UI.Input
176
+ label={{ name: $t('constructor.props.optionname') }}
177
+ wrapperClass="!w-3/10"
178
+ value={option.name}
179
+ onUpdate={(value) => {
180
+ const options = [...(component.properties?.options || [])]
181
+ options[index]['name'] = value
182
+ updateProperty('options', options, component, onPropertyChange)
183
+ }}
184
+ />
185
+ <UI.Input
186
+ label={{ name: $t('constructor.props.optionvalue') }}
187
+ wrapperClass="!w-3/10"
188
+ value={option.value}
189
+ type={currentValueType.value}
190
+ onUpdate={(value) => {
191
+ const options = [...(component.properties?.options || [])]
192
+ options[index]['value'] = value
193
+ updateProperty('options', options, component, onPropertyChange)
194
+ }}
195
+ />
196
+ <UI.Select
197
+ wrapperClass="w-80 h-14.5"
198
+ label={{ name: $t('constructor.props.colors') }}
199
+ type="buttons"
200
+ options={$optionsStore.COLOR_OPTIONS}
201
+ value={$optionsStore.COLOR_OPTIONS.find((c) =>
202
+ (c.value as string).includes(option.class.split(' ').find((cls: string) => cls.startsWith('bg-'))),
203
+ )}
204
+ onUpdate={(option) => {
205
+ const options = [...(component.properties?.options || [])]
206
+ options[index]['class'] = option.value
207
+ updateProperty('options', options, component, onPropertyChange)
208
+ }}
209
+ />
210
+ <UI.Button
211
+ wrapperClass="w-8"
212
+ content={{ icon: ButtonDelete }}
213
+ onClick={() => {
214
+ const options = [...(component.properties?.options || [])]
215
+ options.splice(index, 1)
216
+ updateProperty('options', options, component, onPropertyChange)
217
+ }}
218
+ />
219
+ </div>
220
+ {/each}
221
+ </div>
222
+ {:else}
223
+ <div class="relative mb-4 flex flex-row items-start justify-center">
224
+ <div class="flex w-1/3 flex-col items-center px-2">
225
+ <UI.Input
226
+ label={{ name: $t('constructor.props.id') }}
227
+ value={component.properties.id}
228
+ onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
229
+ />
230
+ <UI.Input
231
+ label={{ name: $t('constructor.props.wrapperclass') }}
232
+ value={component.properties.wrapperClass}
233
+ onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
234
+ />
235
+ <UI.Select
236
+ wrapperClass=" h-14"
237
+ label={{ name: $t('constructor.props.colors') }}
238
+ type="buttons"
239
+ options={$optionsStore.COLOR_OPTIONS}
240
+ value={initialColor}
241
+ onUpdate={(option) => {
242
+ updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
243
+ const options = [...(component.properties?.options || [])]
244
+ options.forEach((o) => {
245
+ o['class'] = option.value
246
+ })
247
+ updateProperty('options', options, component, onPropertyChange)
248
+ }}
249
+ />
250
+ </div>
251
+ <div class="flex w-1/3 flex-col items-center px-2">
252
+ <UI.Input
253
+ label={{ name: $t('constructor.props.label') }}
254
+ value={component.properties.label.name}
255
+ onUpdate={(value) => updateProperty('label.name', value as string, component, onPropertyChange)}
256
+ />
257
+ <UI.Input
258
+ label={{ name: $t('constructor.props.label.class') }}
259
+ value={component.properties.label.class}
260
+ onUpdate={(value) => updateProperty('label.class', value as string, component, onPropertyChange)}
261
+ />
262
+ </div>
263
+ <div class="flex w-1/3 flex-col items-center px-2">
264
+ <UI.Select
265
+ label={{ name: $t('constructor.props.type') }}
266
+ type="buttons"
267
+ value={currentType}
268
+ options={$optionsStore.SELECT_TYPE_OPTIONS}
269
+ onUpdate={(item) => updateProperty('type', item.value as string, component, onPropertyChange)}
270
+ />
271
+ <UI.Select
272
+ wrapperClass="h-14"
273
+ label={{ name: $t('constructor.props.valuetype') }}
274
+ type="buttons"
275
+ options={$optionsStore.SELECT_VALUE_TYPE_OPTIONS}
276
+ value={currentValueType}
277
+ onUpdate={(value) => {
278
+ currentValueType = value as ValueTypeOption
279
+ const options = [...(component.properties?.options || [])]
280
+ const newType = value.value
281
+ options.forEach((option) => {
282
+ if (newType === 'number') option.value = option.value !== undefined ? Number(option.value) : 0
283
+ else option.value = option.value !== undefined ? String(option.value) : ''
284
+ })
285
+ updateProperty('options', options, component, onPropertyChange)
286
+ }}
287
+ />
288
+ <UI.Switch
289
+ wrapperClass="bg-blue"
290
+ label={{ name: $t('constructor.props.disabled') }}
291
+ value={component.properties.disabled ? 2 : 1}
292
+ onChange={(value) => updateProperty('disabled', value === 2, component, onPropertyChange)}
293
+ />
294
+ </div>
295
+ </div>
296
+
297
+ <hr class="border-gray-400" />
298
+
152
299
  <!-- Настройки опций -->
153
300
  <div class="space-y-4">
154
301
  <div class="m-0 flex items-center justify-center gap-2">
@@ -102,13 +102,13 @@
102
102
  {#if isRange}
103
103
  <!-- Трек и активная зона -->
104
104
  <div
105
- class={`absolute h-full w-full rounded-full bg-[var(--gray-color)] ${disabled ? '' : 'cursor-pointer'}`}
105
+ class={`absolute h-full w-full rounded-full bg-(--gray-color) ${disabled ? '' : 'cursor-pointer'}`}
106
106
  role="button"
107
107
  tabindex={null}
108
108
  onkeydown={null}
109
109
  onclick={disabled ? undefined : handleTrackClick}
110
110
  >
111
- <div class="absolute h-full rounded-full bg-[var(--bg-color)]" style={`left: ${lowerPosition}%; right: ${100 - upperPosition}%;`}></div>
111
+ <div class="absolute h-full rounded-full bg-(--bg-color)" style={`left: ${lowerPosition}%; right: ${100 - upperPosition}%;`}></div>
112
112
  </div>
113
113
 
114
114
  <!-- Ползунки -->
@@ -130,7 +130,7 @@
130
130
  class={`absolute h-full w-full appearance-none bg-transparent ${activeThumb === 'lower' ? 'z-30' : 'z-20'}`}
131
131
  />
132
132
  <div
133
- class="pointer-events-none absolute z-40 rounded-full bg-[var(--field-color)]"
133
+ class="pointer-events-none absolute z-40 rounded-full bg-(--field-color)"
134
134
  style={`left: calc(${lowerPosition}% + 0rem); top: 50%; transform: translateY(-50%)`}
135
135
  >
136
136
  <IconGripVerticalLeft />
@@ -154,7 +154,7 @@
154
154
  class={`absolute h-full w-full appearance-none bg-transparent ${activeThumb === 'upper' ? 'z-30' : 'z-20'}`}
155
155
  />
156
156
  <div
157
- class="pointer-events-none absolute z-40 rounded-full bg-[var(--field-color)]"
157
+ class="pointer-events-none absolute z-40 rounded-full bg-(--field-color)"
158
158
  style={`left: calc(${upperPosition}% - 2rem); top: 50%; transform: translateY(-50%)`}
159
159
  >
160
160
  <IconGripVerticalRight />
@@ -162,7 +162,7 @@
162
162
  {:else}
163
163
  <!-- Одиночный слайдер -->
164
164
  <div
165
- class={`absolute h-full w-full rounded-full bg-[var(--gray-color)] ${disabled ? '' : 'cursor-pointer'}`}
165
+ class={`absolute h-full w-full rounded-full bg-(--gray-color) ${disabled ? '' : 'cursor-pointer'}`}
166
166
  role="button"
167
167
  tabindex={null}
168
168
  onkeydown={null}
@@ -190,7 +190,7 @@
190
190
  class="absolute z-20 h-full w-full appearance-none"
191
191
  />
192
192
  <div
193
- class="pointer-events-none absolute z-30 rounded-full bg-[var(--field-color)]"
193
+ class="pointer-events-none absolute z-30 rounded-full bg-(--field-color)"
194
194
  style={`left: clamp(1rem, ${singlePosition}%, calc(100% - 1rem)); top: 50%; transform: translate(-50%, -50%)`}
195
195
  >
196
196
  <IconGripVerticalDual />
@@ -32,7 +32,7 @@
32
32
  )
33
33
  </script>
34
34
 
35
- {#if component && component.properties}
35
+ {#if forConstructor}
36
36
  <div class="relative flex flex-row items-start justify-center">
37
37
  <div class="flex w-1/3 flex-col items-center px-2">
38
38
  <UI.Select
@@ -107,4 +107,87 @@
107
107
  />
108
108
  </div>
109
109
  </div>
110
+ {:else}
111
+ <div class="relative flex flex-row items-start justify-center">
112
+ <div class="flex w-1/3 flex-col items-center px-2">
113
+ <UI.Input
114
+ label={{ name: $t('constructor.props.id') }}
115
+ value={component.properties.id}
116
+ onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
117
+ />
118
+ <UI.Input
119
+ label={{ name: $t('constructor.props.wrapperclass') }}
120
+ value={component.properties.wrapperClass}
121
+ onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
122
+ />
123
+ <UI.Select
124
+ wrapperClass=" h-14"
125
+ label={{ name: $t('constructor.props.colors') }}
126
+ type="buttons"
127
+ options={$optionsStore.COLOR_OPTIONS}
128
+ value={initialColor}
129
+ onUpdate={(option) => {
130
+ updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
131
+ const options = [...(component.properties?.options || [])]
132
+ options.forEach((o) => {
133
+ o['class'] = option.value
134
+ })
135
+ updateProperty('options', options, component, onPropertyChange)
136
+ }}
137
+ />
138
+ <UI.Switch
139
+ wrapperClass="bg-blue"
140
+ label={{ name: $t('constructor.props.disabled') }}
141
+ value={component.properties.disabled ? 2 : 1}
142
+ onChange={(value) => updateProperty('disabled', value === 2, component, onPropertyChange)}
143
+ />
144
+ </div>
145
+ <div class="flex w-1/3 flex-col px-2">
146
+ <UI.Input
147
+ label={{ name: $t('constructor.props.label') }}
148
+ value={component.properties.label.name}
149
+ onUpdate={(value) => updateProperty('label.name', value as string, component, onPropertyChange)}
150
+ />
151
+ <UI.Input
152
+ label={{ name: $t('constructor.props.label.class') }}
153
+ value={component.properties.label.class}
154
+ onUpdate={(value) => updateProperty('label.class', value as string, component, onPropertyChange)}
155
+ />
156
+ <UI.Input
157
+ label={{ name: $t('constructor.props.value') }}
158
+ value={component.properties.value}
159
+ onUpdate={(value) => updateProperty('value', value as string, component, onPropertyChange)}
160
+ />
161
+ </div>
162
+ <div class="flex w-1/3 flex-col px-2">
163
+ <UI.Select
164
+ label={{ name: $t('constructor.props.type') }}
165
+ type="buttons"
166
+ value={$optionsStore.SLIDER_TYPE_OPTIONS.find((opt) => opt.value === (component.properties.type || 'single'))}
167
+ options={$optionsStore.SLIDER_TYPE_OPTIONS}
168
+ onUpdate={(type) => {
169
+ updateProperty('value', type.value === 'single' ? 5 : [2, 7], component, onPropertyChange)
170
+ updateProperty('type', type.value as string, component, onPropertyChange)
171
+ }}
172
+ />
173
+ <UI.Input
174
+ label={{ name: $t('constructor.props.minnum') }}
175
+ value={component.properties.number.minNum as number}
176
+ type="number"
177
+ onUpdate={(value) => updateProperty('number.minNum', Number(value), component, onPropertyChange)}
178
+ />
179
+ <UI.Input
180
+ label={{ name: $t('constructor.props.maxnum') }}
181
+ value={component.properties.number.maxNum as number}
182
+ type="number"
183
+ onUpdate={(value) => updateProperty('number.maxNum', Number(value), component, onPropertyChange)}
184
+ />
185
+ <UI.Input
186
+ label={{ name: $t('constructor.props.step') }}
187
+ value={component.properties.number.step as number}
188
+ type="number"
189
+ onUpdate={(value) => updateProperty('number.step', Number(value), component, onPropertyChange)}
190
+ />
191
+ </div>
192
+ </div>
110
193
  {/if}
@@ -49,15 +49,15 @@
49
49
  <h5 class={`w-full px-4 text-center`}>{label.name}</h5>
50
50
  {/if}
51
51
 
52
- <div class="relative flex w-full grow items-center justify-center !bg-transparent">
52
+ <div class="relative flex w-full grow items-center justify-center bg-transparent">
53
53
  <button
54
54
  class="mr-2 {disabled ? 'opacity-60' : 'cursor-pointer'}"
55
55
  style="width: {maxCaptionWidth}; text-align: end;"
56
56
  onclick={() => handleCaptionClick(1)}>{label.captionLeft}</button
57
57
  >
58
58
  <label
59
- class="relative flex items-center justify-between rounded-full border-1
60
- {checked ? '!border-[var(--bg-color)]' : '!border-[var(--gray-color)]'}
59
+ class="relative flex items-center justify-between rounded-full border
60
+ {checked ? 'border-(--bg-color)' : 'border-(--gray-color)'}
61
61
  {disabled ? 'opacity-60' : ''}"
62
62
  >
63
63
  <input
@@ -70,12 +70,12 @@
70
70
  />
71
71
  <span
72
72
  class="relative flex items-center rounded-full transition-all duration-250
73
- {checked ? '!bg-[var(--bg-color)]' : '!bg-[var(--gray-color)]'}
73
+ {checked ? 'bg-(--bg-color)' : 'bg-(--gray-color)'}
74
74
  {disabled ? '' : 'cursor-pointer'}"
75
75
  style="width: {`calc(${height} * 2)`}; height: {height};"
76
76
  >
77
77
  <span
78
- class="absolute rounded-full bg-[var(--back-color)] transition-all duration-250
78
+ class="absolute rounded-full bg-(--back-color) transition-all duration-250
79
79
  {disabled ? 'opacity-60' : 'cursor-pointer'}"
80
80
  style="width: {`calc(${height} * 0.75)`}; height: {`calc(${height} * 0.75)`}; margin: 0 {`calc(${height} * 0.1)`}; transform: {knobTransform};"
81
81
  ></span>
@@ -25,7 +25,7 @@
25
25
  )
26
26
  </script>
27
27
 
28
- {#if component && component.properties}
28
+ {#if forConstructor}
29
29
  <div class="relative flex flex-row items-start justify-center">
30
30
  <!-- Сообщение для отправки в ws по нажатию кнопки -->
31
31
  <div class="flex w-1/3 flex-col items-center px-2">
@@ -52,13 +52,11 @@
52
52
  <UI.Input
53
53
  label={{ name: $t('constructor.props.caption.left') }}
54
54
  value={component.properties.label.captionLeft}
55
- type="text"
56
55
  onUpdate={(value) => updateProperty('label.captionLeft', value as string, component, onPropertyChange)}
57
56
  />
58
57
  <UI.Input
59
58
  label={{ name: $t('constructor.props.caption.right') }}
60
59
  value={component.properties.label.captionRight}
61
- type="text"
62
60
  onUpdate={(value) => updateProperty('label.captionRight', value as string, component, onPropertyChange)}
63
61
  />
64
62
  <UI.Switch
@@ -72,7 +70,6 @@
72
70
  <UI.Input
73
71
  label={{ name: $t('constructor.props.label') }}
74
72
  value={component.properties.label.name}
75
- type="text"
76
73
  onUpdate={(value) => updateProperty('label.name', value as string, component, onPropertyChange)}
77
74
  />
78
75
  <UI.Select
@@ -85,4 +82,72 @@
85
82
  />
86
83
  </div>
87
84
  </div>
85
+ {:else}
86
+ <div class="relative flex flex-row items-start justify-center">
87
+ <!-- Сообщение для отправки в ws по нажатию кнопки -->
88
+ <div class="flex w-1/3 flex-col items-center px-2">
89
+ <UI.Input
90
+ label={{ name: $t('constructor.props.id') }}
91
+ value={component.properties.id}
92
+ onUpdate={(value) => updateProperty('id', value as string, component, onPropertyChange)}
93
+ />
94
+ <UI.Input
95
+ label={{ name: $t('constructor.props.wrapperclass') }}
96
+ value={component.properties.wrapperClass}
97
+ onUpdate={(value) => updateProperty('wrapperClass', value as string, component, onPropertyChange)}
98
+ />
99
+ <UI.Select
100
+ wrapperClass=" h-14"
101
+ label={{ name: $t('constructor.props.colors') }}
102
+ type="buttons"
103
+ options={$optionsStore.COLOR_OPTIONS}
104
+ value={initialColor}
105
+ onUpdate={(option) => {
106
+ updateProperty('wrapperClass', twMerge(component.properties.wrapperClass, option.value), component, onPropertyChange)
107
+ const options = [...(component.properties?.options || [])]
108
+ options.forEach((o) => {
109
+ o['class'] = option.value
110
+ })
111
+ updateProperty('options', options, component, onPropertyChange)
112
+ }}
113
+ />
114
+ </div>
115
+ <div class="flex w-1/3 flex-col px-2">
116
+ <UI.Input
117
+ label={{ name: $t('constructor.props.label') }}
118
+ value={component.properties.label.name}
119
+ onUpdate={(value) => updateProperty('label.name', value as string, component, onPropertyChange)}
120
+ />
121
+ <UI.Input
122
+ label={{ name: $t('constructor.props.caption.left') }}
123
+ value={component.properties.label.captionLeft}
124
+ onUpdate={(value) => updateProperty('label.captionLeft', value as string, component, onPropertyChange)}
125
+ />
126
+ <UI.Input
127
+ label={{ name: $t('constructor.props.caption.right') }}
128
+ value={component.properties.label.captionRight}
129
+ onUpdate={(value) => updateProperty('label.captionRight', value as string, component, onPropertyChange)}
130
+ />
131
+ </div>
132
+ <div class="flex w-1/3 flex-col px-2">
133
+ <UI.Input
134
+ label={{ name: $t('constructor.props.height') }}
135
+ value={component.properties.height}
136
+ onUpdate={(value) => updateProperty('height', value as string, component, onPropertyChange)}
137
+ />
138
+ <UI.Input
139
+ label={{ name: $t('constructor.props.value') }}
140
+ value={component.properties.value}
141
+ type="number"
142
+ number={{ minNum: 1, maxNum: 2, step: 1 }}
143
+ onUpdate={(value) => updateProperty('value', value as number, component, onPropertyChange)}
144
+ />
145
+ <UI.Switch
146
+ wrapperClass="bg-blue"
147
+ label={{ name: $t('constructor.props.disabled') }}
148
+ value={component.properties.disabled ? 2 : 1}
149
+ onChange={(value) => updateProperty('disabled', value === 2, component, onPropertyChange)}
150
+ />
151
+ </div>
152
+ </div>
88
153
  {/if}
@@ -126,11 +126,11 @@
126
126
  <h5 class={twMerge(`w-full px-4 text-center`, label.class)}>{label.name}</h5>
127
127
  {/if}
128
128
 
129
- <div class="flex h-full flex-col overflow-hidden rounded-xl border-[var(--border-color)]">
129
+ <div class="flex h-full flex-col overflow-hidden rounded-xl border-(--border-color)">
130
130
  <!-- Table Header -->
131
131
  <div class="grid font-semibold" style={`grid-template-columns: ${header.map((c) => c.width || 'minmax(0, 1fr)').join(' ')};`}>
132
132
  {#each header as column (column)}
133
- <div class={twMerge(`justify-center bg-[var(--bg-color)] p-2 text-left`, column.label?.class)}>
133
+ <div class={twMerge(`justify-center bg-(--bg-color) p-2 text-left`, column.label?.class)}>
134
134
  <span>{column.label?.name}</span>
135
135
  {#if column.sortable}
136
136
  <button
@@ -145,13 +145,13 @@
145
145
  </div>
146
146
 
147
147
  <!-- Table Body с прокруткой -->
148
- <div class="flex-1 overflow-y-auto bg-[var(--container-color)]/50" bind:this={container} onscroll={handleScroll}>
148
+ <div class="flex-1 overflow-y-auto bg-(--container-color)/50" bind:this={container} onscroll={handleScroll}>
149
149
  <div class="grid min-w-0" style={`grid-template-columns: ${header.map((c) => c.width || 'minmax(0, 1fr)').join(' ')};`}>
150
150
  {#each body as row, index (row)}
151
151
  {#each header as column (column)}
152
152
  <div
153
- class="relative flex w-full min-w-0 items-center px-2 py-1 break-words
154
- {index % 2 ? '!bg-[var(--back-color)]/40' : ''}
153
+ class="relative flex w-full min-w-0 items-center px-2 py-1 wrap-break-word
154
+ {index % 2 ? 'bg-(--back-color)/40' : 'bg-[#edeef3] dark:bg-[#1f2a3a]'}
155
155
  {column.align === 'center'
156
156
  ? 'flex justify-center text-center'
157
157
  : column.align === 'right'
@@ -164,7 +164,7 @@
164
164
  <button
165
165
  class="{twMerge(`cursor-pointer rounded-full
166
166
  px-4 py-1 font-medium transition-shadow outline-none select-none hover:shadow-md
167
- ${typeof button.class === 'function' ? button.class(row) : button.class}`)} bg-[var(--bg-color)]"
167
+ ${typeof button.class === 'function' ? button.class(row) : button.class}`)} bg-(--bg-color)"
168
168
  onclick={() => buttonClick(row, button)}
169
169
  >
170
170
  {typeof button.name === 'function' ? button.name(row) : button.name}
@@ -189,7 +189,7 @@
189
189
  </div>
190
190
  {:else}
191
191
  <div
192
- class="w-full max-w-full break-words {column.overflow?.truncated
192
+ class="w-full max-w-full wrap-break-word {column.overflow?.truncated
193
193
  ? 'overflow-hidden text-ellipsis whitespace-nowrap'
194
194
  : 'whitespace-normal'}"
195
195
  onmouseenter={column.overflow?.truncated ? (e) => showTooltip(e, row[column.key], column.overflow?.formatting) : undefined}
@@ -231,7 +231,7 @@
231
231
  >
232
232
  <div class=" size-5 text-sm [&_svg]:h-full [&_svg]:max-h-full [&_svg]:w-full [&_svg]:max-w-full">
233
233
  {#if copiedCell.y === index && copiedCell.x === column.key}
234
- <div class="rounded-md bg-[var(--green-color)] shadow-lg">✓</div>
234
+ <div class="rounded-md bg-(--green-color) shadow-lg">✓</div>
235
235
  {:else}
236
236
  <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
237
237
  <g fill="none" stroke="currentColor" stroke-width="1.5">
@@ -266,7 +266,7 @@
266
266
 
267
267
  <!-- Нижнее поле для сводной информации -->
268
268
  {#if footer}
269
- <div class="flex h-8 items-center justify-center bg-[var(--bg-color)]">
269
+ <div class="flex h-8 items-center justify-center bg-(--bg-color)">
270
270
  <h5>{footer}</h5>
271
271
  </div>
272
272
  {/if}