@nattui/react-components 0.0.27 → 0.0.29

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.d.ts CHANGED
@@ -54,8 +54,10 @@ declare const BUTTON_CLASS_NAME: {
54
54
  interface InputProps extends Omit<ComponentProps<"input">, "aria-pressed" | "disabled" | "readOnly" | "required"> {
55
55
  isActive?: boolean;
56
56
  isDisabled?: boolean;
57
+ isInvalid?: boolean;
57
58
  isReadOnly?: boolean;
58
59
  isRequired?: boolean;
60
+ isValid?: boolean;
59
61
  size?: 32 | 36 | 40 | 44;
60
62
  }
61
63
  declare function Input(props: InputProps): JSX.Element;
package/dist/index.js CHANGED
@@ -129,15 +129,17 @@ var BUTTON_CLASS_NAME = {
129
129
  };
130
130
 
131
131
  // src/input.tsx
132
- import styles4 from "./input.module-WTTANJNH.module.css";
132
+ import styles4 from "./input.module-IR2FFKFD.module.css";
133
133
  import { jsx as jsx4 } from "react/jsx-runtime";
134
134
  function Input(props) {
135
135
  const {
136
136
  className: customClassName = "",
137
137
  isActive = false,
138
138
  isDisabled = false,
139
+ isInvalid = void 0,
139
140
  isReadOnly = false,
140
141
  isRequired = false,
142
+ isValid = void 0,
141
143
  size = 40,
142
144
  type = "text",
143
145
  ...rest
@@ -154,6 +156,8 @@ function Input(props) {
154
156
  {
155
157
  "aria-pressed": isActive,
156
158
  className: combinedClassName,
159
+ "data-is-invalid": isInvalid,
160
+ "data-is-valid": isValid,
157
161
  disabled: isDisabled,
158
162
  readOnly: isReadOnly,
159
163
  required: isRequired,
@@ -174,7 +178,7 @@ var INPUT_CLASS_NAME = {
174
178
  };
175
179
 
176
180
  // src/label.tsx
177
- import styles5 from "./label.module-3W6OLN6C.module.css";
181
+ import styles5 from "./label.module-HUBUIUFV.module.css";
178
182
  import { jsx as jsx5 } from "react/jsx-runtime";
179
183
  function Label(props) {
180
184
  const { className: customClassName = "", ...rest } = props;
@@ -14,10 +14,10 @@
14
14
  text-decoration: none;
15
15
  appearance: none;
16
16
  cursor: text;
17
- outline-width: 0;
17
+ outline-width: 2px;
18
18
  outline-style: solid;
19
- outline-color: var(--color-primary-9, #e93d82);
20
- outline-offset: 2px;
19
+ outline-color: transparent;
20
+ outline-offset: -2px;
21
21
  background-color: var(--color-gray-1, #fcfcfc);
22
22
  border-color: var(--color-gray-5, #e0e0e0);
23
23
  border-style: solid;
@@ -57,8 +57,17 @@
57
57
  box-shadow: 0 1px transparent;
58
58
  }
59
59
 
60
+ .input[data-is-valid="true"] {
61
+ outline-color: #30a46c;
62
+ }
63
+
64
+ .input[data-is-invalid="true"] {
65
+ outline-color: #e5484d;
66
+ }
67
+
68
+ /* Focus overrides valid and invalid */
60
69
  .input:focus-visible {
61
- outline-width: 2px;
70
+ outline-color: var(--color-primary-9, #e93d82);
62
71
  }
63
72
 
64
73
  /* ===================================================== */
@@ -4,5 +4,6 @@
4
4
  .label {
5
5
  width: fit-content;
6
6
  font-size: 13px;
7
+ font-weight: 500;
7
8
  color: var(--color-gray-11, #646464);
8
9
  }
package/package.json CHANGED
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "type": "module",
48
48
  "types": "./dist/index.d.ts",
49
- "version": "0.0.27"
49
+ "version": "0.0.29"
50
50
  }