@colisweb/rescript-toolkit 5.6.8 → 5.6.10

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": "5.6.8",
3
+ "version": "5.6.10",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -83,8 +83,7 @@ let make = (
83
83
  }}
84
84
  value={value->Js.Nullable.fromOption}
85
85
  nullable={true}>
86
- <div
87
- className="relative z-0 w-full cursor-default overflow-hidden rounded bg-white text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm">
86
+ <div className="relative z-0 w-full cursor-default rounded bg-white text-left sm:text-sm">
88
87
  <HeadlessUi.Combobox.Input
89
88
  ?placeholder
90
89
  ?autoFocus
@@ -92,7 +91,7 @@ let make = (
92
91
  onChange=onInputChange
93
92
  autocomplete="off"
94
93
  className={cx([
95
- "w-full border py-2 rounded pl-3 pr-10 text-sm leading-5 text-gray-900 focus:ring-0",
94
+ "w-full border py-2 rounded pl-3 pr-10 text-sm leading-5 text-gray-900",
96
95
  isInvalid ? "border-danger-500" : "border-gray-300",
97
96
  inputClassName,
98
97
  ])}
@@ -56,7 +56,7 @@ let make = (
56
56
  ) => {
57
57
  let {isSm} = Toolkit__Hooks.useMediaQuery()
58
58
 
59
- let periodLength = isSm ? periodLength->Option.getWithDefault(7) : 3
59
+ let periodLength = periodLength->Option.getWithDefault(isSm ? 7 : 3)
60
60
 
61
61
  let ({period, selectedDay}, dispatch) = ReactUpdate.useReducerWithMapState(
62
62
  (state, action) =>
@@ -203,14 +203,16 @@ let make = (
203
203
  <FormattedDate value=day day=#"2-digit" />
204
204
  </span>
205
205
  </p>
206
- <p
207
- className="text-xs text-info-500 bg-info-50 text-center mt-1 font-semibold rounded-sm">
208
- {counters
209
- ->Option.flatMap(counters =>
210
- counters->Js.Dict.get(day->DateFns.formatWithPattern("yyyy-MM-dd"))
211
- )
212
- ->Option.mapWithDefault(React.null, React.int)}
213
- </p>
206
+ {counters
207
+ ->Option.flatMap(counters =>
208
+ counters->Js.Dict.get(day->DateFns.formatWithPattern("yyyy-MM-dd"))
209
+ )
210
+ ->Option.mapWithDefault(React.null, value => {
211
+ <p
212
+ className="text-xs text-info-500 bg-info-50 text-center mt-1 font-semibold rounded-sm">
213
+ {value->React.int}
214
+ </p>
215
+ })}
214
216
  </div>
215
217
  </React.Fragment>
216
218
  })