@dust-tt/sparkle 0.2.247 → 0.2.249

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/cjs/index.js CHANGED
@@ -103589,7 +103589,7 @@ function Dialog(_a) {
103589
103589
  React.createElement("div", { className: "s-flex s-w-full s-justify-end" },
103590
103590
  React.createElement(Button.List, null,
103591
103591
  !isSaving && (React.createElement(React.Fragment, null,
103592
- !props.alertDialog && (React.createElement(Button, { label: (_b = props.cancelLabel) !== null && _b !== void 0 ? _b : "Cancel", variant: "tertiary", onClick: props.onCancel })),
103592
+ props.onCancel && (React.createElement(Button, { label: (_b = props.cancelLabel) !== null && _b !== void 0 ? _b : "Cancel", variant: "tertiary", onClick: props.onCancel })),
103593
103593
  React.createElement(Button, { disabled: disabled, label: validateLabel, variant: validateVariant, onClick: onValidate }))),
103594
103594
  isSaving && React.createElement(Spinner, { variant: "color" }))),
103595
103595
  backgroundType !== "none" && (React.createElement("div", { className: "s-absolute s-bottom-0 s-left-0 s-right-0 s-top-0 s-z-0" },
@@ -107177,11 +107177,11 @@ var sizeInputClasses = {
107177
107177
  sm: "s-text-base s-rounded-md s-py-1.5 s-pl-4 s-pr-8",
107178
107178
  md: "s-text-lg s-rounded-lg s-py-2 s-pl-4 s-pr-10",
107179
107179
  };
107180
- function Input(_a) {
107181
- var placeholder = _a.placeholder, value = _a.value, _b = _a.size, size = _b === void 0 ? "sm" : _b, onChange = _a.onChange, error = _a.error, _c = _a.showErrorLabel, showErrorLabel = _c === void 0 ? false : _c, name = _a.name, _d = _a.isPassword, isPassword = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.className, className = _f === void 0 ? "" : _f, label = _a.label;
107180
+ var Input = React.forwardRef(function (_a, ref) {
107181
+ var placeholder = _a.placeholder, value = _a.value, _b = _a.size, size = _b === void 0 ? "sm" : _b, onChange = _a.onChange, error = _a.error, _c = _a.showErrorLabel, showErrorLabel = _c === void 0 ? false : _c, name = _a.name, _d = _a.isPassword, isPassword = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.className, className = _f === void 0 ? "" : _f, label = _a.label, maxLength = _a.maxLength;
107182
107182
  return (React.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
107183
107183
  label && (React.createElement("label", { htmlFor: name, className: "s-pb-1 s-text-sm s-font-medium s-text-element-700 dark:s-text-element-700-dark" }, label)),
107184
- React.createElement("input", { type: isPassword ? "password" : "text", name: name, id: name, className: classNames("s-w-full s-border-0 s-outline-none s-ring-1 focus:s-outline-none focus:s-ring-2", "s-bg-structure-50 s-placeholder-element-700", "dark:s-bg-structure-50-dark dark:s-placeholder-element-700-dark", sizeInputClasses[size], "s-transition-all s-duration-300 s-ease-out", className !== null && className !== void 0 ? className : "", !error
107184
+ React.createElement("input", { ref: ref, type: isPassword ? "password" : "text", name: name, id: name, maxLength: maxLength, className: classNames("s-w-full s-border-0 s-outline-none s-ring-1 focus:s-outline-none focus:s-ring-2", "s-bg-structure-50 s-placeholder-element-700", "dark:s-bg-structure-50-dark dark:s-placeholder-element-700-dark", sizeInputClasses[size], "s-transition-all s-duration-300 s-ease-out", className !== null && className !== void 0 ? className : "", !error
107185
107185
  ? classNames("s-ring-structure-200 focus:s-ring-action-300", "dark:s-ring-structure-300-dark dark:focus:s-ring-action-300-dark")
107186
107186
  : classNames("s-ring-warning-200 focus:s-ring-warning-300", "dark:s-ring-warning-200-dark dark:focus:s-ring-warning-300-dark"), disabled
107187
107187
  ? "s-text-element-500 hover:s-cursor-not-allowed"
@@ -107189,7 +107189,8 @@ function Input(_a) {
107189
107189
  onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
107190
107190
  }, "data-1p-ignore": !isPassword, disabled: disabled }),
107191
107191
  React.createElement("div", { className: "s-ml-2 s-text-sm s-text-warning-500" }, showErrorLabel && error ? error : null)));
107192
- }
107192
+ });
107193
+ Input.displayName = "Input";
107193
107194
 
107194
107195
  function ok$2() {}
107195
107196