@colisweb/rescript-toolkit 2.36.0 → 2.36.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.36.0",
3
+ "version": "2.36.1",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build",
@@ -100,7 +100,7 @@ module Make = (StateLenses: Config) => {
100
100
  ~inputRightAddon=?,
101
101
  ~errorClassName=?,
102
102
  ~optionalMessage: option<React.element>=?,
103
- ~autocomplete: option<string>=?,
103
+ ~autoComplete=?,
104
104
  ) => {
105
105
  let (showPassword, setShowPassword) = React.useState(() => false)
106
106
  let isPasswordType = type_->Option.mapWithDefault(false, type_ => type_ === "password")
@@ -139,36 +139,28 @@ module Make = (StateLenses: Config) => {
139
139
  </Toolkit__Ui.Label>
140
140
  }}
141
141
  <div className={cx(["flex flex-row", inputContainerClassName])}>
142
- <Toolkit__Ui_Spread
143
- props={autocomplete->Option.mapWithDefault(Js.Obj.empty(), (
144
- autocomplete: string,
145
- ) =>
146
- {
147
- "autocomplete": autocomplete,
148
- }
149
- )}>
150
- <Toolkit__Ui.TextInput
151
- className={cx([
152
- inputClassName,
153
- inputRightAddon->Option.isSome || isPasswordType ? "rounded-r-none" : "",
154
- ])}
155
- id
156
- value
157
- ?name
158
- type_=?{type_->Option.map(type_ =>
159
- type_ === "password" && showPassword ? "text" : type_
160
- )}
161
- ?disabled
162
- ?placeholder
163
- ?autoFocus
164
- ?step
165
- ?min
166
- ?max
167
- isInvalid
168
- onChange
169
- onBlur
170
- />
171
- </Toolkit__Ui_Spread>
142
+ <Toolkit__Ui.TextInput
143
+ ?autoComplete
144
+ className={cx([
145
+ inputClassName,
146
+ inputRightAddon->Option.isSome || isPasswordType ? "rounded-r-none" : "",
147
+ ])}
148
+ id
149
+ value
150
+ ?name
151
+ type_=?{type_->Option.map(type_ =>
152
+ type_ === "password" && showPassword ? "text" : type_
153
+ )}
154
+ ?disabled
155
+ ?placeholder
156
+ ?autoFocus
157
+ ?step
158
+ ?min
159
+ ?max
160
+ isInvalid
161
+ onChange
162
+ onBlur
163
+ />
172
164
  {type_->Option.mapWithDefault(React.null, type_ => {
173
165
  switch type_ {
174
166
  | "password" =>