@colisweb/rescript-toolkit 2.71.1 → 3.0.0

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.
Files changed (65) hide show
  1. package/.yarn/cache/@colisweb-restorative-npm-1.0.0-5eac899f0c-6e80ecc641.zip +0 -0
  2. package/.yarn/cache/@rescript-react-npm-0.11.0-687f8fa3b5-c399d114f7.zip +0 -0
  3. package/.yarn/cache/{rescript-npm-10.0.1-c064c63c72-59ae153c7f.zip → rescript-npm-10.1.2-eb312a329e-e70ae09da1.zip} +0 -0
  4. package/.yarn/install-state.gz +0 -0
  5. package/bsconfig.json +2 -2
  6. package/locale/fr.json +5 -0
  7. package/package.json +4 -5
  8. package/playground/PlaygroundApp.res +12 -0
  9. package/playground/PlaygroundBindings.res +106 -0
  10. package/playground/PlaygroundHooks.res +4 -4
  11. package/playground/PlaygroundRouter.res +18 -0
  12. package/playground/bindings/Playground_Bindings_Reach.res +143 -0
  13. package/playground/components/Playground_Form.res +56 -3
  14. package/playground/components/Playground_Modal.res +20 -5
  15. package/playground/components/Playground_Select.res +14 -4
  16. package/playground/hooks/{Playground_Clipboard.res → Playground_Hooks_Clipboard.res} +1 -1
  17. package/playground/hooks/{Playground_Disclosure.res → Playground_Hooks_Disclosure.res} +1 -1
  18. package/playground/hooks/{Playground_LazyLoad.res → Playground_Hooks_LazyLoad.res} +1 -1
  19. package/playground/hooks/{Playground_MediaQueries.res → Playground_Hooks_MediaQueries.res} +1 -1
  20. package/src/decoders/Toolkit__Decoders.res +1 -1
  21. package/src/form/Reform.res +8 -36
  22. package/src/form/Toolkit__Form.res +114 -55
  23. package/src/hooks/Toolkit__Hooks.res +1 -1
  24. package/src/intl/Toolkit__Intl.res +1 -1
  25. package/src/intl/Toolkit__Intl.resi +1 -1
  26. package/src/logger/Toolkit__NativeLogger.res +1 -1
  27. package/src/router/Toolkit__Router.res +0 -6
  28. package/src/ui/Toolkit__Ui.res +0 -2
  29. package/src/ui/Toolkit__Ui_Dropdown.res +13 -7
  30. package/src/ui/Toolkit__Ui_Dropdown.resi +2 -0
  31. package/src/ui/Toolkit__Ui_Layout.res +1 -6
  32. package/src/ui/Toolkit__Ui_MultiSelect.res +10 -4
  33. package/src/ui/Toolkit__Ui_MultiSelect.resi +5 -1
  34. package/src/ui/Toolkit__Ui_NativeDatePicker.res +2 -2
  35. package/src/ui/Toolkit__Ui_Select.res +22 -5
  36. package/src/ui/Toolkit__Ui_Select.resi +13 -2
  37. package/src/ui/Toolkit__Ui_SelectPolyvariant.res +45 -0
  38. package/src/ui/Toolkit__Ui_Table.res +11 -6
  39. package/src/ui/Toolkit__Ui_TextInput.res +2 -2
  40. package/src/ui/Toolkit__Ui_WeekDateFilter.res +16 -16
  41. package/src/utils/Toolkit__Utils_UnitMeasure.res +4 -4
  42. package/src/vendors/{BsCopyToClipboard.res → CopyToClipboard.res} +0 -0
  43. package/src/vendors/{BsDateFns.res → DateFns.res} +0 -0
  44. package/src/vendors/{BsJsCookie.res → JsCookie.res} +0 -0
  45. package/src/vendors/{BsReactDayPicker.res → ReactDayPicker.res} +0 -1
  46. package/src/vendors/{BsReactGoogleMaps.res → ReactGoogleMaps.res} +0 -0
  47. package/src/vendors/ReactIcons.res +5 -0
  48. package/src/vendors/{BsReactSelect.res → ReactSelect.res} +58 -58
  49. package/src/vendors/{BsSentryReactNative.res → SentryReactNative.res} +0 -0
  50. package/src/vendors/reach-ui/ReachUi_Accordion.res +12 -14
  51. package/src/vendors/reach-ui/ReachUi_AlertDialog.res +8 -34
  52. package/src/vendors/reach-ui/ReachUi_Dialog.res +7 -10
  53. package/src/vendors/reach-ui/ReachUi_Listbox.res +8 -9
  54. package/src/vendors/reach-ui/ReachUi_MenuButton.res +7 -30
  55. package/src/vendors/reach-ui/ReachUi_Popover.res +0 -6
  56. package/src/vendors/reach-ui/ReachUi_Tabs.res +18 -27
  57. package/.yarn/cache/@colisweb-restorative-npm-0.5.1-2ffe068813-cd8332a7eb.zip +0 -0
  58. package/.yarn/cache/@rescript-react-npm-0.10.3-26bd5d697f-8561282f78.zip +0 -0
  59. package/.yarn/cache/compute-scroll-into-view-npm-1.0.16-a8a68c1929-4334db6397.zip +0 -0
  60. package/.yarn/cache/downshift-npm-5.2.5-14bb33ffd8-498b4764a8.zip +0 -0
  61. package/src/mock/MockOverlay.resi +0 -4
  62. package/src/ui/Toolkit__Ui_Listbox.res +0 -123
  63. package/src/ui/Toolkit__Ui_ListboxInput.res +0 -673
  64. package/src/vendors/BsAnalytics.res +0 -34
  65. package/src/vendors/BsDownshift.res +0 -596
@@ -1,123 +0,0 @@
1
- module ListboxPopover = {
2
- @react.component
3
- let make = React.forwardRef((
4
- ~onClick: option<ReactEvent.Mouse.t => unit>=?,
5
- ~isOpen=false,
6
- ~className="",
7
- ~children: React.element,
8
- ref_,
9
- ) =>
10
- <div
11
- ?onClick
12
- ref=?{ref_->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
13
- className={cx([
14
- className,
15
- "absolute bg-white z-40 shadow-lg rounded",
16
- isOpen ? "border py-2 mt-1" : "",
17
- ])}>
18
- children
19
- </div>
20
- )
21
- }
22
-
23
- module ListboxList = {
24
- @react.component
25
- let make = React.forwardRef((
26
- ~isOpen=false,
27
- ~ariaLabelledby: option<string>=?,
28
- ~ariaActivedescendant: option<string>=?,
29
- ~role: option<string>=?,
30
- ~id: option<string>=?,
31
- ~onMouseLeave: option<ReactEvent.Mouse.t => unit>=?,
32
- ~onKeyDown: option<ReactEvent.Keyboard.t => unit>=?,
33
- ~onBlur: option<ReactEvent.Focus.t => unit>=?,
34
- ~tabIndex: option<int>=?,
35
- ~className="",
36
- ~children: React.element,
37
- ref_,
38
- ) =>
39
- <ul
40
- ref=?{ref_->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
41
- ?ariaLabelledby
42
- ?ariaActivedescendant
43
- ?role
44
- ?id
45
- ?onMouseLeave
46
- ?onKeyDown
47
- ?onBlur
48
- ?tabIndex
49
- className={cx([className, "focus:outline-none focus:shadow-none max-h-sm overflow-y-auto"])}>
50
- {isOpen ? children : React.null}
51
- </ul>
52
- )
53
- }
54
-
55
- module ListboxOption = {
56
- @react.component
57
- let make = React.forwardRef((
58
- ~ariaSelected: option<bool>=?,
59
- ~id: option<string>=?,
60
- ~role: option<string>=?,
61
- ~onClick: option<ReactEvent.Mouse.t => unit>=?,
62
- ~onMouseMove: option<ReactEvent.Mouse.t => unit>=?,
63
- ~onMouseDown: option<ReactEvent.Mouse.t => unit>=?,
64
- ~disabled: option<bool>=?,
65
- ~isHighlighted: option<bool>=?,
66
- ~className="",
67
- ~children: React.element,
68
- ref_,
69
- ) =>
70
- <li
71
- ref=?{ref_->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
72
- ?ariaSelected
73
- ?id
74
- ?role
75
- ?onClick
76
- ?onMouseMove
77
- ?onMouseDown
78
- ?disabled
79
- className={cx([
80
- className,
81
- "py-2 px-4 flex items-center select-none transition duration-150 ease-in-out",
82
- isHighlighted->Option.getWithDefault(false) ? "bg-gray-200" : "",
83
- disabled->Option.getWithDefault(false) ? "text-gray-600" : "",
84
- ])}>
85
- children
86
- </li>
87
- )
88
- }
89
-
90
- module ListboxGroupLabel = {
91
- @react.component
92
- let make = React.forwardRef((~className="", ~children: React.element, ref_) =>
93
- <div
94
- role="group"
95
- ref=?{ref_->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
96
- className={cx([className, "py-2 px-4 flex items-center select-none text-sm font-bold"])}>
97
- children
98
- </div>
99
- )
100
- }
101
-
102
- module ListboxLabel = {
103
- @react.component
104
- let make = React.forwardRef((~className="", ~children: React.element, ref_) =>
105
- <div
106
- ref=?{ref_->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
107
- className={cx([className, "py-2 px-4 flex items-center select-none"])}>
108
- children
109
- </div>
110
- )
111
- }
112
-
113
- module ListboxDivider = {
114
- @react.component
115
- let make = (~className="") => <div className={cx([className, "pb-2 mb-2 border-b"])} />
116
- }
117
-
118
- module Popover = ListboxPopover
119
- module List = ListboxList
120
- module Option = ListboxOption
121
- module Label = ListboxLabel
122
- module GroupLabel = ListboxGroupLabel
123
- module Divider = ListboxDivider