next-helios-fe 1.8.109 → 1.8.111

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.109",
3
+ "version": "1.8.111",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import React, { useState, useEffect, useRef } from "react";
3
- import { Tooltip } from "../../../components";
4
2
  import { Icon } from "@iconify/react";
3
+ import React, { useEffect, useRef, useState } from "react";
4
+ import { Tooltip } from "../../../components";
5
5
 
6
6
  export interface FileProps extends React.InputHTMLAttributes<HTMLInputElement> {
7
7
  label?: string;
@@ -26,6 +26,7 @@ export const File: React.FC<FileProps> = ({
26
26
  options,
27
27
  defaultValue,
28
28
  value,
29
+ required,
29
30
  ...rest
30
31
  }) => {
31
32
  const inputRef = useRef<HTMLInputElement>(null);
@@ -72,8 +73,7 @@ export const File: React.FC<FileProps> = ({
72
73
  {label && (
73
74
  <span
74
75
  className={`text-sm select-none ${
75
- rest.required &&
76
- "after:content-['*'] after:ml-1 after:text-danger"
76
+ required && "after:content-['*'] after:ml-1 after:text-danger"
77
77
  }`}
78
78
  >
79
79
  {label}
@@ -122,6 +122,7 @@ export const File: React.FC<FileProps> = ({
122
122
  setTempFile(e.target.files);
123
123
  }
124
124
  }}
125
+ required={required && value?.length === 0}
125
126
  {...rest}
126
127
  />
127
128
  <span
@@ -174,6 +175,7 @@ export const File: React.FC<FileProps> = ({
174
175
  );
175
176
  }
176
177
  }}
178
+ required={required && value?.length === 0}
177
179
  {...rest}
178
180
  />
179
181
  <div