New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

skateui

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skateui - npm Package Compare versions

Comparing version 0.1.122 to 0.1.123

dist/skateui/p-352ba1fd.entry.js

2

dist/cjs/sui-button_8.cjs.entry.js

@@ -626,3 +626,3 @@ 'use strict';

radios[i].parentElement.removeAttribute('data-checked'); // remove checked attribute from it's host
this.host.removeAttribute('checked');
radios[i].parentElement.removeAttribute('checked');
}

@@ -629,0 +629,0 @@ }

@@ -130,3 +130,3 @@ import { Host, h } from '@stencil/core'; //Method,

radios[i].parentElement.removeAttribute('data-checked'); // remove checked attribute from it's host
this.host.removeAttribute('checked');
radios[i].parentElement.removeAttribute('checked');
}

@@ -288,3 +288,3 @@ }

},
"defaultValue": "(() => {\n // add input element manually because shadow dom input is not recognized by forms\n let inputType = this.host.getAttribute('type'); // always use getAttribute() for proper casing\n\n let value = this.value !== null && this.value !== undefined ? this.value.toString() : null;\n if (!inputType || !this.availableTypes.includes(inputType)) {\n this.host.setAttribute('type', 'text');\n inputType = 'text';\n }\n\n this.isButton = inputType === 'reset' || inputType === 'submit';\n this.isChecker = inputType === 'checkbox' || inputType === 'radio';\n\n // if class has reusable previous element\n const previousInput = this.host.getElementsByTagName('input')?.[0];\n if (previousInput && previousInput.hasAttribute('slot')) {\n // if element already exists, return\n // element can already exist when working on hot reloads\n\n // setup new slot name\n previousInput.setAttribute('slot', this.slotName);\n\n // button input use additional span to display text\n const previousSpan = this.host.getElementsByTagName('span')?.[0];\n if (previousSpan) {\n if (previousSpan.hasAttribute('slot') && previousSpan.getAttribute('slot') === 'value' && this.isButton) {\n previousSpan.innerHTML = value || (inputType === 'submit' ? 'Submit' : 'Reset');\n }\n else {\n previousSpan.remove();\n }\n }\n return previousInput;\n }\n\n // create new element\n const input = document.createElement('input');\n if (value) {\n input.setAttribute('value', value);\n }\n\n // setup new slot name\n // slot name is to prevent users adding custom elements\n input.setAttribute('slot', this.slotName);\n\n if (!this.availableTypes.includes(inputType)) {\n // type not available (yet)\n this.host.prepend(input);\n return input;\n }\n\n // add eventlistener manually if type is checkbox | radio | reset | submit\n if (this.isButton) {\n // hidden\n input.setAttribute('hidden', '');\n\n // tab index is on host\n if (!this.host.hasAttribute('disabled')) {\n this.host.setAttribute('tabindex', '0');\n }\n\n this.host.addEventListener('click', e => {\n e.stopPropagation();\n input.click();\n });\n\n // add button text\n let span = document.createElement('span');\n span.innerHTML = value || (inputType === 'submit' ? 'Submit' : 'Reset');\n span.setAttribute('slot', 'value');\n this.host.prepend(span);\n }\n\n else if (this.isChecker) {\n // hidden\n input.setAttribute('hidden', '');\n\n if (this.checked || typeof this.checked === 'string') {\n input.setAttribute('checked', '');\n }\n\n if (input.checked) {\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n\n // tab index is on host\n if (!this.host.hasAttribute('disabled')) {\n this.host.setAttribute('tabindex', '0');\n }\n\n this.host.addEventListener('click', e => {\n if (this.closestLabel && e.isTrusted) {\n e.stopPropagation();\n }\n else {\n input.click();\n }\n });\n\n input.addEventListener('change', () => {\n // keep track of checked, update dom\n if (inputType === 'checkbox') {\n if (input.checked) {\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n else {\n this.host.removeAttribute('data-checked');\n this.host.removeAttribute('checked');\n }\n }\n\n if (inputType === 'radio') {\n // triggers only on checked, since radio button can't uncheck from user input\n let radios = document.getElementsByName(input.name);\n for (let i = 0; i < radios.length; i++) {\n if (\n (radios[i] instanceof HTMLInputElement) &&\n radios[i].getAttribute('type') === 'radio' &&\n radios[i] !== input\n ) {\n radios[i].parentElement.removeAttribute('data-checked'); // remove checked attribute from it's host\n this.host.removeAttribute('checked');\n }\n }\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n });\n }\n\n else {\n // tab index is on input element\n for (const [key, value] of Object.entries({\n // set important styles\n // these value should not be editable\n 'box-sizing': 'border-box',\n 'display': 'block',\n 'font-size': 'inherit',\n 'line-height': '1.2'\n })) {\n input.style.setProperty(key, value, 'important');\n }\n }\n\n this.host.prepend(input);\n return input;\n })()"
"defaultValue": "(() => {\n // add input element manually because shadow dom input is not recognized by forms\n let inputType = this.host.getAttribute('type'); // always use getAttribute() for proper casing\n\n let value = this.value !== null && this.value !== undefined ? this.value.toString() : null;\n if (!inputType || !this.availableTypes.includes(inputType)) {\n this.host.setAttribute('type', 'text');\n inputType = 'text';\n }\n\n this.isButton = inputType === 'reset' || inputType === 'submit';\n this.isChecker = inputType === 'checkbox' || inputType === 'radio';\n\n // if class has reusable previous element\n const previousInput = this.host.getElementsByTagName('input')?.[0];\n if (previousInput && previousInput.hasAttribute('slot')) {\n // if element already exists, return\n // element can already exist when working on hot reloads\n\n // setup new slot name\n previousInput.setAttribute('slot', this.slotName);\n\n // button input use additional span to display text\n const previousSpan = this.host.getElementsByTagName('span')?.[0];\n if (previousSpan) {\n if (previousSpan.hasAttribute('slot') && previousSpan.getAttribute('slot') === 'value' && this.isButton) {\n previousSpan.innerHTML = value || (inputType === 'submit' ? 'Submit' : 'Reset');\n }\n else {\n previousSpan.remove();\n }\n }\n return previousInput;\n }\n\n // create new element\n const input = document.createElement('input');\n if (value) {\n input.setAttribute('value', value);\n }\n\n // setup new slot name\n // slot name is to prevent users adding custom elements\n input.setAttribute('slot', this.slotName);\n\n if (!this.availableTypes.includes(inputType)) {\n // type not available (yet)\n this.host.prepend(input);\n return input;\n }\n\n // add eventlistener manually if type is checkbox | radio | reset | submit\n if (this.isButton) {\n // hidden\n input.setAttribute('hidden', '');\n\n // tab index is on host\n if (!this.host.hasAttribute('disabled')) {\n this.host.setAttribute('tabindex', '0');\n }\n\n this.host.addEventListener('click', e => {\n e.stopPropagation();\n input.click();\n });\n\n // add button text\n let span = document.createElement('span');\n span.innerHTML = value || (inputType === 'submit' ? 'Submit' : 'Reset');\n span.setAttribute('slot', 'value');\n this.host.prepend(span);\n }\n\n else if (this.isChecker) {\n // hidden\n input.setAttribute('hidden', '');\n\n if (this.checked || typeof this.checked === 'string') {\n input.setAttribute('checked', '');\n }\n\n if (input.checked) {\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n\n // tab index is on host\n if (!this.host.hasAttribute('disabled')) {\n this.host.setAttribute('tabindex', '0');\n }\n\n this.host.addEventListener('click', e => {\n if (this.closestLabel && e.isTrusted) {\n e.stopPropagation();\n }\n else {\n input.click();\n }\n });\n\n input.addEventListener('change', () => {\n // keep track of checked, update dom\n if (inputType === 'checkbox') {\n if (input.checked) {\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n else {\n this.host.removeAttribute('data-checked');\n this.host.removeAttribute('checked');\n }\n }\n\n if (inputType === 'radio') {\n // triggers only on checked, since radio button can't uncheck from user input\n let radios = document.getElementsByName(input.name);\n for (let i = 0; i < radios.length; i++) {\n if (\n (radios[i] instanceof HTMLInputElement) &&\n radios[i].getAttribute('type') === 'radio' &&\n radios[i] !== input\n ) {\n radios[i].parentElement.removeAttribute('data-checked'); // remove checked attribute from it's host\n radios[i].parentElement.removeAttribute('checked');\n }\n }\n this.host.setAttribute('data-checked', '');\n this.host.setAttribute('checked', '');\n }\n });\n }\n\n else {\n // tab index is on input element\n for (const [key, value] of Object.entries({\n // set important styles\n // these value should not be editable\n 'box-sizing': 'border-box',\n 'display': 'block',\n 'font-size': 'inherit',\n 'line-height': '1.2'\n })) {\n input.style.setProperty(key, value, 'important');\n }\n }\n\n this.host.prepend(input);\n return input;\n })()"
}

@@ -291,0 +291,0 @@ };

@@ -622,3 +622,3 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-d4102470.js';

radios[i].parentElement.removeAttribute('data-checked'); // remove checked attribute from it's host
this.host.removeAttribute('checked');
radios[i].parentElement.removeAttribute('checked');
}

@@ -625,0 +625,0 @@ }

@@ -1,1 +0,1 @@

import{p as e,b as i}from"./p-453d08b3.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-50fbada7",[[1,"sui-button",null,[[0,"click","clickEventHandler"],[0,"keyup","keyEventHandler"]]],[1,"sui-flextext",{minSize:[1026,"min-size"],maxSize:[1026,"max-size"]}],[1,"sui-input",{value:[1032],checked:[1032],el:[16]}],[1,"sui-nav",{autoHide:[2,"auto-hide"]}],[1,"sui-overlay",{position:[1],transitionTime:[1,"transition-time"],close:[64],open:[64]}],[1,"sui-select",{value:[8],el:[16],leftPadding:[32],rightPadding:[32],topPadding:[32],valueDisplay:[32]}],[1,"sui-textarea",{value:[1025],el:[16],reflect:[32]}],[1,"sui-tooltip",{classNames:[32],tipBackgroundColor:[32]},[[1,"mouseenter","setPosition"]]]]]],e)));
import{p as e,b as i}from"./p-453d08b3.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>i([["p-352ba1fd",[[1,"sui-button",null,[[0,"click","clickEventHandler"],[0,"keyup","keyEventHandler"]]],[1,"sui-flextext",{minSize:[1026,"min-size"],maxSize:[1026,"max-size"]}],[1,"sui-input",{value:[1032],checked:[1032],el:[16]}],[1,"sui-nav",{autoHide:[2,"auto-hide"]}],[1,"sui-overlay",{position:[1],transitionTime:[1,"transition-time"],close:[64],open:[64]}],[1,"sui-select",{value:[8],el:[16],leftPadding:[32],rightPadding:[32],topPadding:[32],valueDisplay:[32]}],[1,"sui-textarea",{value:[1025],el:[16],reflect:[32]}],[1,"sui-tooltip",{classNames:[32],tipBackgroundColor:[32]},[[1,"mouseenter","setPosition"]]]]]],e)));
{
"name": "skateui",
"version": "0.1.122",
"version": "0.1.123",
"description": "Stencil Component Starter",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc