@colisweb/rescript-toolkit 2.3.0 → 2.5.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/.gitlab-ci.yml +4 -4
- package/package.json +27 -28
- package/postcss.config.js +0 -1
- package/src/decoders/Toolkit__Decoders.res +5 -0
- package/src/router/Toolkit__Router.res +1 -1
- package/src/tailwind/tailwind.config.js +2 -73
- package/src/ui/Toolkit__Ui_Table.res +3 -2
- package/src/ui/styles.css +3 -2
package/.gitlab-ci.yml
CHANGED
|
@@ -4,12 +4,12 @@ include:
|
|
|
4
4
|
# -----------------------------------------------
|
|
5
5
|
# Test
|
|
6
6
|
# -----------------------------------------------
|
|
7
|
-
|
|
7
|
+
rescript compilation:
|
|
8
8
|
tags:
|
|
9
9
|
- aws
|
|
10
10
|
extends: .rules-except-for-tags
|
|
11
11
|
stage: test
|
|
12
|
-
image: node:lts-
|
|
12
|
+
image: node:lts-bullseye
|
|
13
13
|
cache:
|
|
14
14
|
key: "yarn-$CI_COMMIT_REF_SLUG"
|
|
15
15
|
paths:
|
|
@@ -29,7 +29,7 @@ version:
|
|
|
29
29
|
# Publish npm
|
|
30
30
|
# -----------------------------------------------
|
|
31
31
|
publish rescript-toolkit:
|
|
32
|
-
image: node:lts-
|
|
32
|
+
image: node:lts-bullseye
|
|
33
33
|
extends: .rules-only-for-tags
|
|
34
34
|
tags:
|
|
35
35
|
- aws
|
|
@@ -49,7 +49,7 @@ pages:
|
|
|
49
49
|
tags:
|
|
50
50
|
- aws
|
|
51
51
|
stage: deploy
|
|
52
|
-
image: node:lts-
|
|
52
|
+
image: node:lts-bullseye
|
|
53
53
|
script:
|
|
54
54
|
- export NPM_TOKEN=${NPM_TOKEN:-undefined}
|
|
55
55
|
- yarn
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colisweb/rescript-toolkit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rescript clean",
|
|
6
6
|
"build": "rescript build",
|
|
7
7
|
"watch": "rescript build -w",
|
|
8
8
|
"dev": "rescript build -w",
|
|
9
|
-
"test": "rescript build",
|
|
9
|
+
"test": "rescript build -with-deps",
|
|
10
10
|
"build:reacticons": "node tools/extract-react-icons.js",
|
|
11
11
|
"build:datetimeinput": "node tools/build-datepicker-style.js",
|
|
12
12
|
"storybook": "STORYBOOK=true start-storybook -p 6006 --no-manager-cache",
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@colisweb/react-day-picker": "7.4.16",
|
|
26
26
|
"@reach/accordion": "0.16.1",
|
|
27
|
-
"@reach/alert-dialog": "0.16.
|
|
27
|
+
"@reach/alert-dialog": "0.16.2",
|
|
28
28
|
"@reach/auto-id": "0.16.0",
|
|
29
|
-
"@reach/combobox": "0.16.
|
|
30
|
-
"@reach/dialog": "0.16.
|
|
31
|
-
"@reach/disclosure": "0.16.
|
|
32
|
-
"@reach/listbox": "0.16.
|
|
33
|
-
"@reach/menu-button": "0.16.
|
|
34
|
-
"@reach/popover": "0.16.
|
|
35
|
-
"@reach/portal": "0.16.
|
|
36
|
-
"@reach/tabs": "0.16.
|
|
37
|
-
"@reach/tooltip": "0.16.
|
|
29
|
+
"@reach/combobox": "0.16.5",
|
|
30
|
+
"@reach/dialog": "0.16.2",
|
|
31
|
+
"@reach/disclosure": "0.16.2",
|
|
32
|
+
"@reach/listbox": "0.16.2",
|
|
33
|
+
"@reach/menu-button": "0.16.2",
|
|
34
|
+
"@reach/popover": "0.16.2",
|
|
35
|
+
"@reach/portal": "0.16.2",
|
|
36
|
+
"@reach/tabs": "0.16.4",
|
|
37
|
+
"@reach/tooltip": "0.16.2",
|
|
38
38
|
"@reach/visually-hidden": "0.16.0",
|
|
39
39
|
"@rescript/react": "0.10.3",
|
|
40
|
-
"autoprefixer": "10.
|
|
40
|
+
"autoprefixer": "10.4.0",
|
|
41
41
|
"axios": "0.24.0",
|
|
42
42
|
"bs-axios": "0.0.43",
|
|
43
43
|
"bs-css": "13.4.0",
|
|
@@ -45,36 +45,35 @@
|
|
|
45
45
|
"case": "1.6.3",
|
|
46
46
|
"click-outside-hook": "1.1.0",
|
|
47
47
|
"copy-to-clipboard": "3.3.1",
|
|
48
|
-
"date-fns": "2.
|
|
48
|
+
"date-fns": "2.27.0",
|
|
49
49
|
"decco": "1.5.0",
|
|
50
50
|
"dedent": "0.7.0",
|
|
51
51
|
"downshift": "5.2.5",
|
|
52
|
-
"highlight.js": "10.7.2",
|
|
53
52
|
"lenses-ppx": "6.1.10",
|
|
54
53
|
"list-selectors": "2.0.0",
|
|
55
|
-
"postcss": "8.
|
|
54
|
+
"postcss": "8.4.5",
|
|
56
55
|
"postcss-loader": "4.2.0",
|
|
57
56
|
"postcss-preset-env": "6.7.0",
|
|
58
|
-
"prismjs": "1.
|
|
59
|
-
"react-datepicker": "3.8.0",
|
|
57
|
+
"prismjs": "1.25.0",
|
|
60
58
|
"react-icons": "4.3.1",
|
|
61
|
-
"react-select": "
|
|
59
|
+
"react-select": "5.2.1",
|
|
62
60
|
"react-table": "7.7.0",
|
|
63
61
|
"react-use": "17.3.1",
|
|
64
|
-
"reason-promise": "1.1.
|
|
62
|
+
"reason-promise": "1.1.5",
|
|
65
63
|
"reason-react": "0.9.1",
|
|
66
64
|
"reschema": "1.3.1",
|
|
67
65
|
"rescript": "9.1.4",
|
|
68
66
|
"rescript-classnames": "6.0.0",
|
|
69
|
-
"rescript-logger": "2.0.
|
|
70
|
-
"rescript-react-update": "
|
|
67
|
+
"rescript-logger": "2.0.2",
|
|
68
|
+
"rescript-react-update": "5.0.0",
|
|
71
69
|
"restorative": "0.4.0-beta.1",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
70
|
+
"swr": "1.1.1",
|
|
71
|
+
"tailwindcss": "3.0.2",
|
|
72
|
+
"react-datepicker": "3.8.0"
|
|
75
73
|
},
|
|
76
74
|
"devDependencies": {
|
|
77
|
-
"
|
|
75
|
+
"highlight.js": "11.3.1",
|
|
76
|
+
"@babel/core": "7.16.5",
|
|
78
77
|
"@storybook/addon-actions": "6.1.21",
|
|
79
78
|
"@storybook/addon-essentials": "6.1.21",
|
|
80
79
|
"@storybook/addon-knobs": "6.1.21",
|
|
@@ -82,11 +81,11 @@
|
|
|
82
81
|
"@storybook/addons": "6.1.21",
|
|
83
82
|
"@storybook/react": "6.1.21",
|
|
84
83
|
"@storybook/theming": "6.1.21",
|
|
85
|
-
"babel-loader": "8.2.
|
|
84
|
+
"babel-loader": "8.2.3",
|
|
86
85
|
"raw-loader": "4.0.2",
|
|
87
86
|
"react": "17.0.2",
|
|
88
87
|
"react-dom": "17.0.2",
|
|
89
88
|
"react-is": "17.0.2",
|
|
90
|
-
"sass": "1.
|
|
89
|
+
"sass": "1.45.0"
|
|
91
90
|
}
|
|
92
91
|
}
|
package/postcss.config.js
CHANGED
|
@@ -247,7 +247,7 @@ module Make = (Config: RouterConfig) => {
|
|
|
247
247
|
openMenu()
|
|
248
248
|
toggle()
|
|
249
249
|
}}
|
|
250
|
-
className={cx([commonClassName, "flex items-center w-full"])}>
|
|
250
|
+
className={cx([commonClassName, "flex items-center w-full sidenav-link"])}>
|
|
251
251
|
<span className={cx(["mr-2 text-neutral-800", isNavOpen ? "pl-2" : "px-2"])}>
|
|
252
252
|
groupInfo.icon
|
|
253
253
|
</span>
|
|
@@ -1,55 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
const plugin = require("tailwindcss/plugin");
|
|
3
|
-
|
|
4
|
-
const flexGapPlugin = plugin(({ addUtilities, theme, variants }) => {
|
|
5
|
-
const newUtilities = Object.keys(theme("spacing")).reduce(
|
|
6
|
-
(acc, key) => ({
|
|
7
|
-
...acc,
|
|
8
|
-
[`.flex-gap-${key}`]: {
|
|
9
|
-
marginBottom: "-" + theme(`spacing.${key}`),
|
|
10
|
-
marginLeft: "-" + theme(`spacing.${key}`),
|
|
11
|
-
[` > *`]: {
|
|
12
|
-
paddingBottom: theme(`spacing.${key}`),
|
|
13
|
-
paddingLeft: theme(`spacing.${key}`),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
[`.flex-col-gap-${key}`]: {
|
|
17
|
-
marginLeft: "-" + theme(`spacing.${key}`),
|
|
18
|
-
[` > *`]: {
|
|
19
|
-
paddingLeft: theme(`spacing.${key}`),
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
[`.flex-row-gap-${key}`]: {
|
|
23
|
-
marginBottom: "-" + theme(`spacing.${key}`),
|
|
24
|
-
[` > *`]: {
|
|
25
|
-
paddingBottom: theme(`spacing.${key}`),
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
29
|
-
{}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
addUtilities(newUtilities, variants("flexGap"));
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const boxShadowColorPlugin = plugin(({ addUtilities, theme, variants }) => {
|
|
36
|
-
const newUtilities = Object.keys(theme("colors")).reduce(
|
|
37
|
-
(acc, key) =>
|
|
38
|
-
theme("colors")[key][500]
|
|
39
|
-
? {
|
|
40
|
-
...acc,
|
|
41
|
-
[`.shadow-${key}-500`]: {
|
|
42
|
-
boxShadow: `${theme("colors")[key][500]} 0px 0px 0px 1px;`,
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
: acc,
|
|
46
|
-
{}
|
|
47
|
-
);
|
|
48
|
-
addUtilities(newUtilities, variants("boxShadowColor"));
|
|
49
|
-
});
|
|
1
|
+
const defaultColors = require("tailwindcss/colors");
|
|
50
2
|
|
|
51
3
|
module.exports = {
|
|
52
|
-
mode: "jit",
|
|
53
4
|
theme: {
|
|
54
5
|
extend: {
|
|
55
6
|
screens: {
|
|
@@ -189,29 +140,7 @@ module.exports = {
|
|
|
189
140
|
},
|
|
190
141
|
},
|
|
191
142
|
},
|
|
192
|
-
|
|
193
|
-
variants: {
|
|
194
|
-
textColor: ["responsive", "hover", "focus", "disabled"],
|
|
195
|
-
backgroundColor: [
|
|
196
|
-
"responsive",
|
|
197
|
-
"hover",
|
|
198
|
-
"focus",
|
|
199
|
-
"disabled",
|
|
200
|
-
"active",
|
|
201
|
-
"even",
|
|
202
|
-
],
|
|
203
|
-
margin: ["responsive", "last"],
|
|
204
|
-
padding: ["responsive", "last"],
|
|
205
|
-
borderWidth: ["responsive", "last"],
|
|
206
|
-
zIndex: ["responsive", "focus"],
|
|
207
|
-
width: ["responsive", "hover"],
|
|
208
|
-
overflow: ["responsive", "hover"],
|
|
209
|
-
/* Custom */
|
|
210
|
-
flexGap: ["responsive"],
|
|
211
|
-
boxShadowColor: ["responsive", "hover", "focus"],
|
|
212
|
-
},
|
|
213
|
-
plugins: [flexGapPlugin, boxShadowColorPlugin],
|
|
214
|
-
purge: [
|
|
143
|
+
content: [
|
|
215
144
|
"public/index.html",
|
|
216
145
|
"lib/es6_global/src/**/**.js",
|
|
217
146
|
"src/**/**.js",
|
|
@@ -60,7 +60,8 @@ module Core = {
|
|
|
60
60
|
className="px-2 pt-2 border-b border-r border-gray-300 h-20"
|
|
61
61
|
key={"thead-thd" ++ index->Int.toString}>
|
|
62
62
|
<Toolkit__Ui_Spread props={column.getSortByToggleProps()}>
|
|
63
|
-
<
|
|
63
|
+
<div
|
|
64
|
+
className="font-semibold text-sm mb-1 text-primary-800 pr-2 relative">
|
|
64
65
|
{column.render("header", ())}
|
|
65
66
|
{column.isSorted
|
|
66
67
|
? column.isSortedDesc->Option.mapWithDefault(React.null, v =>
|
|
@@ -71,7 +72,7 @@ module Core = {
|
|
|
71
72
|
</span>
|
|
72
73
|
)
|
|
73
74
|
: React.null}
|
|
74
|
-
</
|
|
75
|
+
</div>
|
|
75
76
|
</Toolkit__Ui_Spread>
|
|
76
77
|
<Toolkit__Ui_Spread props={column.getResizerProps()}>
|
|
77
78
|
<div className={"resizer" ++ (column.isResizing ? " isResizing" : "")} />
|
package/src/ui/styles.css
CHANGED
|
@@ -225,10 +225,11 @@ iframe:not([tabindex="-1"]):focus,
|
|
|
225
225
|
|
|
226
226
|
.cw-Tabs [data-selected] {
|
|
227
227
|
background: linear-gradient(270deg, #11a3b6 0%, #27d0dc 100%);
|
|
228
|
-
|
|
228
|
+
color: white;
|
|
229
229
|
}
|
|
230
230
|
.cw-Tabs [data-selected]:hover {
|
|
231
|
-
|
|
231
|
+
color: white;
|
|
232
|
+
@apply bg-primary-500;
|
|
232
233
|
}
|
|
233
234
|
|
|
234
235
|
.cw-Tabs [data-reach-tab] {
|