@colisweb/rescript-toolkit 4.12.1 → 4.14.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/src/ui/styles.css CHANGED
@@ -1,11 +1,10 @@
1
1
  /* purgecss start ignore */
2
+ @import url("./tailwind-init.css");
2
3
  @import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700");
3
4
  @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700");
4
5
  @import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");
5
6
  @import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap");
6
- @import url("@colisweb/react-day-picker/lib/style.css");
7
- @tailwind base;
8
- @tailwind components;
7
+ @import url("react-day-picker/dist/style.css");
9
8
 
10
9
  @layer components {
11
10
  .cw-tab-list {
@@ -23,7 +22,6 @@
23
22
  }
24
23
  }
25
24
 
26
- @tailwind utilities;
27
25
  :root {
28
26
  --reach-dialog: 1;
29
27
  }
@@ -43,8 +41,6 @@ body,
43
41
  @apply h-full flex flex-col justify-between;
44
42
  }
45
43
 
46
- /* Reach UI */
47
-
48
44
  /* Animations */
49
45
  @keyframes spin {
50
46
  from {
@@ -65,6 +61,7 @@ select:not([disabled]):not([tabindex="-1"]):focus,
65
61
  textarea:not([disabled]):not([tabindex="-1"]):focus,
66
62
  button:not([disabled]):not([tabindex="-1"]):focus,
67
63
  iframe:not([tabindex="-1"]):focus,
64
+ [tabindex]:not([tabindex="-1"]):focus,
68
65
  [contentEditable="true"]:not([tabindex="-1"]):focus,
69
66
  .focus {
70
67
  outline: none !important;
@@ -88,41 +85,6 @@ iframe:not([tabindex="-1"]):focus,
88
85
  @apply bg-info-500;
89
86
  }
90
87
 
91
- .input-range
92
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(
93
- .DayPicker-Day--end
94
- ):not(.DayPicker-Day--outside) {
95
- background-color: #f0f8ff !important;
96
- color: #4a90e2;
97
- }
98
-
99
- .input-range .DayPicker-Day {
100
- border-radius: 0 !important;
101
- }
102
-
103
- .input-range .DayPicker-Day--start {
104
- border-top-left-radius: 50% !important;
105
- border-bottom-left-radius: 50% !important;
106
- }
107
-
108
- .input-range .DayPicker-Day--end {
109
- border-top-right-radius: 50% !important;
110
- border-bottom-right-radius: 50% !important;
111
- }
112
-
113
- .input-range .DayPickerInput-Overlay {
114
- width: 580px;
115
- z-index: 31;
116
- }
117
-
118
- .input-range-to .DayPickerInput-Overlay {
119
- margin-left: -198px;
120
- }
121
-
122
- .input-range .DayPickerInput input {
123
- @apply p-2 border rounded-sm cursor-pointer;
124
- }
125
-
126
88
  .react-select__control {
127
89
  @apply border-gray-300 !important;
128
90
  }
@@ -147,26 +109,46 @@ iframe:not([tabindex="-1"]):focus,
147
109
  @apply shadow-none !important;
148
110
  }
149
111
 
150
- .Selectable
151
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(
152
- .DayPicker-Day--end
153
- ):not(.DayPicker-Day--outside) {
154
- background-color: #f0f8ff !important;
155
- color: #4a90e2;
112
+ .cw-Tabs {
113
+ @apply flex flex-row bg-gray-200 rounded-full h-6 text-sm mb-2;
114
+ }
115
+
116
+ .cw-Tabs [data-selected] {
117
+ background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
118
+ color: white;
119
+ }
120
+
121
+ .cw-Tabs [data-selected]:hover {
122
+ color: white;
123
+ @apply bg-primary-500;
124
+ }
125
+
126
+ .cw-Tabs [data-reach-tab] {
127
+ @apply flex items-center justify-center w-full py-3 rounded-full font-display;
156
128
  }
157
129
 
158
- .Selectable .DayPicker-Day {
159
- border-radius: 0 !important;
130
+ .cw-Tabs [data-reach-tab]:hover {
131
+ @apply bg-primary-300;
132
+ }
133
+
134
+ .cw-Tabs.cw-Tabs--big {
135
+ @apply h-10 text-xl;
136
+ }
137
+
138
+ .cw-ButtonGroup > button {
139
+ @apply whitespace-nowrap h-full px-3 md:px-4 flex items-center justify-center rounded-3xl py-3;
140
+ }
141
+ .cw-ButtonGroup > button:hover {
142
+ @apply bg-primary-300;
160
143
  }
161
144
 
162
- .Selectable .DayPicker-Day--start {
163
- border-top-left-radius: 50% !important;
164
- border-bottom-left-radius: 50% !important;
145
+ .cw-ButtonGroup > button.selected {
146
+ background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
147
+ color: white;
165
148
  }
166
149
 
167
- .Selectable .DayPicker-Day--end {
168
- border-top-right-radius: 50% !important;
169
- border-bottom-right-radius: 50% !important;
150
+ .cw-Checkbox > input:checked + .checkmark > * {
151
+ @apply opacity-100;
170
152
  }
171
153
 
172
154
  code {
@@ -203,7 +185,6 @@ code {
203
185
  visibility: visible;
204
186
  opacity: 100%;
205
187
  }
206
-
207
188
  .sidenav.sidenav--closed .sidenav-link .sidenav-link-tooltip:before {
208
189
  content: "";
209
190
  position: absolute;
@@ -220,85 +201,55 @@ input::-webkit-inner-spin-button {
220
201
  margin: 0;
221
202
  }
222
203
 
223
- /* Firefox */
224
- input[type="number"] {
225
- -moz-appearance: textfield;
226
- }
204
+ /* React day picker */
227
205
 
228
- /* Day picker */
229
- .DayPicker .DayPicker-Day {
230
- width: 40px !important;
231
- height: 40px !important;
232
- }
233
- .DayPicker .DayPicker-Day--selected {
234
- border-radius: 0 !important;
235
- }
236
- .DayPicker
237
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
238
- background-color: #e7edf3 !important;
239
- color: #15373a;
240
- }
241
- .DayPicker .DayPicker-Day--selected.DayPicker-Day--start {
242
- border-top-left-radius: 50% !important;
243
- border-bottom-left-radius: 50% !important;
244
- background-color: #15cbe3 !important;
245
- color: #fff;
246
- }
247
- .DayPicker .DayPicker-Day--selected.DayPicker-Day--end {
248
- border-top-right-radius: 50% !important;
249
- border-bottom-right-radius: 50% !important;
250
- background-color: #15cbe3 !important;
251
- color: #fff;
252
- }
253
- .DayPicker .DayPicker-Day--closed {
254
- border-radius: 0 !important;
255
- }
256
- .DayPicker
257
- .DayPicker-Day--closed:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
258
- background-color: #ff634b !important;
259
- color: #15373a;
260
- }
261
- .DayPicker
262
- .DayPicker-Day--closed.DayPicker-Day--start:not(.DayPicker-Day--end) {
263
- border-top-left-radius: 50% !important;
264
- border-bottom-left-radius: 50% !important;
265
- border-top-right-radius: 0 !important;
266
- border-bottom-right-radius: 0 !important;
267
- background-color: #ff904b !important;
268
- color: #15373a;
269
- }
270
- .DayPicker
271
- .DayPicker-Day--closed.DayPicker-Day--end:not(.DayPicker-Day--start) {
272
- border-top-right-radius: 50% !important;
273
- border-bottom-right-radius: 50% !important;
274
- border-top-left-radius: 0 !important;
275
- border-bottom-left-radius: 0 !important;
276
- background-color: #ff904b !important;
277
- color: #15373a;
278
- }
279
- .DayPicker .DayPicker-Day--closed.DayPicker-Day--start.DayPicker-Day--end {
280
- background-color: #ff904b !important;
281
- color: #15373a;
206
+ .rdp-caption_label {
207
+ @apply text-neutral-700 capitalize;
282
208
  }
283
209
 
284
- .cw-ButtonGroup > button {
285
- @apply whitespace-nowrap h-full px-3 md:px-4 flex items-center justify-center rounded-3xl py-3;
210
+ .rdp-caption_label {
211
+ @apply text-neutral-700;
286
212
  }
287
- .cw-ButtonGroup > button:hover {
288
- @apply bg-primary-300;
213
+ .rdp-day {
214
+ @apply text-neutral-700;
289
215
  }
290
-
291
- .cw-ButtonGroup > button.selected {
292
- background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
293
- color: white;
216
+ .rdp-day_today {
217
+ @apply text-danger-700;
218
+ }
219
+ .rdp-head_cell {
220
+ @apply text-neutral-600;
221
+ }
222
+ .rdp-day_selected,
223
+ .rdp-day_selected:hover {
224
+ @apply bg-primary-500 text-white;
225
+ }
226
+ .rdp-day_range_middle,
227
+ .rdp-day_range_middle:hover {
228
+ @apply bg-gray-300 text-black;
229
+ }
230
+ .rdp-day_selected.rdp-day_range_start:not(.rdp-day_range_end),
231
+ .rdp-day_range_middle:hover {
232
+ @apply !rounded-tr-none !rounded-br-none;
294
233
  }
295
234
 
296
- .cw-Checkbox > input:checked + .checkmark > * {
297
- @apply opacity-100;
235
+ .rdp-day_closed,
236
+ .rdp-day_closed:hover {
237
+ @apply !bg-[#ff904b] !text-black;
238
+ }
239
+ .rdp-day_closed:not(.rdp-day_range_start):not(.rdp-day_range_end),
240
+ .rdp-day_closed:not(.rdp-day_range_start):not(.rdp-day_range_end):hover {
241
+ @apply !bg-[#ff634b] !text-black !rounded-none;
242
+ }
243
+ .rdp-button[disabled].rdp-day_closed {
244
+ @apply !opacity-100;
245
+ }
246
+ .rdp-button[disabled] {
247
+ @apply cursor-not-allowed;
298
248
  }
299
249
 
300
- .cw-Datepicker.DayPicker .DayPicker-Day.DayPicker-Day--selected {
301
- @apply !bg-primary-500 !rounded-full text-white;
250
+ /* Firefox */
251
+ input[type="number"] {
252
+ -moz-appearance: textfield;
302
253
  }
303
254
 
304
255
  /* purgecss end ignore */
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -46,6 +46,8 @@ module DomElement = {
46
46
  bottom: float,
47
47
  }
48
48
  @send external getBoundingClientRect: Dom.element => rect = "getBoundingClientRect"
49
+
50
+ @send external focus: Dom.element => unit = "focus"
49
51
  }
50
52
 
51
53
  @val
@@ -33,6 +33,7 @@ module DomElement: {
33
33
  bottom: float,
34
34
  }
35
35
  let getBoundingClientRect: Dom.element => rect
36
+ let focus: Dom.element => unit
36
37
  }
37
38
 
38
39
  let innerWidth: int