@solid-primitives/props
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -46,8 +46,8 @@ 'use strict'; | ||
const _tmpl$ = web.template(`<label><input type="checkbox"> <span></span> </label>`, 5), | ||
_tmpl$2 = web.template(`<label><span></span> <input type="number"> </label>`, 5), | ||
_tmpl$3 = web.template(`<label><span></span> <input type="text"> </label>`, 5), | ||
_tmpl$4 = web.template(`<label><span></span> <select></select> </label>`, 6), | ||
_tmpl$5 = web.template(`<option>"options missing"</option>`, 2), | ||
_tmpl$6 = web.template(`<option></option>`, 2); | ||
const _tmpl$ = /*#__PURE__*/web.template(`<label><input type="checkbox"> <span></span> </label>`, 5), | ||
_tmpl$2 = /*#__PURE__*/web.template(`<label><span></span> <input type="number"> </label>`, 5), | ||
_tmpl$3 = /*#__PURE__*/web.template(`<label><span></span> <input type="text"> </label>`, 5), | ||
_tmpl$4 = /*#__PURE__*/web.template(`<label><span></span> <select></select> </label>`, 6), | ||
_tmpl$5 = /*#__PURE__*/web.template(`<option>"options missing"</option>`, 2), | ||
_tmpl$6 = /*#__PURE__*/web.template(`<option></option>`, 2); | ||
const BoolProp = props => (() => { | ||
@@ -63,13 +63,5 @@ const _el$ = _tmpl$.cloneNode(true), | ||
web.effect(_p$ => { | ||
const _v$ = props.name, | ||
_v$2 = props.value(); | ||
web.effect(() => web.setAttribute(_el$2, "name", props.name)); | ||
_v$ !== _p$._v$ && web.setAttribute(_el$2, "name", _p$._v$ = _v$); | ||
_v$2 !== _p$._v$2 && (_el$2.checked = _p$._v$2 = _v$2); | ||
return _p$; | ||
}, { | ||
_v$: undefined, | ||
_v$2: undefined | ||
}); | ||
web.effect(() => _el$2.checked = props.value()); | ||
@@ -89,19 +81,17 @@ return _el$; | ||
web.effect(_p$ => { | ||
const _v$3 = props.name, | ||
_v$4 = props.min, | ||
_v$5 = props.max, | ||
_v$6 = props.value(); | ||
_v$3 !== _p$._v$3 && web.setAttribute(_el$8, "name", _p$._v$3 = _v$3); | ||
_v$4 !== _p$._v$4 && web.setAttribute(_el$8, "min", _p$._v$4 = _v$4); | ||
_v$5 !== _p$._v$5 && web.setAttribute(_el$8, "max", _p$._v$5 = _v$5); | ||
_v$6 !== _p$._v$6 && (_el$8.value = _p$._v$6 = _v$6); | ||
const _v$ = props.name, | ||
_v$2 = props.min, | ||
_v$3 = props.max; | ||
_v$ !== _p$._v$ && web.setAttribute(_el$8, "name", _p$._v$ = _v$); | ||
_v$2 !== _p$._v$2 && web.setAttribute(_el$8, "min", _p$._v$2 = _v$2); | ||
_v$3 !== _p$._v$3 && web.setAttribute(_el$8, "max", _p$._v$3 = _v$3); | ||
return _p$; | ||
}, { | ||
_v$3: undefined, | ||
_v$4: undefined, | ||
_v$5: undefined, | ||
_v$6: undefined | ||
_v$: undefined, | ||
_v$2: undefined, | ||
_v$3: undefined | ||
}); | ||
web.effect(() => _el$8.value = props.value()); | ||
return _el$5; | ||
@@ -119,13 +109,5 @@ })(); | ||
web.effect(_p$ => { | ||
const _v$7 = props.name, | ||
_v$8 = props.value(); | ||
web.effect(() => web.setAttribute(_el$12, "name", props.name)); | ||
_v$7 !== _p$._v$7 && web.setAttribute(_el$12, "name", _p$._v$7 = _v$7); | ||
_v$8 !== _p$._v$8 && (_el$12.value = _p$._v$8 = _v$8); | ||
return _p$; | ||
}, { | ||
_v$7: undefined, | ||
_v$8: undefined | ||
}); | ||
web.effect(() => _el$12.value = props.value()); | ||
@@ -185,13 +167,5 @@ return _el$9; | ||
web.effect(_p$ => { | ||
const _v$9 = props.name, | ||
_v$10 = initialValue.toString(); | ||
web.effect(() => web.setAttribute(_el$16, "name", props.name)); | ||
_v$9 !== _p$._v$9 && web.setAttribute(_el$16, "name", _p$._v$9 = _v$9); | ||
_v$10 !== _p$._v$10 && (_el$16.value = _p$._v$10 = _v$10); | ||
return _p$; | ||
}, { | ||
_v$9: undefined, | ||
_v$10: undefined | ||
}); | ||
web.effect(() => _el$16.value = initialValue.toString()); | ||
@@ -198,0 +172,0 @@ return _el$13; |
import { $PROXY, createMemo, For, createSignal, mergeProps } from 'solid-js'; | ||
import { template, insert, effect, setAttribute, createComponent } from 'solid-js/web'; | ||
import { insert, effect, setAttribute, createComponent, template } from 'solid-js/web'; | ||
import { chain } from '@solid-primitives/utils'; | ||
@@ -42,8 +42,8 @@ | ||
const _tmpl$ = template(`<label><input type="checkbox"> <span></span> </label>`, 5), | ||
_tmpl$2 = template(`<label><span></span> <input type="number"> </label>`, 5), | ||
_tmpl$3 = template(`<label><span></span> <input type="text"> </label>`, 5), | ||
_tmpl$4 = template(`<label><span></span> <select></select> </label>`, 6), | ||
_tmpl$5 = template(`<option>"options missing"</option>`, 2), | ||
_tmpl$6 = template(`<option></option>`, 2); | ||
const _tmpl$ = /*#__PURE__*/template(`<label><input type="checkbox"> <span></span> </label>`, 5), | ||
_tmpl$2 = /*#__PURE__*/template(`<label><span></span> <input type="number"> </label>`, 5), | ||
_tmpl$3 = /*#__PURE__*/template(`<label><span></span> <input type="text"> </label>`, 5), | ||
_tmpl$4 = /*#__PURE__*/template(`<label><span></span> <select></select> </label>`, 6), | ||
_tmpl$5 = /*#__PURE__*/template(`<option>"options missing"</option>`, 2), | ||
_tmpl$6 = /*#__PURE__*/template(`<option></option>`, 2); | ||
const BoolProp = props => (() => { | ||
@@ -59,13 +59,5 @@ const _el$ = _tmpl$.cloneNode(true), | ||
effect(_p$ => { | ||
const _v$ = props.name, | ||
_v$2 = props.value(); | ||
effect(() => setAttribute(_el$2, "name", props.name)); | ||
_v$ !== _p$._v$ && setAttribute(_el$2, "name", _p$._v$ = _v$); | ||
_v$2 !== _p$._v$2 && (_el$2.checked = _p$._v$2 = _v$2); | ||
return _p$; | ||
}, { | ||
_v$: undefined, | ||
_v$2: undefined | ||
}); | ||
effect(() => _el$2.checked = props.value()); | ||
@@ -85,19 +77,17 @@ return _el$; | ||
effect(_p$ => { | ||
const _v$3 = props.name, | ||
_v$4 = props.min, | ||
_v$5 = props.max, | ||
_v$6 = props.value(); | ||
_v$3 !== _p$._v$3 && setAttribute(_el$8, "name", _p$._v$3 = _v$3); | ||
_v$4 !== _p$._v$4 && setAttribute(_el$8, "min", _p$._v$4 = _v$4); | ||
_v$5 !== _p$._v$5 && setAttribute(_el$8, "max", _p$._v$5 = _v$5); | ||
_v$6 !== _p$._v$6 && (_el$8.value = _p$._v$6 = _v$6); | ||
const _v$ = props.name, | ||
_v$2 = props.min, | ||
_v$3 = props.max; | ||
_v$ !== _p$._v$ && setAttribute(_el$8, "name", _p$._v$ = _v$); | ||
_v$2 !== _p$._v$2 && setAttribute(_el$8, "min", _p$._v$2 = _v$2); | ||
_v$3 !== _p$._v$3 && setAttribute(_el$8, "max", _p$._v$3 = _v$3); | ||
return _p$; | ||
}, { | ||
_v$3: undefined, | ||
_v$4: undefined, | ||
_v$5: undefined, | ||
_v$6: undefined | ||
_v$: undefined, | ||
_v$2: undefined, | ||
_v$3: undefined | ||
}); | ||
effect(() => _el$8.value = props.value()); | ||
return _el$5; | ||
@@ -115,13 +105,5 @@ })(); | ||
effect(_p$ => { | ||
const _v$7 = props.name, | ||
_v$8 = props.value(); | ||
effect(() => setAttribute(_el$12, "name", props.name)); | ||
_v$7 !== _p$._v$7 && setAttribute(_el$12, "name", _p$._v$7 = _v$7); | ||
_v$8 !== _p$._v$8 && (_el$12.value = _p$._v$8 = _v$8); | ||
return _p$; | ||
}, { | ||
_v$7: undefined, | ||
_v$8: undefined | ||
}); | ||
effect(() => _el$12.value = props.value()); | ||
@@ -181,13 +163,5 @@ return _el$9; | ||
effect(_p$ => { | ||
const _v$9 = props.name, | ||
_v$10 = initialValue.toString(); | ||
effect(() => setAttribute(_el$16, "name", props.name)); | ||
_v$9 !== _p$._v$9 && setAttribute(_el$16, "name", _p$._v$9 = _v$9); | ||
_v$10 !== _p$._v$10 && (_el$16.value = _p$._v$10 = _v$10); | ||
return _p$; | ||
}, { | ||
_v$9: undefined, | ||
_v$10: undefined | ||
}); | ||
effect(() => _el$16.value = initialValue.toString()); | ||
@@ -194,0 +168,0 @@ return _el$13; |
{ | ||
"name": "@solid-primitives/props", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Library of primitives focused around component props.", | ||
@@ -53,11 +53,12 @@ "author": "Alex Lohr <alex.lohr@logmein.com>", | ||
"dependencies": { | ||
"@solid-primitives/utils": "^3.0.0" | ||
"@solid-primitives/utils": "^3.0.2" | ||
}, | ||
"devDependencies": { | ||
"jsdom": "^19.0.0", | ||
"babel-preset-solid": "^1.4.8", | ||
"jsdom": "^20.0.0", | ||
"nanospy": "^0.5.0", | ||
"prettier": "^2.7.1", | ||
"rollup": "^2.77.0", | ||
"rollup": "^2.78.0", | ||
"rollup-preset-solid": "^1.4.0", | ||
"solid-js": "^1.4.8", | ||
"solid-js": "^1.5.1", | ||
"solid-register": "^0.2.5", | ||
@@ -68,3 +69,3 @@ "tslib": "^2.4.0", | ||
"uvu": "^0.5.6", | ||
"vite": "^3.0.2", | ||
"vite": "^3.0.7", | ||
"vite-plugin-solid": "^2.3.0" | ||
@@ -71,0 +72,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
127723
14
1358