@fluidattacks/design 9.3.2 → 9.3.3

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <h1 align="center">Fluid Attacks Design Components Library</h1>
8
8
 
9
- Fluid Attacks Design is an open-source React component library that implements
9
+ Fluid Attacks Design is a React component library that implements
10
10
  the components used to develop Fluid Attacks' digital interfaces. It's comprehensive and can be used in production out of the box.
11
11
 
12
12
  ## Installation
@@ -28,8 +28,3 @@ All the components can be seen in the [Design Library](https://design.fluidattac
28
28
  ## Contributing
29
29
 
30
30
  Read the [contributing guide](https://docs.fluidattacks.com/internal/engineering/contributing) to learn about our development process, and how to propose bug fixes and improvements.
31
-
32
- ## License
33
-
34
- This project is licensed under the terms of the
35
- [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
@@ -1,3 +1,3 @@
1
1
  import { IInputProps } from '../../types';
2
- declare const TextInput: ({ disabled, hasIcon, helpLink, helpLinkText, helpText, error, id, indexArray, isValid, isTouched, label, name, maskValue, onPaste, placeholder, removeItemArray, register, suggestions, tooltip, type, weight, ...rest }: Readonly<IInputProps>) => JSX.Element;
2
+ declare const TextInput: ({ disabled, hasIcon, helpLink, helpLinkText, helpText, error, id, indexArray, isValid, isTouched, label, name, maskValue, maxLength, onPaste, placeholder, removeItemArray, register, suggestions, tooltip, type, weight, ...rest }: Readonly<IInputProps>) => JSX.Element;
3
3
  export { TextInput };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as C, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as g, useCallback as y } from "react";
3
- import { useTheme as H } from "styled-components";
4
- import { OutlineContainer as J } from "../../outline-container/index.js";
5
- import { StyledTextInputContainer as L } from "../../styles.js";
3
+ import { useTheme as J } from "styled-components";
4
+ import { OutlineContainer as L } from "../../outline-container/index.js";
5
+ import { StyledTextInputContainer as P } from "../../styles.js";
6
6
  import { Icon as s } from "../../../icon/index.js";
7
7
  import { IconButton as x } from "../../../icon-button/index.js";
8
- const A = ({
8
+ const oo = ({
9
9
  disabled: t = !1,
10
10
  hasIcon: T = !1,
11
11
  helpLink: S,
@@ -19,28 +19,29 @@ const A = ({
19
19
  label: j,
20
20
  name: i,
21
21
  maskValue: d = !1,
22
- onPaste: q,
23
- placeholder: B,
22
+ maxLength: q,
23
+ onPaste: B,
24
+ placeholder: D,
24
25
  removeItemArray: u,
25
26
  register: h,
26
27
  suggestions: n,
27
- tooltip: D,
28
- type: N = "text",
29
- weight: _,
28
+ tooltip: N,
29
+ type: _ = "text",
30
+ weight: b,
30
31
  ...f
31
32
  }) => {
32
- const { required: l, onBlur: b, onChange: E } = f, r = H(), a = t ? void 0 : z, [F, K] = g(""), [c, M] = g(!1), O = d ? c ? "text" : "password" : N, V = y(() => {
33
- M((o) => !o);
33
+ const { required: l, onBlur: E, onChange: F } = f, r = J(), a = t ? void 0 : z, [K, M] = g(""), [c, O] = g(!1), V = d ? c ? "text" : "password" : _, G = y(() => {
34
+ O((o) => !o);
34
35
  }, []), v = (o) => {
35
- K(o.target.value), E?.(o);
36
- }, m = k && R && !t && F.trim() !== "", G = y(
36
+ M(o.target.value), F?.(o);
37
+ }, m = k && R && !t && K.trim() !== "", H = y(
37
38
  (o) => {
38
39
  o.key === "Enter" && o.preventDefault();
39
40
  },
40
41
  []
41
42
  );
42
43
  return /* @__PURE__ */ C(
43
- J,
44
+ L,
44
45
  {
45
46
  error: a,
46
47
  helpLink: S,
@@ -49,11 +50,11 @@ const A = ({
49
50
  htmlFor: i,
50
51
  label: j,
51
52
  required: l,
52
- tooltip: D,
53
- weight: _,
53
+ tooltip: N,
54
+ weight: b,
54
55
  children: [
55
56
  /* @__PURE__ */ C(
56
- L,
57
+ P,
57
58
  {
58
59
  className: `
59
60
  ${t ? "disabled" : ""} ${a ? "error" : ""} ${m ? "success" : ""}
@@ -72,11 +73,12 @@ const A = ({
72
73
  disabled: t,
73
74
  id: i,
74
75
  list: n ? `list_${i}` : void 0,
75
- onKeyDown: G,
76
- onPaste: q,
77
- placeholder: B,
78
- type: O,
79
- ...h ? h(i, { required: l, onBlur: b, onChange: v }) : { ...f, onChange: v }
76
+ maxLength: q,
77
+ onKeyDown: H,
78
+ onPaste: B,
79
+ placeholder: D,
80
+ type: V,
81
+ ...h ? h(i, { required: l, onBlur: E, onChange: v }) : { ...f, onChange: v }
80
82
  }
81
83
  ),
82
84
  a ? /* @__PURE__ */ e(
@@ -117,7 +119,7 @@ const A = ({
117
119
  iconColor: r.palette.gray[800],
118
120
  iconSize: "lg",
119
121
  iconType: "fa-light",
120
- onClick: V,
122
+ onClick: G,
121
123
  py: 0,
122
124
  variant: "ghost"
123
125
  }
@@ -131,5 +133,5 @@ const A = ({
131
133
  );
132
134
  };
133
135
  export {
134
- A as TextInput
136
+ oo as TextInput
135
137
  };
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "9.3.2"
138
+ "version": "9.3.3"
139
139
  }