@l3mpire/ui 2.26.0 → 2.26.1

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.mjs CHANGED
@@ -3314,6 +3314,11 @@ var wrapperStates2 = {
3314
3314
  "focus-within:border-text-input-border-hover",
3315
3315
  "focus-within:shadow-focus-ring"
3316
3316
  ],
3317
+ success: [
3318
+ "bg-text-input-bg-default",
3319
+ "border-text-input-border-success",
3320
+ "text-text-input-text-default"
3321
+ ],
3317
3322
  error: [
3318
3323
  "bg-text-input-bg-default",
3319
3324
  "border-text-input-border-error",
@@ -3326,6 +3331,12 @@ var wrapperStates2 = {
3326
3331
  "cursor-not-allowed"
3327
3332
  ]
3328
3333
  };
3334
+ function resolveState3(error, success, disabled) {
3335
+ if (disabled) return "disabled";
3336
+ if (error) return "error";
3337
+ if (success) return "success";
3338
+ return "default";
3339
+ }
3329
3340
  var chipStyle = [
3330
3341
  "inline-flex items-center gap-xs shrink-0",
3331
3342
  "h-6 px-sm rounded-base",
@@ -3348,6 +3359,7 @@ var ChipInput = React27.forwardRef(
3348
3359
  labelType,
3349
3360
  error,
3350
3361
  errorMessage,
3362
+ success,
3351
3363
  disabled,
3352
3364
  iconLeft,
3353
3365
  max = 0,
@@ -3358,7 +3370,7 @@ var ChipInput = React27.forwardRef(
3358
3370
  const errorId = error && errorMessage ? `${inputId}-error` : void 0;
3359
3371
  const inputRef = React27.useRef(null);
3360
3372
  const [inputValue, setInputValue] = React27.useState("");
3361
- const state = disabled ? "disabled" : error ? "error" : "default";
3373
+ const state = resolveState3(error, success, disabled);
3362
3374
  const addChip = (val) => {
3363
3375
  const trimmed = val.trim();
3364
3376
  if (!trimmed) return;