@pathscale/ui 0.0.64 → 0.0.66
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 +29 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7234,14 +7234,14 @@ function useFormValidation() {
|
|
|
7234
7234
|
if (!context) throw new Error("useFormValidation must be used within a ValidatedForm");
|
|
7235
7235
|
return context;
|
|
7236
7236
|
}
|
|
7237
|
-
function
|
|
7237
|
+
function ValidatedForm(props) {
|
|
7238
7238
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
7239
7239
|
"children",
|
|
7240
7240
|
"schema",
|
|
7241
7241
|
"onSubmit",
|
|
7242
7242
|
"initialValues"
|
|
7243
7243
|
]);
|
|
7244
|
-
const { form, errors, touched, data, isValid, isSubmitting } = (0, __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__.createForm)({
|
|
7244
|
+
const { form, errors, touched, data, isValid, isSubmitting, setData, setErrors, setWarnings, setTouched } = (0, __WEBPACK_EXTERNAL_MODULE__felte_solid_6a709b1d__.createForm)({
|
|
7245
7245
|
initialValues: local.initialValues,
|
|
7246
7246
|
extend: [
|
|
7247
7247
|
(0, __WEBPACK_EXTERNAL_MODULE__felte_validator_zod_bb07151a__.validator)({
|
|
@@ -7255,7 +7255,11 @@ function ValidatedForm_ValidatedForm(props) {
|
|
|
7255
7255
|
touched,
|
|
7256
7256
|
data,
|
|
7257
7257
|
isValid,
|
|
7258
|
-
isSubmitting
|
|
7258
|
+
isSubmitting,
|
|
7259
|
+
setData,
|
|
7260
|
+
setErrors,
|
|
7261
|
+
setWarnings,
|
|
7262
|
+
setTouched
|
|
7259
7263
|
}));
|
|
7260
7264
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(FormValidationContext.Provider, {
|
|
7261
7265
|
get value () {
|
|
@@ -7271,7 +7275,7 @@ function ValidatedForm_ValidatedForm(props) {
|
|
|
7271
7275
|
}
|
|
7272
7276
|
});
|
|
7273
7277
|
}
|
|
7274
|
-
const
|
|
7278
|
+
const form_ValidatedForm = ValidatedForm;
|
|
7275
7279
|
var Form_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<form role=form>");
|
|
7276
7280
|
const Form = (props)=>{
|
|
7277
7281
|
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
@@ -7298,7 +7302,7 @@ const Form = (props)=>{
|
|
|
7298
7302
|
};
|
|
7299
7303
|
const form_Form = Object.assign(Form, {
|
|
7300
7304
|
Label: form_Label,
|
|
7301
|
-
Validated:
|
|
7305
|
+
Validated: form_ValidatedForm
|
|
7302
7306
|
});
|
|
7303
7307
|
const colsMap = {
|
|
7304
7308
|
1: "grid-cols-1",
|
|
@@ -8801,17 +8805,24 @@ const Rating = Object.assign(Rating_Rating, {
|
|
|
8801
8805
|
Item: rating_RatingItem,
|
|
8802
8806
|
Hidden: rating_RatingHidden
|
|
8803
8807
|
});
|
|
8804
|
-
var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select>");
|
|
8808
|
+
var Select_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<select><option value disabled hidden>");
|
|
8805
8809
|
const Select = (props)=>{
|
|
8806
|
-
const
|
|
8810
|
+
const merged = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.mergeProps)({
|
|
8811
|
+
value: "",
|
|
8812
|
+
placeholder: "Please, select an option"
|
|
8813
|
+
}, props);
|
|
8814
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(merged, [
|
|
8807
8815
|
"color",
|
|
8808
8816
|
"size",
|
|
8809
8817
|
"dataTheme",
|
|
8810
8818
|
"class",
|
|
8811
8819
|
"className",
|
|
8812
|
-
"style"
|
|
8820
|
+
"style",
|
|
8821
|
+
"placeholder",
|
|
8822
|
+
"value",
|
|
8823
|
+
"children"
|
|
8813
8824
|
]);
|
|
8814
|
-
const classes = ()=>twMerge("select", local.class, local.className, clsx({
|
|
8825
|
+
const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("select", local.class, local.className, clsx({
|
|
8815
8826
|
"select-xl": "xl" === local.size,
|
|
8816
8827
|
"select-lg": "lg" === local.size,
|
|
8817
8828
|
"select-md": "md" === local.size,
|
|
@@ -8825,9 +8836,10 @@ const Select = (props)=>{
|
|
|
8825
8836
|
"select-success": "success" === local.color,
|
|
8826
8837
|
"select-warning": "warning" === local.color,
|
|
8827
8838
|
"select-error": "error" === local.color
|
|
8828
|
-
}));
|
|
8839
|
+
})));
|
|
8840
|
+
const hasValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>void 0 !== local.value && "" !== local.value);
|
|
8829
8841
|
return (()=>{
|
|
8830
|
-
var _el$ = Select_tmpl$();
|
|
8842
|
+
var _el$ = Select_tmpl$(), _el$2 = _el$.firstChild;
|
|
8831
8843
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
8832
8844
|
get ["data-theme"] () {
|
|
8833
8845
|
return local.dataTheme;
|
|
@@ -8837,9 +8849,14 @@ const Select = (props)=>{
|
|
|
8837
8849
|
},
|
|
8838
8850
|
get style () {
|
|
8839
8851
|
return local.style;
|
|
8852
|
+
},
|
|
8853
|
+
get value () {
|
|
8854
|
+
return local.value;
|
|
8840
8855
|
}
|
|
8841
8856
|
}), false, true);
|
|
8842
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el
|
|
8857
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.placeholder);
|
|
8858
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children, null);
|
|
8859
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>_el$2.selected = !hasValue());
|
|
8843
8860
|
return _el$;
|
|
8844
8861
|
})();
|
|
8845
8862
|
};
|