@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.
- package/.yarn/cache/@colisweb-restorative-npm-1.0.0-5eac899f0c-6e80ecc641.zip +0 -0
- package/.yarn/cache/@rescript-react-npm-0.11.0-687f8fa3b5-c399d114f7.zip +0 -0
- package/.yarn/cache/{rescript-npm-10.0.1-c064c63c72-59ae153c7f.zip → rescript-npm-10.1.2-eb312a329e-e70ae09da1.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/bsconfig.json +2 -2
- package/locale/fr.json +5 -0
- package/package.json +4 -5
- package/playground/PlaygroundApp.res +12 -0
- package/playground/PlaygroundBindings.res +106 -0
- package/playground/PlaygroundHooks.res +4 -4
- package/playground/PlaygroundRouter.res +18 -0
- package/playground/bindings/Playground_Bindings_Reach.res +143 -0
- package/playground/components/Playground_Form.res +56 -3
- package/playground/components/Playground_Modal.res +20 -5
- package/playground/components/Playground_Select.res +14 -4
- package/playground/hooks/{Playground_Clipboard.res → Playground_Hooks_Clipboard.res} +1 -1
- package/playground/hooks/{Playground_Disclosure.res → Playground_Hooks_Disclosure.res} +1 -1
- package/playground/hooks/{Playground_LazyLoad.res → Playground_Hooks_LazyLoad.res} +1 -1
- package/playground/hooks/{Playground_MediaQueries.res → Playground_Hooks_MediaQueries.res} +1 -1
- package/src/decoders/Toolkit__Decoders.res +1 -1
- package/src/form/Reform.res +8 -36
- package/src/form/Toolkit__Form.res +114 -55
- package/src/hooks/Toolkit__Hooks.res +1 -1
- package/src/intl/Toolkit__Intl.res +1 -1
- package/src/intl/Toolkit__Intl.resi +1 -1
- package/src/logger/Toolkit__NativeLogger.res +1 -1
- package/src/router/Toolkit__Router.res +0 -6
- package/src/ui/Toolkit__Ui.res +0 -2
- package/src/ui/Toolkit__Ui_Dropdown.res +13 -7
- package/src/ui/Toolkit__Ui_Dropdown.resi +2 -0
- package/src/ui/Toolkit__Ui_Layout.res +1 -6
- package/src/ui/Toolkit__Ui_MultiSelect.res +10 -4
- package/src/ui/Toolkit__Ui_MultiSelect.resi +5 -1
- package/src/ui/Toolkit__Ui_NativeDatePicker.res +2 -2
- package/src/ui/Toolkit__Ui_Select.res +22 -5
- package/src/ui/Toolkit__Ui_Select.resi +13 -2
- package/src/ui/Toolkit__Ui_SelectPolyvariant.res +45 -0
- package/src/ui/Toolkit__Ui_Table.res +11 -6
- package/src/ui/Toolkit__Ui_TextInput.res +2 -2
- package/src/ui/Toolkit__Ui_WeekDateFilter.res +16 -16
- package/src/utils/Toolkit__Utils_UnitMeasure.res +4 -4
- package/src/vendors/{BsCopyToClipboard.res → CopyToClipboard.res} +0 -0
- package/src/vendors/{BsDateFns.res → DateFns.res} +0 -0
- package/src/vendors/{BsJsCookie.res → JsCookie.res} +0 -0
- package/src/vendors/{BsReactDayPicker.res → ReactDayPicker.res} +0 -1
- package/src/vendors/{BsReactGoogleMaps.res → ReactGoogleMaps.res} +0 -0
- package/src/vendors/ReactIcons.res +5 -0
- package/src/vendors/{BsReactSelect.res → ReactSelect.res} +58 -58
- package/src/vendors/{BsSentryReactNative.res → SentryReactNative.res} +0 -0
- package/src/vendors/reach-ui/ReachUi_Accordion.res +12 -14
- package/src/vendors/reach-ui/ReachUi_AlertDialog.res +8 -34
- package/src/vendors/reach-ui/ReachUi_Dialog.res +7 -10
- package/src/vendors/reach-ui/ReachUi_Listbox.res +8 -9
- package/src/vendors/reach-ui/ReachUi_MenuButton.res +7 -30
- package/src/vendors/reach-ui/ReachUi_Popover.res +0 -6
- package/src/vendors/reach-ui/ReachUi_Tabs.res +18 -27
- package/.yarn/cache/@colisweb-restorative-npm-0.5.1-2ffe068813-cd8332a7eb.zip +0 -0
- package/.yarn/cache/@rescript-react-npm-0.10.3-26bd5d697f-8561282f78.zip +0 -0
- package/.yarn/cache/compute-scroll-into-view-npm-1.0.16-a8a68c1929-4334db6397.zip +0 -0
- package/.yarn/cache/downshift-npm-5.2.5-14bb33ffd8-498b4764a8.zip +0 -0
- package/src/mock/MockOverlay.resi +0 -4
- package/src/ui/Toolkit__Ui_Listbox.res +0 -123
- package/src/ui/Toolkit__Ui_ListboxInput.res +0 -673
- package/src/vendors/BsAnalytics.res +0 -34
- package/src/vendors/BsDownshift.res +0 -596
|
@@ -22,10 +22,10 @@ let make = React.forwardRef((
|
|
|
22
22
|
~isInvalid: option<bool>=?,
|
|
23
23
|
~className: string="",
|
|
24
24
|
~style: option<ReactDOM.style>=?,
|
|
25
|
-
|
|
25
|
+
ref,
|
|
26
26
|
) =>
|
|
27
27
|
<input
|
|
28
|
-
ref=?{
|
|
28
|
+
ref=?{ref->Js.Nullable.toOption->Option.map(ReactDOM.Ref.domRef)}
|
|
29
29
|
className={cx([
|
|
30
30
|
className,
|
|
31
31
|
"appearance-none outline-none transition duration-150 ease-in-out block w-full bg-white text-gray-800 border rounded py-2 px-4 leading-tight focus:z30 relative disabled:bg-gray-200 disabled:text-gray-700",
|
|
@@ -49,11 +49,11 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
49
49
|
UpdateWithSideEffects(
|
|
50
50
|
{
|
|
51
51
|
timeslot: {
|
|
52
|
-
start: state.timeslot.start->
|
|
53
|
-
end_: state.timeslot.start->
|
|
52
|
+
start: state.timeslot.start->DateFns.subDays(timeSlotLength)->DateFns.startOfDay,
|
|
53
|
+
end_: state.timeslot.start->DateFns.subDays(1),
|
|
54
54
|
},
|
|
55
55
|
selectedDay: state.selectedDay->Option.map(_ =>
|
|
56
|
-
state.timeslot.start->
|
|
56
|
+
state.timeslot.start->DateFns.subDays(timeSlotLength)->DateFns.startOfDay
|
|
57
57
|
),
|
|
58
58
|
},
|
|
59
59
|
({state}) => {
|
|
@@ -65,7 +65,7 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
65
65
|
}->queryParams_encode,
|
|
66
66
|
{
|
|
67
67
|
addQueryPrefix: true,
|
|
68
|
-
serializeDate: d => d->
|
|
68
|
+
serializeDate: d => d->DateFns.formatWithPattern("yyyy-MM-dd"),
|
|
69
69
|
},
|
|
70
70
|
),
|
|
71
71
|
)
|
|
@@ -76,11 +76,11 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
76
76
|
UpdateWithSideEffects(
|
|
77
77
|
{
|
|
78
78
|
timeslot: {
|
|
79
|
-
start: state.timeslot.end_->
|
|
80
|
-
end_: state.timeslot.end_->
|
|
79
|
+
start: state.timeslot.end_->DateFns.addDays(1),
|
|
80
|
+
end_: state.timeslot.end_->DateFns.addDays(timeSlotLength),
|
|
81
81
|
},
|
|
82
82
|
selectedDay: state.selectedDay->Option.map(_ =>
|
|
83
|
-
state.timeslot.end_->
|
|
83
|
+
state.timeslot.end_->DateFns.addDays(1)
|
|
84
84
|
),
|
|
85
85
|
},
|
|
86
86
|
({state}) => {
|
|
@@ -92,7 +92,7 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
92
92
|
}->queryParams_encode,
|
|
93
93
|
{
|
|
94
94
|
addQueryPrefix: true,
|
|
95
|
-
serializeDate: d => d->
|
|
95
|
+
serializeDate: d => d->DateFns.formatWithPattern("yyyy-MM-dd"),
|
|
96
96
|
},
|
|
97
97
|
),
|
|
98
98
|
)
|
|
@@ -111,7 +111,7 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
111
111
|
}->queryParams_encode,
|
|
112
112
|
{
|
|
113
113
|
addQueryPrefix: true,
|
|
114
|
-
serializeDate: d => d->
|
|
114
|
+
serializeDate: d => d->DateFns.formatWithPattern("yyyy-MM-dd"),
|
|
115
115
|
},
|
|
116
116
|
),
|
|
117
117
|
)
|
|
@@ -122,11 +122,11 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
122
122
|
() => {
|
|
123
123
|
let defaultTimeslot: Toolkit__Decoders.DatetimeTimeSlot.t = {
|
|
124
124
|
let today = Js.Date.make()
|
|
125
|
-
let timeSlotStart = isSm ?
|
|
125
|
+
let timeSlotStart = isSm ? DateFns.startOfWeek(today, {weekStartsOn: 1}) : today
|
|
126
126
|
|
|
127
127
|
let timeSlotEnd = isSm
|
|
128
|
-
?
|
|
129
|
-
: today->
|
|
128
|
+
? DateFns.endOfWeek(today, {weekStartsOn: 1})
|
|
129
|
+
: today->DateFns.addDays(2)
|
|
130
130
|
{
|
|
131
131
|
start: timeSlotStart,
|
|
132
132
|
end_: timeSlotEnd,
|
|
@@ -136,7 +136,7 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
136
136
|
{
|
|
137
137
|
timeslot: initialStart->Option.mapWithDefault(defaultTimeslot, start => {
|
|
138
138
|
start,
|
|
139
|
-
end_: start->
|
|
139
|
+
end_: start->DateFns.addDays(timeSlotLength - 1),
|
|
140
140
|
}),
|
|
141
141
|
selectedDay: selectedDay->Option.isSome
|
|
142
142
|
? selectedDay
|
|
@@ -158,15 +158,15 @@ let make = (~initialStart=?, ~selectedDay=?, ~children: state => React.element)
|
|
|
158
158
|
icon={<ReactIcons.MdKeyboardArrowLeft size=30 />}
|
|
159
159
|
/>
|
|
160
160
|
<div className="flex items-center mx-2">
|
|
161
|
-
{
|
|
161
|
+
{DateFns.eachDayOfInterval({
|
|
162
162
|
start: timeslot.start,
|
|
163
163
|
end_: timeslot.end_,
|
|
164
164
|
})
|
|
165
165
|
->Array.mapWithIndex((i, day) => {
|
|
166
166
|
let isSelected =
|
|
167
|
-
selectedDay->Option.mapWithDefault(false, sDay =>
|
|
167
|
+
selectedDay->Option.mapWithDefault(false, sDay => DateFns.isSameDay(sDay, day))
|
|
168
168
|
<React.Fragment key={`${i->Int.toString}-day`}>
|
|
169
|
-
{i == 0 || day->
|
|
169
|
+
{i == 0 || day->DateFns.isFirstDayOfMonth
|
|
170
170
|
? <p className="text-xs text-neutral-600 uppercase">
|
|
171
171
|
<FormattedDate value=day month=#short />
|
|
172
172
|
</p>
|
|
@@ -91,15 +91,15 @@ module Time = {
|
|
|
91
91
|
|
|
92
92
|
let duration = switch value {
|
|
93
93
|
| #min(v) =>
|
|
94
|
-
|
|
94
|
+
DateFns.intervalToDuration(
|
|
95
95
|
~interval={
|
|
96
96
|
start: _initialDate,
|
|
97
|
-
end_: _initialDate->
|
|
97
|
+
end_: _initialDate->DateFns.addMinutes(v),
|
|
98
98
|
},
|
|
99
99
|
)
|
|
100
100
|
| #h(v) =>
|
|
101
|
-
|
|
102
|
-
~interval={start: _initialDate, end_: _initialDate->
|
|
101
|
+
DateFns.intervalToDuration(
|
|
102
|
+
~interval={start: _initialDate, end_: _initialDate->DateFns.addHours(v)},
|
|
103
103
|
)
|
|
104
104
|
}
|
|
105
105
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6028,3 +6028,8 @@ module BsPalette = {
|
|
|
6028
6028
|
external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
|
|
6029
6029
|
"BsPalette"
|
|
6030
6030
|
}
|
|
6031
|
+
module VscFolderLibrary = {
|
|
6032
|
+
@module("react-icons/vsc") @react.component
|
|
6033
|
+
external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
|
|
6034
|
+
"VscFolderLibrary"
|
|
6035
|
+
}
|
|
@@ -13,18 +13,18 @@ type optionMessageCb = {inputValue: string}
|
|
|
13
13
|
module ReactSelect = {
|
|
14
14
|
@module("react-select") @react.component
|
|
15
15
|
external make: (
|
|
16
|
-
~defaultMenuIsOpen:
|
|
16
|
+
~defaultMenuIsOpen: bool=?,
|
|
17
17
|
~name: string,
|
|
18
|
-
~autoFocus:
|
|
19
|
-
~isMulti:
|
|
20
|
-
~isDisabled:
|
|
21
|
-
~isLoading:
|
|
22
|
-
~isSearchable:
|
|
23
|
-
~placeholder:
|
|
24
|
-
~className:
|
|
25
|
-
~classNamePrefix:
|
|
26
|
-
~value:
|
|
27
|
-
~defaultValue:
|
|
18
|
+
~autoFocus: bool=?,
|
|
19
|
+
~isMulti: bool=?,
|
|
20
|
+
~isDisabled: bool=?,
|
|
21
|
+
~isLoading: bool=?,
|
|
22
|
+
~isSearchable: bool=?,
|
|
23
|
+
~placeholder: string=?,
|
|
24
|
+
~className: string=?,
|
|
25
|
+
~classNamePrefix: string=?,
|
|
26
|
+
~value: labelOption<'value>=?,
|
|
27
|
+
~defaultValue: 'value=?,
|
|
28
28
|
~onChange: labelOption<'value> => unit,
|
|
29
29
|
~options: array<labelOption<'value>>,
|
|
30
30
|
~noOptionsMessage: option<optionMessage => Js.Nullable.t<string>>=?,
|
|
@@ -36,33 +36,33 @@ module ReactSelectMultiple = {
|
|
|
36
36
|
@module("react-select") @react.component
|
|
37
37
|
external make: (
|
|
38
38
|
~name: string,
|
|
39
|
-
~defaultMenuIsOpen:
|
|
40
|
-
~autoFocus:
|
|
41
|
-
~isMulti:
|
|
42
|
-
~isDisabled:
|
|
43
|
-
~isLoading:
|
|
44
|
-
~isSearchable:
|
|
45
|
-
~placeholder:
|
|
46
|
-
~className:
|
|
47
|
-
~classNamePrefix:
|
|
39
|
+
~defaultMenuIsOpen: bool=?,
|
|
40
|
+
~autoFocus: bool=?,
|
|
41
|
+
~isMulti: bool=?,
|
|
42
|
+
~isDisabled: bool=?,
|
|
43
|
+
~isLoading: bool=?,
|
|
44
|
+
~isSearchable: bool=?,
|
|
45
|
+
~placeholder: string=?,
|
|
46
|
+
~className: string=?,
|
|
47
|
+
~classNamePrefix: string=?,
|
|
48
48
|
~defaultValue: array<labelOption<'value>>=?,
|
|
49
49
|
~onChange: array<labelOption<'value>> => unit,
|
|
50
50
|
~options: array<labelOption<'value>>,
|
|
51
|
-
~noOptionsMessage:
|
|
51
|
+
~noOptionsMessage: optionMessage => Js.Nullable.t<string>=?,
|
|
52
52
|
) => React.element = "default"
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@react.component
|
|
56
56
|
let make = (
|
|
57
57
|
~name: string,
|
|
58
|
-
~autoFocus:
|
|
59
|
-
~isSearchable:
|
|
60
|
-
~defaultMenuIsOpen:
|
|
61
|
-
~isDisabled:
|
|
62
|
-
~isLoading:
|
|
63
|
-
~placeholder:
|
|
64
|
-
~className:
|
|
65
|
-
~classNamePrefix:
|
|
58
|
+
~autoFocus: bool=?,
|
|
59
|
+
~isSearchable: bool=?,
|
|
60
|
+
~defaultMenuIsOpen: bool=?,
|
|
61
|
+
~isDisabled: bool=?,
|
|
62
|
+
~isLoading: bool=?,
|
|
63
|
+
~placeholder: string=?,
|
|
64
|
+
~className: string=?,
|
|
65
|
+
~classNamePrefix: string=?,
|
|
66
66
|
~defaultValue: array<labelOption<'value>>,
|
|
67
67
|
~onChange: array<labelOption<'value>> => unit,
|
|
68
68
|
~options: array<labelOption<'value>>,
|
|
@@ -90,20 +90,20 @@ module ReactAsyncSelect = {
|
|
|
90
90
|
@module("react-select/async") @react.component
|
|
91
91
|
external make: (
|
|
92
92
|
~name: string,
|
|
93
|
-
~autoFocus:
|
|
94
|
-
~isMulti:
|
|
95
|
-
~isDisabled:
|
|
96
|
-
~isLoading:
|
|
97
|
-
~isSearchable:
|
|
98
|
-
~placeholder:
|
|
93
|
+
~autoFocus: bool=?,
|
|
94
|
+
~isMulti: bool=?,
|
|
95
|
+
~isDisabled: bool=?,
|
|
96
|
+
~isLoading: bool=?,
|
|
97
|
+
~isSearchable: bool=?,
|
|
98
|
+
~placeholder: string=?,
|
|
99
99
|
~noOptionsMessage: optionMessageCb => string=?,
|
|
100
100
|
~loadingMessage: optionMessageCb => string=?,
|
|
101
|
-
~className:
|
|
102
|
-
~classNamePrefix:
|
|
103
|
-
~value:
|
|
101
|
+
~className: string=?,
|
|
102
|
+
~classNamePrefix: string=?,
|
|
103
|
+
~value: labelOption<'value>=?,
|
|
104
104
|
~defaultValue: option<'value>=?,
|
|
105
105
|
~onChange: labelOption<'value> => unit,
|
|
106
|
-
~cacheOptions:
|
|
106
|
+
~cacheOptions: bool=?,
|
|
107
107
|
~defaultOptions: option<array<labelOption<'value>>>=?,
|
|
108
108
|
~loadOptions: string => Promise.Js.t<array<labelOption<'value>>, string>,
|
|
109
109
|
) => React.element = "default"
|
|
@@ -113,20 +113,20 @@ module ReactAsyncSelectMultiple = {
|
|
|
113
113
|
@module("react-select/async") @react.component
|
|
114
114
|
external make: (
|
|
115
115
|
~name: string,
|
|
116
|
-
~autoFocus:
|
|
117
|
-
~isMulti:
|
|
118
|
-
~isDisabled:
|
|
119
|
-
~isLoading:
|
|
120
|
-
~isSearchable:
|
|
121
|
-
~placeholder:
|
|
116
|
+
~autoFocus: bool=?,
|
|
117
|
+
~isMulti: bool=?,
|
|
118
|
+
~isDisabled: bool=?,
|
|
119
|
+
~isLoading: bool=?,
|
|
120
|
+
~isSearchable: bool=?,
|
|
121
|
+
~placeholder: string=?,
|
|
122
122
|
~noOptionsMessage: optionMessageCb => string=?,
|
|
123
123
|
~loadingMessage: optionMessageCb => string=?,
|
|
124
|
-
~className:
|
|
125
|
-
~classNamePrefix:
|
|
124
|
+
~className: string=?,
|
|
125
|
+
~classNamePrefix: string=?,
|
|
126
126
|
~value: option<array<labelOption<'value>>>=?,
|
|
127
127
|
~defaultValue: option<'value>=?,
|
|
128
128
|
~onChange: array<labelOption<'value>> => unit,
|
|
129
|
-
~cacheOptions:
|
|
129
|
+
~cacheOptions: bool=?,
|
|
130
130
|
~defaultOptions: option<array<labelOption<'value>>>=?,
|
|
131
131
|
~loadOptions: string => Promise.Js.t<array<labelOption<'value>>, string>,
|
|
132
132
|
) => React.element = "default"
|
|
@@ -144,18 +144,18 @@ module ReactSelectMultipleCreateInput = {
|
|
|
144
144
|
external make: (
|
|
145
145
|
~components: components,
|
|
146
146
|
~inputValue: string,
|
|
147
|
-
~isClearable:
|
|
148
|
-
~isMulti:
|
|
149
|
-
~menuIsOpen:
|
|
147
|
+
~isClearable: bool=?,
|
|
148
|
+
~isMulti: bool=?,
|
|
149
|
+
~menuIsOpen: bool=?,
|
|
150
150
|
~onChange: array<labelOption<'a>> => unit,
|
|
151
151
|
~onInputChange: string => unit,
|
|
152
152
|
~onKeyDown: ReactEvent.Keyboard.t => unit,
|
|
153
|
-
~placeholder:
|
|
153
|
+
~placeholder: string=?,
|
|
154
154
|
~value: array<labelOption<'a>>,
|
|
155
|
-
~isDisabled:
|
|
156
|
-
~isLoading:
|
|
157
|
-
~className:
|
|
158
|
-
~id:
|
|
155
|
+
~isDisabled: bool=?,
|
|
156
|
+
~isLoading: bool=?,
|
|
157
|
+
~className: string=?,
|
|
158
|
+
~id: string=?,
|
|
159
159
|
) => React.element = "default"
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -167,8 +167,8 @@ module ReactSelectMultipleCreateInput = {
|
|
|
167
167
|
~placeholder="",
|
|
168
168
|
~isDisabled=false,
|
|
169
169
|
~isLoading=false,
|
|
170
|
-
~className:
|
|
171
|
-
~id:
|
|
170
|
+
~className: string=?,
|
|
171
|
+
~id: string=?,
|
|
172
172
|
) => {
|
|
173
173
|
let (inputValue, onInputChange) = React.useState(() => "")
|
|
174
174
|
let onInputChange = v => onInputChange(_ => v)
|
|
File without changes
|
|
@@ -4,24 +4,23 @@ module Accordion = {
|
|
|
4
4
|
@module("@reach/accordion") @react.component
|
|
5
5
|
external make: (
|
|
6
6
|
~children: React.element,
|
|
7
|
-
~index:
|
|
8
|
-
~defaultIndex:
|
|
9
|
-
~collapsible:
|
|
10
|
-
~multiple:
|
|
11
|
-
~readOnly:
|
|
12
|
-
~onChange:
|
|
13
|
-
~readOnly: option<bool>=?,
|
|
7
|
+
~index: int=?,
|
|
8
|
+
~defaultIndex: int=?,
|
|
9
|
+
~collapsible: bool=?,
|
|
10
|
+
~multiple: bool=?,
|
|
11
|
+
~readOnly: bool=?,
|
|
12
|
+
~onChange: int => unit=?,
|
|
14
13
|
) => React.element = "Accordion"
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
module AccordionItem = {
|
|
18
17
|
@module("@reach/accordion") @react.component
|
|
19
|
-
external make: (~children: React.element, ~_as:
|
|
18
|
+
external make: (~children: React.element, ~_as: as_=?) => React.element = "AccordionItem"
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
module AccordionPanel = {
|
|
23
22
|
@module("@reach/accordion") @react.component
|
|
24
|
-
external make: (~children: React.element, ~_as:
|
|
23
|
+
external make: (~children: React.element, ~_as: as_=?) => React.element = "AccordionPanel"
|
|
25
24
|
}
|
|
26
25
|
module AccordionButton = {
|
|
27
26
|
@module("@reach/accordion") @react.component
|
|
@@ -36,11 +35,10 @@ module ControlledAccordionMultiple = {
|
|
|
36
35
|
@module("@reach/accordion") @react.component
|
|
37
36
|
external make: (
|
|
38
37
|
~children: React.element,
|
|
39
|
-
~index:
|
|
40
|
-
~defaultIndex:
|
|
41
|
-
~readOnly:
|
|
42
|
-
~onChange:
|
|
43
|
-
~readOnly: option<bool>=?,
|
|
38
|
+
~index: array<int>=?,
|
|
39
|
+
~defaultIndex: int=?,
|
|
40
|
+
~readOnly: bool=?,
|
|
41
|
+
~onChange: int => unit=?,
|
|
44
42
|
) => React.element = "Accordion"
|
|
45
43
|
}
|
|
46
44
|
|
|
@@ -1,43 +1,17 @@
|
|
|
1
1
|
module AlertDialog = {
|
|
2
2
|
type props<'a> = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"children": React.element,
|
|
3
|
+
isOpen: bool,
|
|
4
|
+
onDismiss: unit => unit,
|
|
5
|
+
leastDestructiveRef: React.ref<'a>,
|
|
6
|
+
ariaLabel?: string,
|
|
7
|
+
ariaLabelledby?: string,
|
|
8
|
+
style?: ReactDOM.Style.t,
|
|
9
|
+
className?: string,
|
|
10
|
+
children: React.element,
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
@module("@reach/alert-dialog")
|
|
15
14
|
external make: React.component<props<'a>> = "AlertDialog"
|
|
16
|
-
|
|
17
|
-
let makeProps = (
|
|
18
|
-
~isOpen: bool,
|
|
19
|
-
~onDismiss: unit => unit,
|
|
20
|
-
~leastDestructiveRef: React.ref<'a>,
|
|
21
|
-
~ariaLabel: option<string>=?,
|
|
22
|
-
~ariaLabelledby: option<string>=?,
|
|
23
|
-
// Disable allowPinchZoom for now since it causes an annoying react dom warning
|
|
24
|
-
// ~allowPinchZoom: option(bool)=?,
|
|
25
|
-
~style: option<ReactDOM.Style.t>=?,
|
|
26
|
-
~className: option<string>=?,
|
|
27
|
-
~children: React.element,
|
|
28
|
-
(),
|
|
29
|
-
) =>
|
|
30
|
-
{
|
|
31
|
-
"isOpen": isOpen,
|
|
32
|
-
"onDismiss": onDismiss,
|
|
33
|
-
"leastDestructiveRef": leastDestructiveRef,
|
|
34
|
-
"aria-label": ariaLabel,
|
|
35
|
-
"aria-labelledby": ariaLabelledby,
|
|
36
|
-
"style": style,
|
|
37
|
-
"className": className,
|
|
38
|
-
// "allowPinchZoom": allowPinchZoom,
|
|
39
|
-
"children": children,
|
|
40
|
-
}
|
|
41
15
|
}
|
|
42
16
|
|
|
43
17
|
module AlertDialogLabel = {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
module Dialog = {
|
|
2
2
|
type props = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"children": React.element,
|
|
3
|
+
isOpen: bool,
|
|
4
|
+
onDismiss: unit => unit,
|
|
5
|
+
ariaLabel?: string,
|
|
6
|
+
ariaLabelledby?: string,
|
|
7
|
+
style?: ReactDOM.Style.t,
|
|
8
|
+
className: string,
|
|
9
|
+
children: React.element,
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
@module("@reach/dialog")
|
|
@@ -18,8 +17,6 @@ module Dialog = {
|
|
|
18
17
|
~onDismiss: unit => unit,
|
|
19
18
|
~ariaLabel: option<string>=?,
|
|
20
19
|
~ariaLabelledby: option<string>=?,
|
|
21
|
-
// Disable allowPinchZoom for now since it causes an annoying react dom warning
|
|
22
|
-
// ~allowPinchZoom: option(bool)=?,
|
|
23
20
|
~style: option<ReactDOM.Style.t>=?,
|
|
24
21
|
~className: option<string>=?,
|
|
25
22
|
~children: React.element,
|
|
@@ -168,15 +168,14 @@ module ListboxList = {
|
|
|
168
168
|
|
|
169
169
|
module ListboxOption = {
|
|
170
170
|
type props = {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"children": React.element,
|
|
171
|
+
value?: string,
|
|
172
|
+
label?: string,
|
|
173
|
+
disabled?: bool,
|
|
174
|
+
onMouseUp?: ReactEvent.Mouse.t => unit,
|
|
175
|
+
onKeyDown?: ReactEvent.Keyboard.t => unit,
|
|
176
|
+
style?: ReactDOM.Style.t,
|
|
177
|
+
className?: string,
|
|
178
|
+
children: React.element,
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
@module("@reach/listbox")
|
|
@@ -48,38 +48,15 @@ module MenuItems = {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
module MenuItem = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"onMouseUp": option<ReactEvent.Mouse.t => unit>,
|
|
54
|
-
"onKeyDown": option<ReactEvent.Keyboard.t => unit>,
|
|
55
|
-
"as": option<as_>,
|
|
56
|
-
"style": option<ReactDOM.Style.t>,
|
|
57
|
-
"className": option<string>,
|
|
58
|
-
"children": React.element,
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@module("@reach/menu-button")
|
|
62
|
-
external make: React.component<props> = "MenuItem"
|
|
63
|
-
|
|
64
|
-
let makeProps = (
|
|
51
|
+
@module("@reach/menu-button") @react.component
|
|
52
|
+
external make: (
|
|
65
53
|
~onSelect: unit => unit,
|
|
66
|
-
~onMouseUp:
|
|
67
|
-
~onKeyDown:
|
|
68
|
-
~
|
|
69
|
-
~
|
|
70
|
-
~className: option<string>=?,
|
|
54
|
+
~onMouseUp: ReactEvent.Mouse.t => unit=?,
|
|
55
|
+
~onKeyDown: ReactEvent.Keyboard.t => unit=?,
|
|
56
|
+
~style: ReactDOM.Style.t=?,
|
|
57
|
+
~className: string=?,
|
|
71
58
|
~children: React.element,
|
|
72
|
-
|
|
73
|
-
) =>
|
|
74
|
-
{
|
|
75
|
-
"onSelect": onSelect,
|
|
76
|
-
"onMouseUp": onMouseUp,
|
|
77
|
-
"onKeyDown": onKeyDown,
|
|
78
|
-
"as": as_,
|
|
79
|
-
"style": style,
|
|
80
|
-
"className": className,
|
|
81
|
-
"children": children,
|
|
82
|
-
}
|
|
59
|
+
) => React.element = "MenuItem"
|
|
83
60
|
}
|
|
84
61
|
|
|
85
62
|
module MenuLink = {
|
|
@@ -6,9 +6,3 @@ external make: (
|
|
|
6
6
|
~className: string=?,
|
|
7
7
|
~children: React.element,
|
|
8
8
|
) => React.element = "default"
|
|
9
|
-
|
|
10
|
-
@module("@reach/popover") @react.component
|
|
11
|
-
external positionDefault: 'position = "positionDefault"
|
|
12
|
-
|
|
13
|
-
@module("@reach/popover") @react.component
|
|
14
|
-
external positionMatchWidth: 'position = "positionMatchWidth"
|
|
@@ -4,10 +4,10 @@ module Tabs = {
|
|
|
4
4
|
@module("@reach/tabs") @react.component
|
|
5
5
|
external make: (
|
|
6
6
|
~children: React.element,
|
|
7
|
-
~index:
|
|
8
|
-
~defaultIndex:
|
|
9
|
-
~onChange:
|
|
10
|
-
~className:
|
|
7
|
+
~index: int=?,
|
|
8
|
+
~defaultIndex: int=?,
|
|
9
|
+
~onChange: int => unit=?,
|
|
10
|
+
~className: string=?,
|
|
11
11
|
) => React.element = "Tabs"
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -20,47 +20,38 @@ module TabsRender = {
|
|
|
20
20
|
@module("@reach/tabs") @react.component
|
|
21
21
|
external make: (
|
|
22
22
|
~children: renderProps => React.element,
|
|
23
|
-
~index:
|
|
24
|
-
~defaultIndex:
|
|
25
|
-
~onChange:
|
|
26
|
-
~className:
|
|
23
|
+
~index: int=?,
|
|
24
|
+
~defaultIndex: int=?,
|
|
25
|
+
~onChange: int => unit=?,
|
|
26
|
+
~className: string=?,
|
|
27
27
|
) => React.element = "Tabs"
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
module TabList = {
|
|
31
31
|
@module("@reach/tabs") @react.component
|
|
32
|
-
external make: (
|
|
33
|
-
|
|
34
|
-
~_as: option<as_>=?,
|
|
35
|
-
~className: option<string>=?,
|
|
36
|
-
) => React.element = "TabList"
|
|
32
|
+
external make: (~children: React.element, ~_as: as_=?, ~className: string=?) => React.element =
|
|
33
|
+
"TabList"
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
module TabPanels = {
|
|
40
37
|
@module("@reach/tabs") @react.component
|
|
41
|
-
external make: (
|
|
42
|
-
|
|
43
|
-
~_as: option<as_>=?,
|
|
44
|
-
~className: option<string>=?,
|
|
45
|
-
) => React.element = "TabPanels"
|
|
38
|
+
external make: (~children: React.element, ~_as: as_=?, ~className: string=?) => React.element =
|
|
39
|
+
"TabPanels"
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
module TabPanel = {
|
|
49
43
|
@module("@reach/tabs") @react.component
|
|
50
|
-
external make: (
|
|
51
|
-
|
|
52
|
-
~_as: option<as_>=?,
|
|
53
|
-
~className: option<string>=?,
|
|
54
|
-
) => React.element = "TabPanel"
|
|
44
|
+
external make: (~children: React.element, ~_as: as_=?, ~className: string=?) => React.element =
|
|
45
|
+
"TabPanel"
|
|
55
46
|
}
|
|
56
47
|
|
|
57
48
|
module Tab = {
|
|
58
49
|
@module("@reach/tabs") @react.component
|
|
59
50
|
external make: (
|
|
60
51
|
~children: React.element,
|
|
61
|
-
~_as:
|
|
62
|
-
~className:
|
|
63
|
-
~disabled:
|
|
64
|
-
~isSelected:
|
|
52
|
+
~_as: as_=?,
|
|
53
|
+
~className: string=?,
|
|
54
|
+
~disabled: bool=?,
|
|
55
|
+
~isSelected: bool=?,
|
|
65
56
|
) => React.element = "Tab"
|
|
66
57
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|