not-bulma 1.2.39 → 1.2.40

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": "not-bulma",
3
- "version": "1.2.39",
3
+ "version": "1.2.40",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -8,6 +8,7 @@
8
8
  export let showIcon = "eye";
9
9
  export let hideIcon = "eye-slash";
10
10
  export let maxLength = 20;
11
+ export let shadowClass = "has-background-primary-90";
11
12
  export let tooltip = true;
12
13
  export let tooltipTTL = 2000;
13
14
  export let tooltipText = "Скопировано в буфер";
@@ -42,24 +43,25 @@
42
43
  $: tooltipActive = tooltip && contentCopied;
43
44
  </script>
44
45
 
45
- <p>
46
+ <span
47
+ class={(hidden ? "is-censored " + shadowClass : "") +
48
+ " is-vertical-middle "}
49
+ style={`display:inline-block; width: ${maxLength}rem; height: var(--bulma-size-medium); overflow-x:hidden;`}
50
+ >{hidden ? "" : value}</span
51
+ >
52
+ {#if copiable}
46
53
  <span
47
- class={hidden ? "is-censored has-background-primary-90" : ""}
48
- style={`display:inline-block; width: ${maxLength}rem; height: var(--bulma-size-normal);overflow-x:hidden;`}
49
- >{hidden ? "" : value}</span
54
+ bind:this={tooltipTarget}
55
+ on:click={copyContent}
56
+ class={"icon is-small is-right is-clickable " +
57
+ (tooltipActive ? ` ${tooltipClass} ` : "") +
58
+ " is-vertical-middle"}><i class="fas fa-{copyIcon}" /></span
50
59
  >
51
- {#if copiable}
52
- <span
53
- bind:this={tooltipTarget}
54
- on:click={copyContent}
55
- class={"icon is-small is-right is-clickable " +
56
- (tooltipActive ? ` ${tooltipClass} ` : "")}
57
- ><i class="fas fa-{copyIcon}" /></span
58
- >
59
- {/if}
60
- {#if showable}
61
- <span class="icon is-small is-right is-clickable" on:click={toggleView}
62
- ><i class="fas fa-{hidden ? showIcon : hideIcon}" /></span
63
- >
64
- {/if}
65
- </p>
60
+ {/if}
61
+ {#if showable}
62
+ <span
63
+ class="icon is-small is-right is-clickable is-vertical-middle"
64
+ on:click={toggleView}
65
+ ><i class="fas fa-{hidden ? showIcon : hideIcon}" /></span
66
+ >
67
+ {/if}
@@ -12,3 +12,6 @@
12
12
  display: inline-block;
13
13
  border-radius: 0.3rem;
14
14
  }
15
+ .is-vertical-middle {
16
+ vertical-align: middle;
17
+ }