@colisweb/rescript-toolkit 3.0.1 → 3.1.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -11,6 +11,16 @@ module String = {
11
11
  ->Js.String2.normalizeByForm("NFD")
12
12
  ->Js.String2.includes(str2->Js.String2.toLowerCase->Js.String2.normalizeByForm("NFD"))
13
13
  }
14
+
15
+ /**
16
+ * normalize nfd -> replace by re remove split by commponents the accent letters and deletes the accent component only, leaving the un-accented letter
17
+ */
18
+ let normalizeForSearch = str => {
19
+ str
20
+ ->Js.String2.toLowerCase
21
+ ->Js.String2.normalizeByForm("NFD")
22
+ ->Js.String2.replaceByRe(%re("/[\u0300-\u036f]/g"), "")
23
+ }
14
24
  }
15
25
 
16
26
  module Option = {
@@ -33,6 +33,8 @@ module.exports = {
33
33
  sans: ["Open Sans", "sans-serif"],
34
34
  mono: ["Roboto Mono", "monospace"],
35
35
  code: ["Fira Code", "monospace"],
36
+ title: ["Paytone One", "sans-serif"],
37
+ text: ["Public Sans", "sans-serif"],
36
38
  },
37
39
  fontSize: {
38
40
  xxs: "0.625rem",
@@ -64,7 +66,8 @@ module.exports = {
64
66
  },
65
67
  colors: {
66
68
  white: "#fff",
67
- black: "#000",
69
+ cream: "#F9F7F2",
70
+ black: "#131626",
68
71
  transparent: "transparent",
69
72
  routeWithdraw: "#176693",
70
73
  gray: {
@@ -46,6 +46,7 @@ module ReactSelectMultiple = {
46
46
  ~className: string=?,
47
47
  ~classNamePrefix: string=?,
48
48
  ~defaultValue: array<labelOption<'value>>=?,
49
+ ~value: array<labelOption<'value>>=?,
49
50
  ~onChange: array<labelOption<'value>> => unit,
50
51
  ~options: array<labelOption<'value>>,
51
52
  ~noOptionsMessage: optionMessage => Js.Nullable.t<string>=?,
@@ -55,15 +56,16 @@ module ReactSelectMultiple = {
55
56
  @react.component
56
57
  let make = (
57
58
  ~name: string,
58
- ~autoFocus: bool=?,
59
- ~isSearchable: bool=?,
60
- ~defaultMenuIsOpen: bool=?,
61
- ~isDisabled: bool=?,
62
- ~isLoading: bool=?,
63
- ~placeholder: string=?,
64
- ~className: string=?,
65
- ~classNamePrefix: string=?,
59
+ ~autoFocus: option<bool>=?,
60
+ ~isSearchable: option<bool>=?,
61
+ ~defaultMenuIsOpen: option<bool>=?,
62
+ ~isDisabled: option<bool>=?,
63
+ ~isLoading: option<bool>=?,
64
+ ~placeholder: option<string>=?,
65
+ ~className: option<string>=?,
66
+ ~classNamePrefix: option<string>=?,
66
67
  ~defaultValue: array<labelOption<'value>>,
68
+ ~value: option<array<labelOption<'value>>>=?,
67
69
  ~onChange: array<labelOption<'value>> => unit,
68
70
  ~options: array<labelOption<'value>>,
69
71
  ~noOptionsMessage: option<optionMessage => Js.Nullable.t<string>>=?,
@@ -79,6 +81,7 @@ module ReactSelectMultiple = {
79
81
  ?defaultMenuIsOpen
80
82
  ?className
81
83
  ?classNamePrefix
84
+ ?value
82
85
  defaultValue
83
86
  onChange
84
87
  options
@@ -167,8 +170,8 @@ module ReactSelectMultipleCreateInput = {
167
170
  ~placeholder="",
168
171
  ~isDisabled=false,
169
172
  ~isLoading=false,
170
- ~className: string=?,
171
- ~id: string=?,
173
+ ~className: option<string>=?,
174
+ ~id: option<string>=?,
172
175
  ) => {
173
176
  let (inputValue, onInputChange) = React.useState(() => "")
174
177
  let onInputChange = v => onInputChange(_ => v)