poe-svelte-ui-lib 1.3.3 → 1.3.4

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.
@@ -20,8 +20,8 @@
20
20
  <div
21
21
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
22
22
  class={twMerge(
23
- `${outline ? 'border-none' : 'rounded-xl hover:shadow-md'} w-full
24
- border border-(--border-color) bg-(--container-color) p-0 transition-shadow duration-250`,
23
+ `${outline ? 'border-none' : 'rounded-xl shadow-sm hover:shadow-md'} w-full
24
+ bg-(--container-color) p-0 transition-shadow duration-250`,
25
25
  wrapperClass,
26
26
  )}
27
27
  transition:slide={{ duration: 250 }}
@@ -45,7 +45,11 @@
45
45
  {/if}
46
46
  </span>
47
47
 
48
- <span class="{twMerge('m-0 w-full cursor-pointer px-3 text-left font-semibold', label.class)} text-lg">
48
+ <span
49
+ class="{twMerge('m-0 w-full cursor-pointer px-3 text-left font-semibold', label.class)} text-lg {isOpen
50
+ ? 'text-blue-500 dark:text-blue-400'
51
+ : ''}"
52
+ >
49
53
  {label?.name}
50
54
  </span>
51
55
  </div>
@@ -69,10 +69,10 @@
69
69
  <button
70
70
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
71
71
  class="{twMerge(
72
- `relative m-0 inline-block w-full items-center rounded-2xl
73
- px-2 py-1 font-semibold transition duration-200 select-none
72
+ `relative m-0 inline-block w-full items-center rounded-2xl px-2
73
+ py-1 font-semibold shadow-sm transition duration-200 select-none
74
74
  ${content.icon && !content.name ? 'bg-transparent p-0' : 'bg-blue border border-(--bg-color) '}
75
- ${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer active:scale-97'} `,
75
+ ${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer hover:shadow-md active:scale-97'} `,
76
76
  componentClass,
77
77
  )} bg-(--bg-color)"
78
78
  onclick={handleClick}
@@ -140,7 +140,7 @@
140
140
  <div class="flex w-full flex-col gap-2">
141
141
  <!-- Выбор цвета -->
142
142
  <div
143
- class="hue-slider relative h-7 w-full cursor-pointer overflow-hidden rounded-full shadow-md"
143
+ class="hue-slider relative h-7 w-full cursor-pointer overflow-hidden rounded-full shadow-sm transition duration-200 hover:shadow-md"
144
144
  role="slider"
145
145
  aria-valuenow={null}
146
146
  tabindex={null}
@@ -163,7 +163,9 @@
163
163
 
164
164
  <!-- Яркость цвета -->
165
165
  <div
166
- class="brightness-slider relative h-4 w-full cursor-pointer overflow-hidden rounded-full {mode === 'hsv' ? 'shadow-md' : ''}"
166
+ class="brightness-slider relative h-4 w-full cursor-pointer overflow-hidden rounded-full {mode === 'hsv'
167
+ ? 'shadow-sm transition duration-200 hover:shadow-md'
168
+ : ''}"
167
169
  role="slider"
168
170
  aria-valuenow={null}
169
171
  tabindex={null}
@@ -184,7 +186,7 @@
184
186
 
185
187
  <!-- Яркость белого цвета -->
186
188
  <div
187
- class="white-slider relative mt-4 h-4 w-full cursor-pointer overflow-hidden rounded-full shadow-sm"
189
+ class="white-slider relative mt-4 h-4 w-full cursor-pointer overflow-hidden rounded-full shadow-sm transition duration-200 hover:shadow-md"
188
190
  role="slider"
189
191
  aria-valuenow={null}
190
192
  tabindex={null}
@@ -204,7 +206,7 @@
204
206
 
205
207
  <div class="flex w-25 flex-col items-center">
206
208
  <div
207
- class={`flex size-15 flex-col justify-center gap-1 rounded-full px-2 font-mono text-sm shadow-md select-none ${textColor()}`}
209
+ class={`flex size-15 flex-col justify-center gap-1 rounded-full px-2 font-mono text-sm shadow-sm transition duration-200 select-none ${textColor()}`}
208
210
  style={`background: rgb(${previewBaseColor().join(',')})`}
209
211
  ></div>
210
212
  <div class="w-full text-center font-semibold">{hex()}</div>
@@ -51,8 +51,8 @@
51
51
  <div class="relative">
52
52
  <button
53
53
  class="flex items-center justify-center overflow-hidden {imageSize.form === 'circle' ? 'rounded-full' : 'rounded-2xl'}
54
- bg-(--back-color) shadow-sm transition duration-250 hover:shadow-md
55
- {disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'}"
54
+ bg-(--back-color) shadow-sm transition duration-250
55
+ {disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer hover:shadow-md'}"
56
56
  style={`height: ${imageSize.height}; width: ${imageSize.width}`}
57
57
  onclick={triggerFileInput}
58
58
  {disabled}
@@ -83,14 +83,14 @@
83
83
  onchange={handleFileChange}
84
84
  />
85
85
  <div
86
- class="flex h-8.5 w-full overflow-hidden rounded-2xl font-semibold shadow-sm transition duration-250 hover:shadow-md
86
+ class="flex w-full overflow-hidden rounded-2xl font-semibold shadow-sm transition duration-250 {disabled ? '' : 'hover:shadow-md'}
87
87
  "
88
88
  >
89
- <div class="flex w-1/3 items-center justify-center bg-(--blue-color) {disabled ? 'opacity-50' : ''}">
89
+ <div class="flex w-1/3 items-center justify-center bg-(--blue-color) p-2 py-1 {disabled ? 'opacity-50' : ''}">
90
90
  {$t('constructor.props.file.select')}
91
91
  </div>
92
- <div class="flex w-2/3 items-center justify-start bg-(--back-color) px-2 {disabled ? 'opacity-50' : ''}">
93
- {fileName || $t('constructor.props.file.notselected')}
92
+ <div class="flex flex-1 items-center justify-start truncate bg-(--back-color) px-2 {disabled ? 'opacity-50' : ''}">
93
+ <p class="truncate">{fileName || $t('constructor.props.file.notselected')}</p>
94
94
  </div>
95
95
  </div>
96
96
  </label>
@@ -225,7 +225,7 @@
225
225
 
226
226
  <div class="flex w-full flex-row gap-4">
227
227
  <!-- График -->
228
- <div bind:this={container} class="h-64 grow overflow-hidden rounded-md border border-gray-200">
228
+ <div bind:this={container} class="h-64 grow overflow-hidden rounded-2xl border border-gray-200 shadow-sm">
229
229
  <canvas class="h-full w-full bg-(--back-color)" bind:this={canvas}></canvas>
230
230
  </div>
231
231
 
@@ -64,8 +64,8 @@
64
64
  <input
65
65
  bind:value
66
66
  class={twMerge(
67
- `w-full rounded-2xl border px-4 py-1 text-center transition-all duration-300 outline-none focus:border-blue-400
68
- [&::-webkit-inner-spin-button]:hidden [&::-webkit-outer-spin-button]:hidden
67
+ `w-full rounded-2xl border px-4 py-1 text-center shadow-sm transition duration-200
68
+ outline-none focus:border-blue-400 [&::-webkit-inner-spin-button]:hidden [&::-webkit-outer-spin-button]:hidden
69
69
  ${isValid ? 'border-(--border-color)' : 'border-red-400 shadow-[0_0_6px_var(--red-color)] focus:border-red-400'}
70
70
  ${disabled ? 'opacity-50' : 'hover:shadow-md'}
71
71
  ${readonly ? '' : 'hover:shadow-md'}
@@ -90,7 +90,8 @@
90
90
  <textarea
91
91
  bind:value
92
92
  class={twMerge(
93
- `h-full w-full resize-y rounded-2xl border border-(--border-color) px-2 py-1 text-center font-mono outline-none focus:border-blue-400
93
+ `h-full w-full resize-y rounded-2xl border border-(--border-color) px-2 py-1 text-center font-mono shadow-sm transition
94
+ duration-200 outline-none focus:border-blue-400
94
95
  ${isValid ? 'border-(--border-color)' : 'border-red-400 shadow-[0_0_6px_var(--red-color)]'}
95
96
  ${disabled ? 'cursor-not-allowed opacity-50' : 'hover:shadow-md'}
96
97
  ${readonly ? '' : 'hover:shadow-md'}
@@ -208,7 +208,7 @@
208
208
  style="background: color-mix(in srgb, var(--bg-color), var(--shadow-color) 10%)"
209
209
  >
210
210
  <button
211
- class="h-full rotate-270 cursor-pointer rounded-l-full px-3.5"
211
+ class="h-full cursor-pointer rounded-l-full px-3.5"
212
212
  title=""
213
213
  onclick={() => {
214
214
  if (value[0] - sensitivity <= (axes[0].minNum ?? -360)) {
@@ -221,17 +221,20 @@
221
221
  }}
222
222
  onmouseenter={(e) => (e.currentTarget.style.backgroundColor = 'color-mix(in srgb, var(--bg-color), var(--shadow-color) 30%)')}
223
223
  onmouseleave={(e) => (e.currentTarget.style.backgroundColor = 'background: color-mix(in srgb, var(--bg-color), var(--shadow-color) 10%)')}
224
- ><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
225
- ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"
226
- ><path
227
- stroke-miterlimit="10"
228
- d="M6.395 7.705A7.9 7.9 0 0 1 12 5.382a7.93 7.93 0 0 1 7.929 7.929A7.94 7.94 0 0 1 12 21.25a7.94 7.94 0 0 1-7.929-7.94"
229
- /><path stroke-linejoin="round" d="m7.12 2.75l-.95 3.858a1.33 1.33 0 0 0 .97 1.609l3.869.948" /></g
230
- ></svg
231
- ></button
224
+ >
225
+ <div class="rotate-270">
226
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
227
+ ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"
228
+ ><path
229
+ stroke-miterlimit="10"
230
+ d="M6.395 7.705A7.9 7.9 0 0 1 12 5.382a7.93 7.93 0 0 1 7.929 7.929A7.94 7.94 0 0 1 12 21.25a7.94 7.94 0 0 1-7.929-7.94"
231
+ /><path stroke-linejoin="round" d="m7.12 2.75l-.95 3.858a1.33 1.33 0 0 0 .97 1.609l3.869.948" /></g
232
+ ></svg
233
+ >
234
+ </div></button
232
235
  >
233
236
  <button
234
- class="h-full rotate-90 cursor-pointer rounded-r-full px-3.5"
237
+ class="h-full cursor-pointer rounded-r-full px-3.5"
235
238
  title=""
236
239
  onclick={() => {
237
240
  if (value[0] + sensitivity >= (axes[0].maxNum ?? 360)) {
@@ -244,14 +247,17 @@
244
247
  }}
245
248
  onmouseenter={(e) => (e.currentTarget.style.backgroundColor = 'color-mix(in srgb, var(--bg-color), var(--shadow-color) 30%)')}
246
249
  onmouseleave={(e) => (e.currentTarget.style.backgroundColor = 'vabackground: color-mix(in srgb, var(--bg-color), var(--shadow-color) 10%)')}
247
- ><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
248
- ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"
249
- ><path
250
- stroke-miterlimit="10"
251
- d="M17.605 7.705A7.9 7.9 0 0 0 12 5.382a7.93 7.93 0 0 0-7.929 7.929A7.94 7.94 0 0 0 12 21.25a7.94 7.94 0 0 0 7.929-7.94"
252
- /><path stroke-linejoin="round" d="m16.88 2.75l.95 3.858a1.33 1.33 0 0 1-.97 1.609l-3.869.948" /></g
253
- ></svg
254
- ></button
250
+ >
251
+ <div class="rotate-90">
252
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
253
+ ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"
254
+ ><path
255
+ stroke-miterlimit="10"
256
+ d="M17.605 7.705A7.9 7.9 0 0 0 12 5.382a7.93 7.93 0 0 0-7.929 7.929A7.94 7.94 0 0 0 12 21.25a7.94 7.94 0 0 0 7.929-7.94"
257
+ /><path stroke-linejoin="round" d="m16.88 2.75l.95 3.858a1.33 1.33 0 0 1-.97 1.609l-3.869.948" /></g
258
+ ></svg
259
+ >
260
+ </div></button
255
261
  >
256
262
  </div>
257
263
  {/if}
@@ -101,7 +101,7 @@
101
101
  <h5 class={twMerge(` w-full px-4 text-center`, label.class)}>{label.name}</h5>
102
102
  {/if}
103
103
  <MapLibre
104
- class="h-[calc(100%-2rem)] min-h-[200px]"
104
+ class="h-[calc(100%-2rem)] min-h-[200px] overflow-hidden rounded-2xl shadow-sm transition duration-200 hover:shadow-md"
105
105
  style={isDarkMode
106
106
  ? 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json'
107
107
  : 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json'}
@@ -69,7 +69,7 @@
69
69
  {#if type == 'vertical'}
70
70
  <div class="flex h-full flex-wrap gap-3">
71
71
  {#each innerValue as val}
72
- <div class="flex h-full w-fit min-w-16 flex-col items-center gap-2 rounded-full bg-(--bg-color) p-2">
72
+ <div class="flex h-full w-fit min-w-16 flex-col items-center gap-2 rounded-full bg-(--bg-color) p-2 shadow-sm">
73
73
  <div class="relative my-auto h-[80%] w-[70%] rounded-full bg-(--back-color)/40">
74
74
  <div class="absolute bottom-0 left-0 flex w-full rounded-full bg-(--field-color)" style="height: {progressPercent(val)}%;"></div>
75
75
  </div>
@@ -80,7 +80,7 @@
80
80
  {:else}
81
81
  <div class="flex w-full flex-col gap-2">
82
82
  {#each innerValue as val}
83
- <div class="flex h-7 w-full items-center gap-2 rounded-full bg-(--bg-color) px-2">
83
+ <div class="flex h-7 w-full items-center gap-2 rounded-full bg-(--bg-color) px-2 shadow-sm">
84
84
  <span class="m-auto font-semibold">{roundToClean(Number(numericValue(val)))}{number.units}</span>
85
85
  <div class="relative my-auto h-3.5 w-[85%] rounded-full bg-(--back-color)/40">
86
86
  <div class="absolute top-0 left-0 flex h-full rounded-full bg-(--field-color)" style="width: {progressPercent(val)}%;"></div>
@@ -99,8 +99,8 @@
99
99
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
100
100
  value={value?.value ? String(value.value) : ''}
101
101
  class={twMerge(
102
- `w-full rounded-2xl border border-(--border-color) p-1 text-center duration-250
103
- ${disabled ? 'opacity-50' : 'cursor-pointer hover:shadow-lg'}`,
102
+ `w-full rounded-2xl border border-(--border-color) p-1 text-center shadow-sm transition-shadow duration-200
103
+ ${disabled ? 'opacity-50' : 'cursor-pointer hover:shadow-md'}`,
104
104
  value?.class,
105
105
  )}
106
106
  style="background: color-mix(in srgb, var(--bg-color), var(--back-color) 70%);"
@@ -164,10 +164,10 @@
164
164
  {:else if type === 'input'}
165
165
  <input
166
166
  bind:value={searchValue}
167
- class="w-full appearance-none rounded-2xl border px-4 py-1 text-center transition-shadow
168
- outline-none hover:shadow-md focus:border-blue-400
167
+ class="w-full appearance-none rounded-2xl border px-4 py-1 text-center shadow-sm
168
+ transition-shadow duration-200 outline-none focus:border-blue-400
169
169
  [&::-webkit-inner-spin-button]:hidden [&::-webkit-outer-spin-button]:hidden
170
- {disabled ? 'cursor-not-allowed opacity-50' : 'cursor-text'} border-(--border-color)"
170
+ {disabled ? 'cursor-not-allowed opacity-50' : 'cursor-text'} border-(--border-color) hover:shadow-md"
171
171
  style="background: color-mix(in srgb, var(--bg-color), var(--back-color) 70%);"
172
172
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
173
173
  {disabled}
@@ -110,6 +110,7 @@
110
110
  [&::-webkit-slider-runnable-track]:rounded-l-full
111
111
  [&::-webkit-slider-runnable-track]:bg-(--gray-color)
112
112
  [&::-webkit-slider-runnable-track]:px-2
113
+ [&::-webkit-slider-runnable-track]:shadow-sm
113
114
  [&::-webkit-slider-thumb]:relative
114
115
  [&::-webkit-slider-thumb]:size-4
115
116
  [&::-webkit-slider-thumb]:cursor-pointer
@@ -156,6 +157,7 @@
156
157
  [&::-webkit-slider-runnable-track]:rounded-r-full
157
158
  [&::-webkit-slider-runnable-track]:bg-(--gray-color)
158
159
  [&::-webkit-slider-runnable-track]:px-2
160
+ [&::-webkit-slider-runnable-track]:shadow-sm
159
161
  [&::-webkit-slider-thumb]:relative
160
162
  [&::-webkit-slider-thumb]:size-4
161
163
  [&::-webkit-slider-thumb]:cursor-pointer
@@ -197,6 +199,7 @@
197
199
  `h-8 w-full appearance-none overflow-hidden rounded-full accent-(--back-color)
198
200
  [&::-webkit-slider-runnable-track]:rounded-full
199
201
  [&::-webkit-slider-runnable-track]:bg-(--gray-color)
202
+ [&::-webkit-slider-runnable-track]:shadow-sm
200
203
  [&::-webkit-slider-thumb]:relative
201
204
 
202
205
  [&::-webkit-slider-thumb]:ml-[-0.4rem]
@@ -74,9 +74,9 @@
74
74
  {/if}
75
75
 
76
76
  <label
77
- class="relative flex items-center justify-between rounded-full shadow-md
77
+ class="relative flex items-center justify-between rounded-full shadow-sm transition duration-200
78
78
  {checkedOptions[index] ? 'border-(--bg-color)' : 'border-(--bg-color)'}
79
- {option.disabled ? 'opacity-60' : ''}"
79
+ {option.disabled ? 'opacity-60' : 'hover:shadow-md'}"
80
80
  >
81
81
  <input
82
82
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
@@ -126,7 +126,7 @@
126
126
  disabled={localOptions[0].disabled}
127
127
  class="
128
128
  relative size-8 cursor-pointer appearance-none rounded-2xl border border-(--bg-color)
129
- bg-white transition duration-300 after:origin-bottom-left after:opacity-0
129
+ bg-white shadow-sm transition duration-200 after:origin-bottom-left after:opacity-0
130
130
  checked:border-(--bg-color)
131
131
  checked:bg-(--bg-color) checked:after:absolute checked:after:-top-px checked:after:left-[5px]
132
132
  checked:after:h-[13.5px] checked:after:w-[7.5px] checked:after:rotate-43
@@ -160,7 +160,11 @@
160
160
  <h5 class={twMerge(`w-full px-4 text-center`, label.class)}>{label.name}</h5>
161
161
  {/if}
162
162
 
163
- <div class="flex h-full flex-col overflow-hidden rounded-xl border {outline ? ' border-(--border-color)' : 'border-transparent'} ">
163
+ <div
164
+ class="flex h-full flex-col overflow-hidden rounded-xl border shadow-sm transition duration-200 hover:shadow-md {outline
165
+ ? ' border-(--border-color)'
166
+ : 'border-transparent'} "
167
+ >
164
168
  <!-- Table Header -->
165
169
  <div class="grid font-semibold" style={`grid-template-columns: ${header.map((c) => c.width || 'minmax(0, 1fr)').join(' ')};`}>
166
170
  {#each header as column, index (column)}
@@ -211,7 +215,7 @@
211
215
  {#each column.buttons as button (button)}
212
216
  <button
213
217
  class="{twMerge(`cursor-pointer rounded-full
214
- px-4 py-1 font-medium transition-shadow outline-none select-none hover:shadow-md
218
+ px-4 py-1 font-medium shadow-sm transition-shadow duration-200 outline-none select-none hover:shadow-md
215
219
  ${typeof button.class === 'function' ? button.class(row) : button.class}`)} bg-(--bg-color)"
216
220
  onclick={() => buttonClick(row, button)}
217
221
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {