poe-svelte-ui-lib 1.19.0 → 1.20.0

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.
@@ -6,6 +6,7 @@
6
6
  let {
7
7
  id = crypto.randomUUID(),
8
8
  wrapperClass = "",
9
+ componentClass = "",
9
10
  label = { name: "", class: "" },
10
11
  type = "file",
11
12
  accept = "*/*",
@@ -93,8 +94,8 @@
93
94
  <div class="flex shrink-0 items-center justify-center bg-(--accent-color) px-3 font-semibold whitespace-nowrap text-(--on-accent)">
94
95
  {$T("constructor.props.file.select")}
95
96
  </div>
96
- <div class="flex min-w-0 flex-1 items-center justify-start truncate bg-(--field-color) px-3 text-(--font-color)">
97
- <p class="truncate">{fileName || $T("constructor.props.file.notselected")}</p>
97
+ <div class={twMerge("flex min-w-0 flex-1 items-center justify-start truncate bg-(--field-color) px-3 text-(--font-color)", componentClass)}>
98
+ <p class="w-full truncate">{fileName || $T("constructor.props.file.notselected")}</p>
98
99
  </div>
99
100
  </div>
100
101
  </label>
@@ -46,6 +46,7 @@
46
46
  let {
47
47
  id = crypto.randomUUID(),
48
48
  wrapperClass = "",
49
+ componentClass = "",
49
50
  disabled = false,
50
51
  label = { name: "", class: "" },
51
52
  multiSelect = false,
@@ -156,7 +157,7 @@
156
157
  aria-expanded={isDropdownOpen}
157
158
  {disabled}
158
159
  >
159
- <span class="min-w-0 truncate {value?.name ? '' : 'text-(--faint-color)'}">{value?.name || $T("common.select_tag")}</span>
160
+ <span class="min-w-0 flex-1 truncate {value?.name ? '' : 'text-(--faint-color)'} {componentClass}">{value?.name || $T("common.select_tag")}</span>
160
161
  <svg
161
162
  class="size-3.5 shrink-0 text-(--faint-color) transition-transform duration-150"
162
163
  style="transform: rotate({isDropdownOpen ? 180 : 0}deg)"
@@ -245,9 +246,11 @@
245
246
  {:else if type === "input"}
246
247
  <input
247
248
  bind:value={searchValue}
248
- class="{fieldBase} {disabled
249
- ? 'cursor-not-allowed border-(--hairline-color) bg-(--container-color) text-(--faint-color)'
250
- : 'cursor-text hover:border-(--faint-color)'}"
249
+ class={twMerge(
250
+ fieldBase,
251
+ disabled ? "cursor-not-allowed border-(--hairline-color) bg-(--container-color) text-(--faint-color)" : "cursor-text hover:border-(--faint-color)",
252
+ componentClass,
253
+ )}
251
254
  id={`${id}-${crypto.randomUUID().slice(0, 6)}`}
252
255
  {disabled}
253
256
  oninput={handleSearch}
package/dist/types.d.ts CHANGED
@@ -121,6 +121,7 @@ export interface IDividerProps {
121
121
  export interface IFileAttachProps {
122
122
  id?: string;
123
123
  wrapperClass?: string;
124
+ componentClass?: string;
124
125
  label?: {
125
126
  name?: string;
126
127
  class?: string;
@@ -269,6 +270,7 @@ export interface IProgressBarProps {
269
270
  export interface ISelectProps<T = unknown> {
270
271
  id?: string;
271
272
  wrapperClass?: string;
273
+ componentClass?: string;
272
274
  disabled?: boolean;
273
275
  label?: {
274
276
  name?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {