@pathscale/ui 0.0.64 → 0.0.65
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/dist/index.js +20 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8801,17 +8801,24 @@ const Rating = Object.assign(Rating_Rating, {
|
|
|
8801
8801
|
Item: rating_RatingItem,
|
|
8802
8802
|
Hidden: rating_RatingHidden
|
|
8803
8803
|
});
|
|
8804
|
-
var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select>");
|
|
8804
|
+
var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select><option value disabled hidden>");
|
|
8805
8805
|
const Select = (props)=>{
|
|
8806
|
-
const
|
|
8806
|
+
const merged = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.mergeProps)({
|
|
8807
|
+
value: "",
|
|
8808
|
+
placeholder: "Please, select an option"
|
|
8809
|
+
}, props);
|
|
8810
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(merged, [
|
|
8807
8811
|
"color",
|
|
8808
8812
|
"size",
|
|
8809
8813
|
"dataTheme",
|
|
8810
8814
|
"class",
|
|
8811
8815
|
"className",
|
|
8812
|
-
"style"
|
|
8816
|
+
"style",
|
|
8817
|
+
"placeholder",
|
|
8818
|
+
"value",
|
|
8819
|
+
"children"
|
|
8813
8820
|
]);
|
|
8814
|
-
const classes = ()=>twMerge("select", local.class, local.className, clsx({
|
|
8821
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("select", local.class, local.className, clsx({
|
|
8815
8822
|
"select-xl": "xl" === local.size,
|
|
8816
8823
|
"select-lg": "lg" === local.size,
|
|
8817
8824
|
"select-md": "md" === local.size,
|
|
@@ -8825,9 +8832,10 @@ const Select = (props)=>{
|
|
|
8825
8832
|
"select-success": "success" === local.color,
|
|
8826
8833
|
"select-warning": "warning" === local.color,
|
|
8827
8834
|
"select-error": "error" === local.color
|
|
8828
|
-
}));
|
|
8835
|
+
})));
|
|
8836
|
+
const hasValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>void 0 !== local.value && "" !== local.value);
|
|
8829
8837
|
return (()=>{
|
|
8830
|
-
var _el$ = Select_tmpl$();
|
|
8838
|
+
var _el$ = Select_tmpl$(), _el$2 = _el$.firstChild;
|
|
8831
8839
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
8832
8840
|
get ["data-theme"] () {
|
|
8833
8841
|
return local.dataTheme;
|
|
@@ -8837,9 +8845,14 @@ const Select = (props)=>{
|
|
|
8837
8845
|
},
|
|
8838
8846
|
get style () {
|
|
8839
8847
|
return local.style;
|
|
8848
|
+
},
|
|
8849
|
+
get value () {
|
|
8850
|
+
return local.value;
|
|
8840
8851
|
}
|
|
8841
8852
|
}), false, true);
|
|
8842
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el
|
|
8853
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.placeholder);
|
|
8854
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children, null);
|
|
8855
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$2.selected = !hasValue());
|
|
8843
8856
|
return _el$;
|
|
8844
8857
|
})();
|
|
8845
8858
|
};
|