@ticatec/uniface-element 0.1.21 → 0.1.22

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.
@@ -18,8 +18,8 @@
18
18
  export let showActionIcon: boolean = false;
19
19
  export let clean: () => void;
20
20
 
21
- export let hasLeadingIcon: boolean = $$slots['leading-icon'];
22
- export let hasTrailingIcon: boolean = $$slots['trailing-icon'];
21
+ export let hasLeadingIcon: boolean = true;
22
+ export let hasTrailingIcon: boolean = true;
23
23
 
24
24
  let className: string = '';
25
25
 
@@ -36,6 +36,7 @@
36
36
 
37
37
  </script>
38
38
  <CommonEditor {displayMode} {style} {value} {suffix} {prefix} {readonly} {variant} {compact} class={className}
39
+ hasLeadingIcon={$$slots['leading-icon']} hasTrailingIcon={$$slots['trailing-icon']}
39
40
  showActionIcon={removable && !readonly && !disabled && value != null} {clean}>
40
41
  <svelte:fragment slot="leading-icon">
41
42
  {#if $$slots['leading-icon']}
@@ -171,6 +171,7 @@
171
171
 
172
172
  </script>
173
173
  <CommonEditor {displayMode} {style} value={toTimeText(value)} {suffix} {prefix} {disabled} {readonly} {variant} {compact} class={className}
174
+ hasLeadingIcon={$$slots['leading-icon']} hasTrailingIcon={$$slots['trailing-icon']}
174
175
  showActionIcon={textValue!=emptyStr} clean={handleDeleteButton}>
175
176
  <svelte:fragment slot="leading-icon">
176
177
  {#if $$slots['leading-icon']}
@@ -182,5 +183,11 @@
182
183
  <input bind:this={editor} type="text" style="flex: 1 1 auto" bind:value={textValue} {disabled}
183
184
  on:keydown={handleKeyDown} on:focus={handleFocusEvent} on:blur={handleBlurEvent}
184
185
  on:mousedown={handleMouseDown}/>
185
-
186
+ <svelte:fragment slot="trailing-icon">
187
+ {#if $$slots['trailing-icon']}
188
+ <div class="editor-embed-icon">
189
+ <slot name="trailing-icon"/>
190
+ </div>
191
+ {/if}
192
+ </svelte:fragment>
186
193
  </CommonEditor>
@@ -31,6 +31,7 @@ declare const TimeEditor: $$__sveltets_2_IsomorphicComponent<{
31
31
  [evt: string]: CustomEvent<any>;
32
32
  }, {
33
33
  'leading-icon': {};
34
+ 'trailing-icon': {};
34
35
  }, {
35
36
  class: string;
36
37
  }, string>;
@@ -98,6 +98,7 @@
98
98
 
99
99
  <div bind:this={divPanel}>
100
100
  <CommonEditor {displayMode} {style} {value} {prefix} suffix={unit?.text??unit?.code} {readonly} {variant} {compact} class={className}
101
+ hasLeadingIcon={$$slots['leading-icon']}
101
102
  showActionIcon={removable && !readonly && !disabled && value != null} {clean}>
102
103
  <svelte:fragment slot="leading-icon">
103
104
  {#if $$slots['leading-icon']}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",