@colisweb/rescript-toolkit 2.36.0 → 2.36.3

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/.gitlab-ci.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  include:
2
- - "https://colisweb-open-source.gitlab.io/ci-common/v13.11.1/templates/colisweb.yml"
2
+ - "https://colisweb-idl.gitlab.io/colisweb-open-source/ci-common/v13.18.1/templates/colisweb.yml"
3
3
 
4
4
  # -----------------------------------------------
5
5
  # Test
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.36.0",
3
+ "version": "2.36.3",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build",
@@ -8,7 +8,7 @@
8
8
  "dev": "rescript build -w",
9
9
  "test": "rescript build -with-deps",
10
10
  "build:reacticons": "node tools/extract-react-icons.js",
11
- "build:datetimeinput": "node tools/build-datepicker-style.js",
11
+ "build:scss": "node tools/build-scss.js",
12
12
  "storybook": "STORYBOOK=true start-storybook -p 6006 --no-manager-cache",
13
13
  "build-storybook": "TAILWIND_MODE=build STORYBOOK=true build-storybook"
14
14
  },
@@ -100,7 +100,7 @@ module Make = (StateLenses: Config) => {
100
100
  ~inputRightAddon=?,
101
101
  ~errorClassName=?,
102
102
  ~optionalMessage: option<React.element>=?,
103
- ~autocomplete: option<string>=?,
103
+ ~autoComplete=?,
104
104
  ) => {
105
105
  let (showPassword, setShowPassword) = React.useState(() => false)
106
106
  let isPasswordType = type_->Option.mapWithDefault(false, type_ => type_ === "password")
@@ -139,36 +139,28 @@ module Make = (StateLenses: Config) => {
139
139
  </Toolkit__Ui.Label>
140
140
  }}
141
141
  <div className={cx(["flex flex-row", inputContainerClassName])}>
142
- <Toolkit__Ui_Spread
143
- props={autocomplete->Option.mapWithDefault(Js.Obj.empty(), (
144
- autocomplete: string,
145
- ) =>
146
- {
147
- "autocomplete": autocomplete,
148
- }
149
- )}>
150
- <Toolkit__Ui.TextInput
151
- className={cx([
152
- inputClassName,
153
- inputRightAddon->Option.isSome || isPasswordType ? "rounded-r-none" : "",
154
- ])}
155
- id
156
- value
157
- ?name
158
- type_=?{type_->Option.map(type_ =>
159
- type_ === "password" && showPassword ? "text" : type_
160
- )}
161
- ?disabled
162
- ?placeholder
163
- ?autoFocus
164
- ?step
165
- ?min
166
- ?max
167
- isInvalid
168
- onChange
169
- onBlur
170
- />
171
- </Toolkit__Ui_Spread>
142
+ <Toolkit__Ui.TextInput
143
+ ?autoComplete
144
+ className={cx([
145
+ inputClassName,
146
+ inputRightAddon->Option.isSome || isPasswordType ? "rounded-r-none" : "",
147
+ ])}
148
+ id
149
+ value
150
+ ?name
151
+ type_=?{type_->Option.map(type_ =>
152
+ type_ === "password" && showPassword ? "text" : type_
153
+ )}
154
+ ?disabled
155
+ ?placeholder
156
+ ?autoFocus
157
+ ?step
158
+ ?min
159
+ ?max
160
+ isInvalid
161
+ onChange
162
+ onBlur
163
+ />
172
164
  {type_->Option.mapWithDefault(React.null, type_ => {
173
165
  switch type_ {
174
166
  | "password" =>
@@ -0,0 +1,30 @@
1
+ open ReactIntl
2
+
3
+ module Msg = {
4
+ @@intl.messages
5
+ let copied = {
6
+ id: "clipboard.copied",
7
+ defaultMessage: "Copied to clipboard",
8
+ }
9
+ }
10
+
11
+ @react.component
12
+ let make = (~children, ~textToCopy, ~className="", ~intl) => {
13
+ let ref1Clipboard = Toolkit.Hooks.useClipboard(
14
+ textToCopy,
15
+ ~onCopyNotificationMessage=intl->Intl.formatMessage(Msg.copied),
16
+ )
17
+
18
+ <div className={cx(["rounded-md border border-info-500 bg-info-50", className])}>
19
+ <div className="relative w-full">
20
+ <div
21
+ className="absolute -right-2 top-1 p-1 bg-info-50 text-info-500"
22
+ onClick={_ => {
23
+ ref1Clipboard.copy()
24
+ }}>
25
+ <BsReactIcons.MdContentCopy size=10 />
26
+ </div>
27
+ <div className="py-1 px-2 pr-4"> {children} </div>
28
+ </div>
29
+ </div>
30
+ }
@@ -278,7 +278,7 @@
278
278
  margin-left: 10px;
279
279
  }
280
280
  .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
281
- width: 85px;
281
+ width: auto;
282
282
  }
283
283
  .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
284
284
  .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
package/src/ui/styles.css CHANGED
@@ -1,10 +1,8 @@
1
1
  /* purgecss start ignore */
2
-
3
2
  @import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700");
4
3
  @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700");
5
4
  @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");
6
5
  @import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap");
7
-
8
6
  @import url("~@reach/accordion/styles.css");
9
7
  @import url("~@reach/listbox/styles.css");
10
8
  @import url("~@reach/menu-button/styles.css");
@@ -12,11 +10,9 @@
12
10
  @import url("~@reach/tooltip/styles.css");
13
11
  @import url("~@reach/combobox/styles.css");
14
12
  @import url("~@colisweb/react-day-picker/lib/style.css");
15
-
16
13
  @tailwind base;
17
14
  @tailwind components;
18
15
  @tailwind utilities;
19
-
20
16
  :root {
21
17
  --reach-dialog: 1;
22
18
  }
@@ -37,7 +33,6 @@ body,
37
33
  }
38
34
 
39
35
  /* Reach UI */
40
-
41
36
  [data-reach-popover] {
42
37
  z-index: 90;
43
38
  }
@@ -49,7 +44,7 @@ body,
49
44
  }
50
45
 
51
46
  [data-reach-dialog-overlay] {
52
- background: hsla(0, 0%, 0%, 0.6);
47
+ background: rgba(0, 0, 0, 0.6);
53
48
  z-index: 40;
54
49
  position: fixed;
55
50
  top: 0;
@@ -66,20 +61,25 @@ body,
66
61
  .searchListBox {
67
62
  @apply font-sans text-neutral-600 border-0 outline-none;
68
63
  }
64
+
69
65
  .searchListBox [data-reach-listbox-button] {
70
66
  border-width: 0;
71
67
  width: 100%;
72
68
  }
69
+
73
70
  .searchListBox [data-reach-listbox-button]:focus {
74
71
  box-shadow: none !important;
75
72
  white-space: nowrap;
76
73
  }
74
+
77
75
  .searchListBox [data-reach-listbox-arrow] {
78
76
  margin-left: auto;
79
77
  }
78
+
80
79
  .searchListBox [data-reach-listbox-arrow] {
81
80
  @apply transition-transform ease-in-out duration-150;
82
81
  }
82
+
83
83
  .searchListBox [data-reach-listbox-arrow][data-expanded] {
84
84
  transform: rotateX(180deg);
85
85
  }
@@ -88,9 +88,11 @@ body,
88
88
  @apply shadow-lg rounded border border-gray-200;
89
89
  padding: 0px !important;
90
90
  }
91
+
91
92
  .searchListBox [data-reach-listbox-popover]:focus-within {
92
93
  outline: none !important;
93
94
  }
95
+
94
96
  .listBoxOptionsContainer {
95
97
  max-height: 250px;
96
98
  @apply overflow-y-auto;
@@ -99,13 +101,16 @@ body,
99
101
  .searchListBox [data-reach-listbox-option] {
100
102
  @apply text-sm p-2 cursor-pointer;
101
103
  }
104
+
102
105
  .searchListBox [data-reach-listbox-option]:nth-child(odd) {
103
106
  @apply bg-neutral-100;
104
107
  }
108
+
105
109
  .searchListBox [data-reach-listbox-option]:hover {
106
110
  background-color: #1bb0c4;
107
111
  }
108
- .searchListBox [aria-selected="true"] {
112
+
113
+ .searchListBox [aria-selected=true] {
109
114
  background-color: #1bb0c4 !important;
110
115
  }
111
116
 
@@ -114,7 +119,6 @@ body,
114
119
  }
115
120
 
116
121
  /* Animations */
117
-
118
122
  @keyframes spin {
119
123
  from {
120
124
  transform: rotate(0deg);
@@ -123,7 +127,6 @@ body,
123
127
  transform: rotate(360deg);
124
128
  }
125
129
  }
126
-
127
130
  .spin {
128
131
  animation: spin 0.5s linear infinite;
129
132
  }
@@ -136,7 +139,7 @@ textarea:not([disabled]):not([tabindex="-1"]):focus,
136
139
  button:not([disabled]):not([tabindex="-1"]):focus,
137
140
  iframe:not([tabindex="-1"]):focus,
138
141
  [tabindex]:not([tabindex="-1"]):focus,
139
- [contentEditable="true"]:not([tabindex="-1"]):focus,
142
+ [contentEditable=true]:not([tabindex="-1"]):focus,
140
143
  .focus {
141
144
  outline: none !important;
142
145
  box-shadow: rgba(66, 153, 225, 0.9) 0px 0px 0px 3px;
@@ -154,26 +157,31 @@ iframe:not([tabindex="-1"]):focus,
154
157
  .cw-switch > input:checked ~ .cw-switch-bg {
155
158
  @apply bg-info-500;
156
159
  }
157
- .input-range
158
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
160
+
161
+ .input-range .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
159
162
  background-color: #f0f8ff !important;
160
163
  color: #4a90e2;
161
164
  }
165
+
162
166
  .input-range .DayPicker-Day {
163
167
  border-radius: 0 !important;
164
168
  }
169
+
165
170
  .input-range .DayPicker-Day--start {
166
171
  border-top-left-radius: 50% !important;
167
172
  border-bottom-left-radius: 50% !important;
168
173
  }
174
+
169
175
  .input-range .DayPicker-Day--end {
170
176
  border-top-right-radius: 50% !important;
171
177
  border-bottom-right-radius: 50% !important;
172
178
  }
179
+
173
180
  .input-range .DayPickerInput-Overlay {
174
181
  width: 580px;
175
182
  z-index: 31;
176
183
  }
184
+
177
185
  .input-range-to .DayPickerInput-Overlay {
178
186
  margin-left: -198px;
179
187
  }
@@ -185,12 +193,15 @@ iframe:not([tabindex="-1"]):focus,
185
193
  .react-select__control {
186
194
  @apply border-gray-300 !important;
187
195
  }
196
+
188
197
  .errored .react-select__control {
189
198
  @apply border-danger-500 !important;
190
199
  }
200
+
191
201
  .react-select__indicator-separator {
192
202
  @apply bg-gray-300 !important;
193
203
  }
204
+
194
205
  .react-select__multi-value {
195
206
  @apply bg-gray-300 text-gray-800 !important;
196
207
  }
@@ -198,22 +209,25 @@ iframe:not([tabindex="-1"]):focus,
198
209
  .react-select--is-disabled .react-select__multi-value {
199
210
  @apply opacity-50 !important;
200
211
  }
212
+
201
213
  .react-select__input input {
202
214
  @apply shadow-none !important;
203
215
  }
204
216
 
205
- .Selectable
206
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
217
+ .Selectable .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
207
218
  background-color: #f0f8ff !important;
208
219
  color: #4a90e2;
209
220
  }
221
+
210
222
  .Selectable .DayPicker-Day {
211
223
  border-radius: 0 !important;
212
224
  }
225
+
213
226
  .Selectable .DayPicker-Day--start {
214
227
  border-top-left-radius: 50% !important;
215
228
  border-bottom-left-radius: 50% !important;
216
229
  }
230
+
217
231
  .Selectable .DayPicker-Day--end {
218
232
  border-top-right-radius: 50% !important;
219
233
  border-bottom-right-radius: 50% !important;
@@ -227,6 +241,7 @@ iframe:not([tabindex="-1"]):focus,
227
241
  background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
228
242
  color: white;
229
243
  }
244
+
230
245
  .cw-Tabs [data-selected]:hover {
231
246
  color: white;
232
247
  @apply bg-primary-500;
@@ -235,6 +250,7 @@ iframe:not([tabindex="-1"]):focus,
235
250
  .cw-Tabs [data-reach-tab] {
236
251
  @apply flex items-center justify-center w-full py-3 rounded-full font-display;
237
252
  }
253
+
238
254
  .cw-Tabs [data-reach-tab]:hover {
239
255
  @apply bg-primary-300;
240
256
  }
@@ -243,50 +259,17 @@ iframe:not([tabindex="-1"]):focus,
243
259
  @apply h-10 text-xl;
244
260
  }
245
261
 
246
- [data-reach-accordion-item][data-state="open"] .cw-accordion-icon {
262
+ [data-reach-accordion-item][data-state=open] .cw-accordion-icon {
247
263
  display: block;
248
264
  transform: rotate(90deg);
249
265
  }
250
266
 
251
- [data-reach-accordion-item][data-state="collapsed"]
252
- .cw-accordion-collapsed-hide {
267
+ [data-reach-accordion-item][data-state=collapsed] .cw-accordion-collapsed-hide {
253
268
  display: none !important;
254
269
  }
255
270
 
256
271
  code {
257
- font-family: "Fira Code", monospace !important ;
258
- }
259
-
260
- .DayPicker
261
- .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
262
- background-color: #e7edf3 !important;
263
- color: #15373a;
264
- }
265
-
266
- .DayPicker
267
- .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) {
268
- background-color: #15cbe3 !important;
269
- color: #fff;
270
- }
271
-
272
- .DayPicker .DayPicker-Day {
273
- border-radius: 0 !important;
274
- width: 40px;
275
- height: 40px;
276
- }
277
-
278
- .DayPicker .DayPicker-Day--start {
279
- border-top-left-radius: 50% !important;
280
- border-bottom-left-radius: 50% !important;
281
- background-color: #15cbe3 !important;
282
- color: #fff;
283
- }
284
-
285
- .DayPicker .DayPicker-Day--end {
286
- border-top-right-radius: 50% !important;
287
- border-bottom-right-radius: 50% !important;
288
- background-color: #15cbe3 !important;
289
- color: #fff;
272
+ font-family: "Fira Code", monospace !important;
290
273
  }
291
274
 
292
275
  [data-reach-combobox-input] {
@@ -300,6 +283,7 @@ code {
300
283
  [data-reach-combobox-option] {
301
284
  @apply font-normal truncate text-base font-sans py-2;
302
285
  }
286
+
303
287
  [data-suggested-value] {
304
288
  @apply font-normal;
305
289
  }
@@ -329,7 +313,6 @@ code {
329
313
  border-right-color: #4a7378;
330
314
  }
331
315
  }
332
-
333
316
  input::-webkit-outer-spin-button,
334
317
  input::-webkit-inner-spin-button {
335
318
  -webkit-appearance: none;
@@ -337,8 +320,60 @@ input::-webkit-inner-spin-button {
337
320
  }
338
321
 
339
322
  /* Firefox */
340
- input[type="number"] {
323
+ input[type=number] {
341
324
  -moz-appearance: textfield;
342
325
  }
343
326
 
344
- /* purgecss end ignore */
327
+ /* Day picker */
328
+ .DayPicker .DayPicker-Day {
329
+ width: 40px !important;
330
+ height: 40px !important;
331
+ }
332
+ .DayPicker .DayPicker-Day--selected {
333
+ border-radius: 0 !important;
334
+ }
335
+ .DayPicker .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
336
+ background-color: #e7edf3 !important;
337
+ color: #15373a;
338
+ }
339
+ .DayPicker .DayPicker-Day--selected.DayPicker-Day--start {
340
+ border-top-left-radius: 50% !important;
341
+ border-bottom-left-radius: 50% !important;
342
+ background-color: #15cbe3 !important;
343
+ color: #fff;
344
+ }
345
+ .DayPicker .DayPicker-Day--selected.DayPicker-Day--end {
346
+ border-top-right-radius: 50% !important;
347
+ border-bottom-right-radius: 50% !important;
348
+ background-color: #15cbe3 !important;
349
+ color: #fff;
350
+ }
351
+ .DayPicker .DayPicker-Day--closed {
352
+ border-radius: 0 !important;
353
+ }
354
+ .DayPicker .DayPicker-Day--closed:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
355
+ background-color: #ff634b !important;
356
+ color: #15373a;
357
+ }
358
+ .DayPicker .DayPicker-Day--closed.DayPicker-Day--start:not(.DayPicker-Day--end) {
359
+ border-top-left-radius: 50% !important;
360
+ border-bottom-left-radius: 50% !important;
361
+ border-top-right-radius: 0 !important;
362
+ border-bottom-right-radius: 0 !important;
363
+ background-color: #ff904b !important;
364
+ color: #15373a;
365
+ }
366
+ .DayPicker .DayPicker-Day--closed.DayPicker-Day--end:not(.DayPicker-Day--start) {
367
+ border-top-right-radius: 50% !important;
368
+ border-bottom-right-radius: 50% !important;
369
+ border-top-left-radius: 0 !important;
370
+ border-bottom-left-radius: 0 !important;
371
+ background-color: #ff904b !important;
372
+ color: #15373a;
373
+ }
374
+ .DayPicker .DayPicker-Day--closed.DayPicker-Day--start.DayPicker-Day--end {
375
+ background-color: #ff904b !important;
376
+ color: #15373a;
377
+ }
378
+
379
+ /* purgecss end ignore */
@@ -0,0 +1,371 @@
1
+ /* purgecss start ignore */
2
+
3
+ @import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700");
4
+ @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700");
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");
6
+ @import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap");
7
+
8
+ @import url("~@reach/accordion/styles.css");
9
+ @import url("~@reach/listbox/styles.css");
10
+ @import url("~@reach/menu-button/styles.css");
11
+ @import url("~@reach/tabs/styles.css");
12
+ @import url("~@reach/tooltip/styles.css");
13
+ @import url("~@reach/combobox/styles.css");
14
+ @import url("~@colisweb/react-day-picker/lib/style.css");
15
+
16
+ @tailwind base;
17
+ @tailwind components;
18
+ @tailwind utilities;
19
+
20
+ :root {
21
+ --reach-dialog: 1;
22
+ }
23
+
24
+ body {
25
+ @apply bg-gray-100;
26
+ @apply text-gray-900;
27
+ }
28
+
29
+ html,
30
+ body,
31
+ #root {
32
+ @apply h-full;
33
+ }
34
+
35
+ #root {
36
+ @apply h-full flex flex-col justify-between;
37
+ }
38
+
39
+ /* Reach UI */
40
+
41
+ [data-reach-popover] {
42
+ z-index: 90;
43
+ }
44
+
45
+ [data-reach-dialog-content] {
46
+ padding: 0 !important;
47
+ margin: 10vh auto;
48
+ outline: 0;
49
+ }
50
+
51
+ [data-reach-dialog-overlay] {
52
+ background: hsla(0, 0%, 0%, 0.6);
53
+ z-index: 40;
54
+ position: fixed;
55
+ top: 0;
56
+ right: 0;
57
+ bottom: 0;
58
+ left: 0;
59
+ overflow: auto;
60
+ }
61
+
62
+ [data-reach-menu-item][data-selected] {
63
+ @apply bg-gray-200 text-gray-900;
64
+ }
65
+
66
+ .searchListBox {
67
+ @apply font-sans text-neutral-600 border-0 outline-none;
68
+ }
69
+ .searchListBox [data-reach-listbox-button] {
70
+ border-width: 0;
71
+ width: 100%;
72
+ }
73
+ .searchListBox [data-reach-listbox-button]:focus {
74
+ box-shadow: none !important;
75
+ white-space: nowrap;
76
+ }
77
+ .searchListBox [data-reach-listbox-arrow] {
78
+ margin-left: auto;
79
+ }
80
+ .searchListBox [data-reach-listbox-arrow] {
81
+ @apply transition-transform ease-in-out duration-150;
82
+ }
83
+ .searchListBox [data-reach-listbox-arrow][data-expanded] {
84
+ transform: rotateX(180deg);
85
+ }
86
+
87
+ .searchListBox [data-reach-listbox-popover] {
88
+ @apply shadow-lg rounded border border-gray-200;
89
+ padding: 0px !important;
90
+ }
91
+ .searchListBox [data-reach-listbox-popover]:focus-within {
92
+ outline: none !important;
93
+ }
94
+ .listBoxOptionsContainer {
95
+ max-height: 250px;
96
+ @apply overflow-y-auto;
97
+ }
98
+
99
+ .searchListBox [data-reach-listbox-option] {
100
+ @apply text-sm p-2 cursor-pointer;
101
+ }
102
+ .searchListBox [data-reach-listbox-option]:nth-child(odd) {
103
+ @apply bg-neutral-100;
104
+ }
105
+ .searchListBox [data-reach-listbox-option]:hover {
106
+ background-color: #1bb0c4;
107
+ }
108
+ .searchListBox [aria-selected="true"] {
109
+ background-color: #1bb0c4 !important;
110
+ }
111
+
112
+ [data-reach-tooltip] {
113
+ border: none;
114
+ }
115
+
116
+ /* Animations */
117
+
118
+ @keyframes spin {
119
+ from {
120
+ transform: rotate(0deg);
121
+ }
122
+ to {
123
+ transform: rotate(360deg);
124
+ }
125
+ }
126
+
127
+ .spin {
128
+ animation: spin 0.5s linear infinite;
129
+ }
130
+
131
+ a[href]:not([tabindex="-1"]):focus,
132
+ area[href]:not([tabindex="-1"]):focus,
133
+ input:not([disabled]):not([tabindex="-1"]):focus,
134
+ select:not([disabled]):not([tabindex="-1"]):focus,
135
+ textarea:not([disabled]):not([tabindex="-1"]):focus,
136
+ button:not([disabled]):not([tabindex="-1"]):focus,
137
+ iframe:not([tabindex="-1"]):focus,
138
+ [tabindex]:not([tabindex="-1"]):focus,
139
+ [contentEditable="true"]:not([tabindex="-1"]):focus,
140
+ .focus {
141
+ outline: none !important;
142
+ box-shadow: rgba(66, 153, 225, 0.9) 0px 0px 0px 3px;
143
+ }
144
+
145
+ .no-focus {
146
+ outline: none !important;
147
+ box-shadow: none !important;
148
+ }
149
+
150
+ .cw-switch > input:checked ~ .cw-switch-bullet {
151
+ transform: translateX(20px);
152
+ }
153
+
154
+ .cw-switch > input:checked ~ .cw-switch-bg {
155
+ @apply bg-info-500;
156
+ }
157
+ .input-range
158
+ .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
159
+ background-color: #f0f8ff !important;
160
+ color: #4a90e2;
161
+ }
162
+ .input-range .DayPicker-Day {
163
+ border-radius: 0 !important;
164
+ }
165
+ .input-range .DayPicker-Day--start {
166
+ border-top-left-radius: 50% !important;
167
+ border-bottom-left-radius: 50% !important;
168
+ }
169
+ .input-range .DayPicker-Day--end {
170
+ border-top-right-radius: 50% !important;
171
+ border-bottom-right-radius: 50% !important;
172
+ }
173
+ .input-range .DayPickerInput-Overlay {
174
+ width: 580px;
175
+ z-index: 31;
176
+ }
177
+ .input-range-to .DayPickerInput-Overlay {
178
+ margin-left: -198px;
179
+ }
180
+
181
+ .input-range .DayPickerInput input {
182
+ @apply p-2 border rounded-sm cursor-pointer;
183
+ }
184
+
185
+ .react-select__control {
186
+ @apply border-gray-300 #{!important};
187
+ }
188
+ .errored .react-select__control {
189
+ @apply border-danger-500 #{!important};
190
+ }
191
+ .react-select__indicator-separator {
192
+ @apply bg-gray-300 #{!important};
193
+ }
194
+ .react-select__multi-value {
195
+ @apply bg-gray-300 text-gray-800 #{!important};
196
+ }
197
+
198
+ .react-select--is-disabled .react-select__multi-value {
199
+ @apply opacity-50 #{!important};
200
+ }
201
+ .react-select__input input {
202
+ @apply shadow-none #{!important};
203
+ }
204
+
205
+ .Selectable
206
+ .DayPicker-Day--selected:not(.DayPicker-Day--start):not(.DayPicker-Day--end):not(.DayPicker-Day--outside) {
207
+ background-color: #f0f8ff !important;
208
+ color: #4a90e2;
209
+ }
210
+ .Selectable .DayPicker-Day {
211
+ border-radius: 0 !important;
212
+ }
213
+ .Selectable .DayPicker-Day--start {
214
+ border-top-left-radius: 50% !important;
215
+ border-bottom-left-radius: 50% !important;
216
+ }
217
+ .Selectable .DayPicker-Day--end {
218
+ border-top-right-radius: 50% !important;
219
+ border-bottom-right-radius: 50% !important;
220
+ }
221
+
222
+ .cw-Tabs {
223
+ @apply flex flex-row bg-gray-200 rounded-full h-6 text-sm mb-2;
224
+ }
225
+
226
+ .cw-Tabs [data-selected] {
227
+ background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
228
+ color: white;
229
+ }
230
+ .cw-Tabs [data-selected]:hover {
231
+ color: white;
232
+ @apply bg-primary-500;
233
+ }
234
+
235
+ .cw-Tabs [data-reach-tab] {
236
+ @apply flex items-center justify-center w-full py-3 rounded-full font-display;
237
+ }
238
+ .cw-Tabs [data-reach-tab]:hover {
239
+ @apply bg-primary-300;
240
+ }
241
+
242
+ .cw-Tabs.cw-Tabs--big {
243
+ @apply h-10 text-xl;
244
+ }
245
+
246
+ [data-reach-accordion-item][data-state="open"] .cw-accordion-icon {
247
+ display: block;
248
+ transform: rotate(90deg);
249
+ }
250
+
251
+ [data-reach-accordion-item][data-state="collapsed"]
252
+ .cw-accordion-collapsed-hide {
253
+ display: none !important;
254
+ }
255
+
256
+ code {
257
+ font-family: "Fira Code", monospace !important ;
258
+ }
259
+
260
+ [data-reach-combobox-input] {
261
+ @apply 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:z-30 relative disabled:bg-gray-200 disabled:text-gray-700;
262
+ }
263
+
264
+ [data-reach-combobox-popover] {
265
+ @apply bg-white border-gray-200 rounded-b p-2 mt-1 shadow;
266
+ }
267
+
268
+ [data-reach-combobox-option] {
269
+ @apply font-normal truncate text-base font-sans py-2;
270
+ }
271
+ [data-suggested-value] {
272
+ @apply font-normal;
273
+ }
274
+
275
+ [data-user-value] {
276
+ @apply font-semibold;
277
+ }
278
+
279
+ .sidenav {
280
+ top: 64px;
281
+ height: calc(100% - 64px) !important;
282
+ }
283
+
284
+ @media screen and (min-width: 600px) {
285
+ .sidenav.sidenav--closed .sidenav-link:hover .sidenav-link-tooltip {
286
+ visibility: visible;
287
+ opacity: 100%;
288
+ }
289
+
290
+ .sidenav.sidenav--closed .sidenav-link .sidenav-link-tooltip:before {
291
+ content: "";
292
+ position: absolute;
293
+ left: 0;
294
+ top: 50%;
295
+ transform: translate(-100%, -50%);
296
+ border: 6px solid transparent;
297
+ border-right-color: #4a7378;
298
+ }
299
+ }
300
+
301
+ input::-webkit-outer-spin-button,
302
+ input::-webkit-inner-spin-button {
303
+ -webkit-appearance: none;
304
+ margin: 0;
305
+ }
306
+
307
+ /* Firefox */
308
+ input[type="number"] {
309
+ -moz-appearance: textfield;
310
+ }
311
+
312
+ /* Day picker */
313
+ .DayPicker {
314
+ .DayPicker-Day {
315
+ width: 40px !important;
316
+ height: 40px !important;
317
+ }
318
+
319
+ .DayPicker-Day--selected{
320
+ border-radius: 0 !important;
321
+
322
+ &:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
323
+ background-color: #e7edf3 !important;
324
+ color: #15373a;
325
+ }
326
+ &.DayPicker-Day--start {
327
+ border-top-left-radius: 50% !important;
328
+ border-bottom-left-radius: 50% !important;
329
+ background-color: #15cbe3 !important;
330
+ color: #fff;
331
+ }
332
+ &.DayPicker-Day--end {
333
+ border-top-right-radius: 50% !important;
334
+ border-bottom-right-radius: 50% !important;
335
+ background-color: #15cbe3 !important;
336
+ color: #fff;
337
+ }
338
+ }
339
+ .DayPicker-Day--closed{
340
+ border-radius: 0 !important;
341
+ &:not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
342
+ background-color: #ff634b !important;
343
+ color: #15373a;
344
+ }
345
+ &.DayPicker-Day--start:not(.DayPicker-Day--end) {
346
+ border-top-left-radius: 50% !important;
347
+ border-bottom-left-radius: 50% !important;
348
+ border-top-right-radius: 0 !important;
349
+ border-bottom-right-radius: 0 !important;
350
+ background-color: #ff904b !important;
351
+ color: #15373a;
352
+ }
353
+ &.DayPicker-Day--end:not(.DayPicker-Day--start) {
354
+ border-top-right-radius: 50% !important;
355
+ border-bottom-right-radius: 50% !important;
356
+ border-top-left-radius: 0 !important;
357
+ border-bottom-left-radius: 0 !important;
358
+ background-color: #ff904b !important;
359
+ color: #15373a;
360
+ }
361
+ &.DayPicker-Day--start.DayPicker-Day--end {
362
+ background-color: #ff904b !important;
363
+ color: #15373a;
364
+ }
365
+ }
366
+ }
367
+
368
+
369
+
370
+ /* purgecss end ignore */
371
+
@@ -5902,11 +5902,13 @@ module IoIosCloseCircle = {
5902
5902
 
5903
5903
  module AiFillEyeInvisible = {
5904
5904
  @module("react-icons/ai") @react.component
5905
- external make: (~size: int=?) => React.element = "AiFillEyeInvisible"
5905
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5906
+ "AiFillEyeInvisible"
5906
5907
  }
5907
5908
  module AiFillEye = {
5908
5909
  @module("react-icons/ai") @react.component
5909
- external make: (~size: int=?) => React.element = "AiFillEye"
5910
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5911
+ "AiFillEye"
5910
5912
  }
5911
5913
 
5912
5914
  module FaCalendarCheck = {
@@ -5920,3 +5922,55 @@ module FaUserCog = {
5920
5922
  external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5921
5923
  "FaUserCog"
5922
5924
  }
5925
+
5926
+ module FaRedo = {
5927
+ @module("react-icons/fa") @react.component
5928
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaRedo"
5929
+ }
5930
+
5931
+ module FaWarehouse = {
5932
+ @module("react-icons/fa") @react.component
5933
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5934
+ "FaWarehouse"
5935
+ }
5936
+
5937
+ module FaRecycle = {
5938
+ @module("react-icons/fa") @react.component
5939
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5940
+ "FaRecycle"
5941
+ }
5942
+ module FaPlug = {
5943
+ @module("react-icons/fa") @react.component
5944
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5945
+ "FaRecycle"
5946
+ }
5947
+ module FaTools = {
5948
+ @module("react-icons/fa") @react.component
5949
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaTools"
5950
+ }
5951
+
5952
+ module MdOutlineFileDownload = {
5953
+ @module("react-icons/md") @react.component
5954
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5955
+ "MdOutlineFileDownload"
5956
+ }
5957
+
5958
+ module FaServer = {
5959
+ @module("react-icons/fa") @react.component
5960
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5961
+ "FaServer"
5962
+ }
5963
+ module FaLockOpen = {
5964
+ @module("react-icons/fa") @react.component
5965
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
5966
+ "FaLockOpen"
5967
+ }
5968
+ module FaLock = {
5969
+ @module("react-icons/fa") @react.component
5970
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaLock"
5971
+ }
5972
+
5973
+ module FaCog = {
5974
+ @module("react-icons/fa") @react.component
5975
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaCog"
5976
+ }
@@ -0,0 +1,23 @@
1
+ const sass = require("sass");
2
+ const path = require("path");
3
+ const fs = require("fs");
4
+ const appDirectory = fs.realpathSync(process.cwd());
5
+
6
+ const FILENAMES = ["Toolkit__Ui_DatetimeInput", "styles"];
7
+
8
+ for (const FILENAME of FILENAMES) {
9
+ const file = path.resolve(appDirectory, `src/ui/${FILENAME}.scss`);
10
+ const outFile = path.resolve(appDirectory, `src/ui/${FILENAME}.css`);
11
+
12
+ const result = sass.renderSync({
13
+ file,
14
+ includePaths: [path.resolve(appDirectory, "node_modules")],
15
+ outFile,
16
+ });
17
+
18
+ fs.writeFile(outFile, result.css, function (err) {
19
+ if (!err) {
20
+ console.log("✅ done");
21
+ }
22
+ });
23
+ }
@@ -1,20 +0,0 @@
1
- const sass = require("sass");
2
- const path = require("path");
3
- const fs = require("fs");
4
- const appDirectory = fs.realpathSync(process.cwd());
5
-
6
- const FILENAME = "Toolkit__Ui_DatetimeInput";
7
- const file = path.resolve(appDirectory, `src/ui/${FILENAME}.scss`);
8
- const outFile = path.resolve(appDirectory, `src/ui/${FILENAME}.css`);
9
-
10
- const result = sass.renderSync({
11
- file,
12
- includePaths: [path.resolve(appDirectory, "node_modules")],
13
- outFile,
14
- });
15
-
16
- fs.writeFile(outFile, result.css, function (err) {
17
- if (!err) {
18
- console.log("✅ done");
19
- }
20
- });