Comparing version 0.2.0 to 0.2.2
@@ -21,3 +21,3 @@ 'use strict'; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines > 1 && this.fontSize > this.minSize) { | ||
@@ -35,3 +35,3 @@ let minus = this.fontSize - 1; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines <= 1 && this.fontSize < this.maxSize) { | ||
@@ -603,3 +603,4 @@ let plus = this.fontSize + 1; | ||
'right', | ||
'bottom' | ||
'bottom', | ||
'top' | ||
]; | ||
@@ -606,0 +607,0 @@ if (!allowed_positions.includes(this.position)) { |
@@ -13,3 +13,3 @@ import { Host, h } from '@stencil/core'; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines > 1 && this.fontSize > this.minSize) { | ||
@@ -27,3 +27,3 @@ let minus = this.fontSize - 1; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines <= 1 && this.fontSize < this.maxSize) { | ||
@@ -30,0 +30,0 @@ let plus = this.fontSize + 1; |
@@ -15,3 +15,4 @@ import { Host, h } from '@stencil/core'; | ||
'right', | ||
'bottom' | ||
'bottom', | ||
'top' | ||
]; | ||
@@ -18,0 +19,0 @@ if (!allowed_positions.includes(this.position)) { |
@@ -17,3 +17,3 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-db1e4f67.js'; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines > 1 && this.fontSize > this.minSize) { | ||
@@ -31,3 +31,3 @@ let minus = this.fontSize - 1; | ||
let height = parseFloat(this.computedStyle.height); | ||
let howmanylines = Math.round(height / (this.fontSize * lineHeightRatio)); | ||
let howmanylines = height / (this.fontSize * lineHeightRatio); | ||
if (howmanylines <= 1 && this.fontSize < this.maxSize) { | ||
@@ -599,3 +599,4 @@ let plus = this.fontSize + 1; | ||
'right', | ||
'bottom' | ||
'bottom', | ||
'top' | ||
]; | ||
@@ -602,0 +603,0 @@ if (!allowed_positions.includes(this.position)) { |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as i}from"./p-29d23de6.js";export{s as setNonce}from"./p-29d23de6.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-d5e85c35",[[1,"sui-flextext",{minSize:[1026,"min-size"],maxSize:[1026,"max-size"]}],[1,"sui-nav",{autoHide:[2,"auto-hide"]}],[1,"sui-overlay",{position:[1],transitionTime:[1,"transition-time"],close:[64],open:[64]}],[1,"sui-textarea",{value:[1025],disabled:[4],el:[16],textValue:[32]}],[1,"sui-tooltip",{maxWidth:[32],classNames:[32],tipBackgroundColor:[32]},[[1,"mouseenter","setPosition"]]]]]],e))); | ||
import{p as e,b as i}from"./p-29d23de6.js";export{s as setNonce}from"./p-29d23de6.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-244eab1b",[[1,"sui-flextext",{minSize:[1026,"min-size"],maxSize:[1026,"max-size"]}],[1,"sui-nav",{autoHide:[2,"auto-hide"]}],[1,"sui-overlay",{position:[1],transitionTime:[1,"transition-time"],close:[64],open:[64]}],[1,"sui-textarea",{value:[1025],disabled:[4],el:[16],textValue:[32]}],[1,"sui-tooltip",{maxWidth:[32],classNames:[32],tipBackgroundColor:[32]},[[1,"mouseenter","setPosition"]]]]]],e))); |
{ | ||
"name": "skateui", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "Vanilla HTML compatible custom UI components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -16,3 +16,27 @@ # Skate UI | ||
## Components: | ||
- sui-nav: Navbar that hides when scrolling down, and shows when scrolling up. | ||
Attributes: | ||
- auto-hide: "true" | "false" | Number(Higher number means it will hide slower) | ||
- sui-flextext: Text that auto scales. | ||
Attributes: | ||
- min-size: number | ||
- max-size: number | ||
- sui-tooltip: Tooltip that shows when hovering over an element. | ||
- sui-overlay: Fully customizable overlay that shows when clicked. | ||
Attributes: | ||
- position: "top" | "bottom" | "left" | "right" | "center"(default) | ||
Properties: | ||
- open(): Opens the overlay. | ||
- close(): Closes the overlay. | ||
- sui-textarea: Textarea that auto resizes. | ||
## Example | ||
@@ -33,2 +57,19 @@ | ||
<br><br> | ||
<sui-flextext>Hello my name is Baksa</sui-flextext> | ||
<br><br> | ||
<sui-tooltip> | ||
<div slot="tool" | ||
style="font-size: 1.2em; font-weight: bold; background-color: red;color:white;padding: .25em;cursor: pointer;"> | ||
Hover me to say HI</div> | ||
<div slot="tip" style="background-color: black;color:white;padding:.5em;"> | ||
Hello | ||
</div> | ||
</sui-tooltip> | ||
<br><br> | ||
<button onclick='overlay.open()'>Click me</button> | ||
@@ -35,0 +76,0 @@ <sui-overlay id="overlay" onclick="this.close()"> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
459602
8829
83
2