@ambuj.bhaskar/react-component-library 0.30.4 → 0.30.5
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/assets/index.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +41 -45
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -89075,46 +89075,28 @@ const ZPe = (e) => {
|
|
|
89075
89075
|
return /* @__PURE__ */ j.jsx(ju, { value: s || !1, onChange: l });
|
|
89076
89076
|
// return <Switch value={value || false} onChange={onChange} />;
|
|
89077
89077
|
case "slider":
|
|
89078
|
-
return /* @__PURE__ */ j.
|
|
89079
|
-
|
|
89080
|
-
|
|
89081
|
-
|
|
89082
|
-
|
|
89083
|
-
|
|
89084
|
-
|
|
89085
|
-
|
|
89086
|
-
|
|
89087
|
-
|
|
89088
|
-
max: n.max || 100,
|
|
89089
|
-
step: n.step || 1,
|
|
89090
|
-
value: s || n.min || 0,
|
|
89091
|
-
onChange: l
|
|
89092
|
-
}
|
|
89093
|
-
)
|
|
89094
|
-
] });
|
|
89078
|
+
return /* @__PURE__ */ j.jsx("div", { className: "slider-container", children: /* @__PURE__ */ j.jsx(
|
|
89079
|
+
ag,
|
|
89080
|
+
{
|
|
89081
|
+
min: n.min || 0,
|
|
89082
|
+
max: n.max || 100,
|
|
89083
|
+
step: n.step || 1,
|
|
89084
|
+
value: s || n.min || 0,
|
|
89085
|
+
onChange: l
|
|
89086
|
+
}
|
|
89087
|
+
) });
|
|
89095
89088
|
case "range-slider":
|
|
89096
|
-
return /* @__PURE__ */ j.
|
|
89097
|
-
|
|
89098
|
-
|
|
89099
|
-
|
|
89100
|
-
|
|
89101
|
-
|
|
89102
|
-
|
|
89103
|
-
Array.isArray(s) ? s
|
|
89104
|
-
|
|
89105
|
-
|
|
89106
|
-
|
|
89107
|
-
ag,
|
|
89108
|
-
{
|
|
89109
|
-
range: !0,
|
|
89110
|
-
min: n.min || 0,
|
|
89111
|
-
max: n.max || 100,
|
|
89112
|
-
step: n.step || 1,
|
|
89113
|
-
value: Array.isArray(s) ? s : [n.min || 0, n.max || 100],
|
|
89114
|
-
onChange: l
|
|
89115
|
-
}
|
|
89116
|
-
)
|
|
89117
|
-
] });
|
|
89089
|
+
return /* @__PURE__ */ j.jsx("div", { className: "range-slider-container", children: /* @__PURE__ */ j.jsx(
|
|
89090
|
+
ag,
|
|
89091
|
+
{
|
|
89092
|
+
range: !0,
|
|
89093
|
+
min: n.min || 0,
|
|
89094
|
+
max: n.max || 100,
|
|
89095
|
+
step: n.step || 1,
|
|
89096
|
+
value: Array.isArray(s) ? s : [n.min || 0, n.max || 100],
|
|
89097
|
+
onChange: l
|
|
89098
|
+
}
|
|
89099
|
+
) });
|
|
89118
89100
|
default:
|
|
89119
89101
|
return /* @__PURE__ */ j.jsxs("div", { className: "unsupported-field", children: [
|
|
89120
89102
|
"Unsupported field type: ",
|
|
@@ -89124,17 +89106,27 @@ const ZPe = (e) => {
|
|
|
89124
89106
|
};
|
|
89125
89107
|
return /* @__PURE__ */ j.jsxs("div", { className: `form-field ${r}`, children: [
|
|
89126
89108
|
/* @__PURE__ */ j.jsxs("div", { className: "form-field-header", children: [
|
|
89127
|
-
n.label
|
|
89109
|
+
n.label ? n.inputType !== "slider" && n.inputType !== "range-slider" ? /* @__PURE__ */ j.jsxs("label", { className: "form-field-label", children: [
|
|
89128
89110
|
n.label,
|
|
89129
|
-
n.required && /* @__PURE__ */ j.jsx("span", { className: "required", children: "
|
|
89130
|
-
] }),
|
|
89111
|
+
n.required && /* @__PURE__ */ j.jsx("span", { className: "required", children: "•" })
|
|
89112
|
+
] }) : /* @__PURE__ */ j.jsxs("div", { className: "form-field-label", children: [
|
|
89113
|
+
n.label,
|
|
89114
|
+
": [",
|
|
89115
|
+
Array.isArray(n.value) ? n.value[0] : n.min || 0,
|
|
89116
|
+
",",
|
|
89117
|
+
" ",
|
|
89118
|
+
Array.isArray(n.value) ? n.value[1] : n.max || 100,
|
|
89119
|
+
"]"
|
|
89120
|
+
] }) : /* @__PURE__ */ j.jsx(j.Fragment, {}),
|
|
89131
89121
|
o && /* @__PURE__ */ j.jsx(
|
|
89132
89122
|
Ir,
|
|
89133
89123
|
{
|
|
89134
89124
|
icon: "deleteIcon",
|
|
89135
89125
|
size: "s",
|
|
89136
89126
|
variant: "secondary",
|
|
89137
|
-
onClick: () =>
|
|
89127
|
+
onClick: (s) => {
|
|
89128
|
+
s.preventDefault(), i == null || i(e);
|
|
89129
|
+
},
|
|
89138
89130
|
className: "form-field-delete-button"
|
|
89139
89131
|
}
|
|
89140
89132
|
)
|
|
@@ -89167,7 +89159,9 @@ const ZPe = (e) => {
|
|
|
89167
89159
|
icon: "plus",
|
|
89168
89160
|
size: "s",
|
|
89169
89161
|
variant: "secondary",
|
|
89170
|
-
onClick: () =>
|
|
89162
|
+
onClick: (p) => {
|
|
89163
|
+
p.preventDefault(), a == null || a(e);
|
|
89164
|
+
},
|
|
89171
89165
|
className: "edit-add-button"
|
|
89172
89166
|
}
|
|
89173
89167
|
),
|
|
@@ -89177,7 +89171,9 @@ const ZPe = (e) => {
|
|
|
89177
89171
|
icon: "deleteIcon",
|
|
89178
89172
|
size: "s",
|
|
89179
89173
|
variant: "secondary",
|
|
89180
|
-
onClick: () =>
|
|
89174
|
+
onClick: (p) => {
|
|
89175
|
+
p.preventDefault(), s == null || s(e);
|
|
89176
|
+
},
|
|
89181
89177
|
className: "edit-delete-button"
|
|
89182
89178
|
}
|
|
89183
89179
|
)
|