@poirazis/supercomponents-shared 1.2.19 → 1.2.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poirazis/supercomponents-shared",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "description": "Shared Svelte components library",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.11",
@@ -75,6 +75,7 @@
75
75
 
76
76
  <!-- svelte-ignore a11y_click_events_have_key_events -->
77
77
  <!-- svelte-ignore a11y_no_static_element_interactions -->
78
+ <!-- svelte-ignore event_directive_deprecated -->
78
79
  <span
79
80
  class="textbox value copyable"
80
81
  class:copied={justCopied}
@@ -83,32 +84,20 @@
83
84
  role="button"
84
85
  tabindex={disabled ? -1 : 0}
85
86
  title={justCopied ? "" : (title ?? (stringValue ? copyLabel : ""))}
86
- onclick={copyToClipboard}
87
- onkeydown={handleKeydown}
87
+ on:click={copyToClipboard}
88
+ on:keydown={handleKeydown}
88
89
  >
89
90
  <span class="textbox-text" class:wrap>
90
91
  {displayValue}
91
92
  </span>
92
93
 
93
- {#if !justCopied && stringValue}
94
- <span class="copy-icon">
95
- <svg
96
- xmlns="http://www.w3.org/2000/svg"
97
- width="13"
98
- height="13"
99
- viewBox="0 0 24 24"
100
- fill="none"
101
- stroke="currentColor"
102
- stroke-width="2.25"
103
- stroke-linecap="round"
104
- stroke-linejoin="round"
105
- >
106
- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
107
- <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
108
- ></path>
109
- </svg>
110
- </span>
111
- {/if}
94
+ {#key justCopied}
95
+ {#if justCopied}
96
+ <i class="ph ph-check copy-icon" aria-hidden="true"></i>
97
+ {:else}
98
+ <i class="ph ph-copy copy-icon" aria-hidden="true"></i>
99
+ {/if}
100
+ {/key}
112
101
  </span>
113
102
 
114
103
  <style>
@@ -167,6 +156,10 @@
167
156
  pointer-events: none;
168
157
  }
169
158
 
159
+ .copy-icon {
160
+ font-size: 16px;
161
+ }
162
+
170
163
  .textbox.value .copy-icon {
171
164
  opacity: 0;
172
165
  transition: opacity 0.15s ease;