@algorithm-shift/design-system 1.2.56 → 1.2.58
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/client.js +3 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -2
- package/dist/client.mjs.map +1 -1
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -26793,7 +26793,7 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
26793
26793
|
...style,
|
|
26794
26794
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
26795
26795
|
},
|
|
26796
|
-
value: props.value,
|
|
26796
|
+
value: props.value || "",
|
|
26797
26797
|
autoComplete: isAutocomplete ? "on" : "off",
|
|
26798
26798
|
placeholder,
|
|
26799
26799
|
onChange: handleChange,
|
|
@@ -26826,7 +26826,7 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
26826
26826
|
type: "number",
|
|
26827
26827
|
id: props.name || "number-field",
|
|
26828
26828
|
name: props.name,
|
|
26829
|
-
value: props.value,
|
|
26829
|
+
value: props.value || "",
|
|
26830
26830
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26831
26831
|
style: {
|
|
26832
26832
|
...style,
|
|
@@ -26864,7 +26864,7 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
26864
26864
|
{
|
|
26865
26865
|
type: "email",
|
|
26866
26866
|
name: props.name,
|
|
26867
|
-
value: props.value,
|
|
26867
|
+
value: props.value || "",
|
|
26868
26868
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26869
26869
|
style: {
|
|
26870
26870
|
...style,
|
|
@@ -26903,7 +26903,7 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
26903
26903
|
type: "password",
|
|
26904
26904
|
id: props.name || "password-field",
|
|
26905
26905
|
name: props.name,
|
|
26906
|
-
value: props.value,
|
|
26906
|
+
value: props.value || "",
|
|
26907
26907
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26908
26908
|
style: {
|
|
26909
26909
|
...style,
|
|
@@ -26955,7 +26955,7 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
26955
26955
|
{
|
|
26956
26956
|
id: "textarea-field",
|
|
26957
26957
|
name: props.name,
|
|
26958
|
-
value: props.value,
|
|
26958
|
+
value: props.value || "",
|
|
26959
26959
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26960
26960
|
style: {
|
|
26961
26961
|
...style,
|
|
@@ -26993,7 +26993,7 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
26993
26993
|
id: "url-field",
|
|
26994
26994
|
type: "url",
|
|
26995
26995
|
name: props.name,
|
|
26996
|
-
value: props.value,
|
|
26996
|
+
value: props.value || "",
|
|
26997
26997
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
26998
26998
|
style: {
|
|
26999
26999
|
...style,
|
|
@@ -27140,7 +27140,8 @@ var RadioInput = ({
|
|
|
27140
27140
|
dataLabel,
|
|
27141
27141
|
...props
|
|
27142
27142
|
}) => {
|
|
27143
|
-
const
|
|
27143
|
+
const list = Array.isArray(data) ? data : [];
|
|
27144
|
+
const options = (list || []).map((item) => ({
|
|
27144
27145
|
value: item[dataKey || "value"],
|
|
27145
27146
|
label: item[dataLabel || "label"]
|
|
27146
27147
|
}));
|
|
@@ -27182,8 +27183,9 @@ var MultiCheckbox = ({
|
|
|
27182
27183
|
isEditable = true,
|
|
27183
27184
|
isDisabled = false
|
|
27184
27185
|
}) => {
|
|
27186
|
+
const list = Array.isArray(data) ? data : [];
|
|
27185
27187
|
const [value, setValue] = useState2(propValue);
|
|
27186
|
-
const options = (
|
|
27188
|
+
const options = (list || []).map((item) => ({
|
|
27187
27189
|
value: item[dataKey || "value"],
|
|
27188
27190
|
label: item[dataLabel || "label"]
|
|
27189
27191
|
}));
|
|
@@ -27305,7 +27307,7 @@ function RichText({ className, style, ...props }) {
|
|
|
27305
27307
|
borderColor: props.errorMessage ? "#f87171" : style?.borderColor
|
|
27306
27308
|
},
|
|
27307
27309
|
children: [
|
|
27308
|
-
/* @__PURE__ */ jsx31(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value, isDefault: true }),
|
|
27310
|
+
/* @__PURE__ */ jsx31(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value || "", isDefault: true }),
|
|
27309
27311
|
props.errorMessage && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
|
|
27310
27312
|
]
|
|
27311
27313
|
}
|
|
@@ -27441,7 +27443,7 @@ function SelectScrollDownButton({
|
|
|
27441
27443
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
27442
27444
|
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
27443
27445
|
var Dropdown = ({ className, style, ...props }) => {
|
|
27444
|
-
const list = props.data
|
|
27446
|
+
const list = Array.isArray(props?.data) ? props.data : [];
|
|
27445
27447
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
27446
27448
|
const isEditable = props.isEditable ?? true;
|
|
27447
27449
|
const isDisabled = props.isDisabled ?? false;
|
|
@@ -27456,7 +27458,7 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
27456
27458
|
label: item[dataLabel]
|
|
27457
27459
|
}));
|
|
27458
27460
|
return /* @__PURE__ */ jsxs17(Fragment10, { children: [
|
|
27459
|
-
/* @__PURE__ */ jsxs17(Select, { name: props.name, value: props.value, onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
27461
|
+
/* @__PURE__ */ jsxs17(Select, { name: props.name, value: props.value || "", onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
27460
27462
|
/* @__PURE__ */ jsx33(
|
|
27461
27463
|
SelectTrigger,
|
|
27462
27464
|
{
|
|
@@ -27549,7 +27551,7 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27549
27551
|
{
|
|
27550
27552
|
defaultCountry: "in",
|
|
27551
27553
|
name: props.name,
|
|
27552
|
-
value: props.value,
|
|
27554
|
+
value: props.value || "",
|
|
27553
27555
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27554
27556
|
style: {
|
|
27555
27557
|
...style,
|
|
@@ -27588,7 +27590,7 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
27588
27590
|
type: "text",
|
|
27589
27591
|
id: props.name || "text-field",
|
|
27590
27592
|
name: props.name,
|
|
27591
|
-
value: props.value,
|
|
27593
|
+
value: props.value || "",
|
|
27592
27594
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27593
27595
|
style: {
|
|
27594
27596
|
...style,
|
|
@@ -27618,7 +27620,7 @@ var FileInput2 = ({ className, style, ...props }) => {
|
|
|
27618
27620
|
type: "file",
|
|
27619
27621
|
id: "file",
|
|
27620
27622
|
name: props.name,
|
|
27621
|
-
value: props.value,
|
|
27623
|
+
value: props.value || "",
|
|
27622
27624
|
className: cn(className, props.errorMessage ? "border-red-500" : ""),
|
|
27623
27625
|
style: {
|
|
27624
27626
|
...style,
|
|
@@ -27677,7 +27679,7 @@ function DatePicker({ className, style, ...props }) {
|
|
|
27677
27679
|
onChange: handleChange,
|
|
27678
27680
|
disabled: isDisabled || !isEditable,
|
|
27679
27681
|
name: props.name,
|
|
27680
|
-
value: props.value,
|
|
27682
|
+
value: props.value || "",
|
|
27681
27683
|
className: cn(
|
|
27682
27684
|
className,
|
|
27683
27685
|
props.errorMessage ? "border-red-500" : "",
|
|
@@ -27997,7 +27999,7 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
|
|
|
27997
27999
|
id: props.name || "prepend-input",
|
|
27998
28000
|
type: "url",
|
|
27999
28001
|
name: props.name,
|
|
28000
|
-
value: props.value,
|
|
28002
|
+
value: props.value || "",
|
|
28001
28003
|
className: cn(
|
|
28002
28004
|
className,
|
|
28003
28005
|
"rounded-none flex-1 border-none focus:ring-0"
|