@colisweb/rescript-toolkit 4.15.5 → 4.16.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "4.15.5",
3
+ "version": "4.16.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -29,12 +29,12 @@
29
29
  "dependencies": {
30
30
  "@colisweb/bs-react-intl-extractor-bin": "0.12.2",
31
31
  "@colisweb/restorative": "1.0.0",
32
- "@datadog/browser-rum": "4.46.0",
33
- "@headlessui/react": "1.7.16",
32
+ "@datadog/browser-rum": "4.48.2",
33
+ "@headlessui/react": "1.7.17",
34
34
  "@headlessui/tailwindcss": "0.2.0",
35
35
  "@reach/auto-id": "0.18.0",
36
36
  "@rescript/react": "0.11.0",
37
- "autoprefixer": "10.4.14",
37
+ "autoprefixer": "10.4.15",
38
38
  "axios": "0.24.0",
39
39
  "bs-axios": "0.0.43",
40
40
  "case": "1.6.3",
@@ -46,18 +46,18 @@
46
46
  "lenses-ppx": "6.1.10",
47
47
  "list-selectors": "2.0.1",
48
48
  "lodash": "4.17.21",
49
- "postcss": "8.4.27",
49
+ "postcss": "8.4.29",
50
50
  "postcss-preset-env": "8.0.1",
51
51
  "prismjs": "1.29.0",
52
52
  "react": "18.2.0",
53
53
  "react-big-calendar": "1.5.2",
54
54
  "react-datepicker": "3.8.0",
55
- "react-day-picker": "8.8.0",
55
+ "react-day-picker": "8.8.1",
56
56
  "react-dom": "18.2.0",
57
- "react-error-boundary": "4.0.10",
57
+ "react-error-boundary": "4.0.11",
58
58
  "react-helmet": "6.1.0",
59
- "react-icons": "4.10.1",
60
- "react-intl": "6.4.4",
59
+ "react-icons": "4.11.0",
60
+ "react-intl": "6.4.6",
61
61
  "react-portal": "4.2.2",
62
62
  "react-select": "5.7.4",
63
63
  "react-table": "7.8.0",
@@ -66,20 +66,20 @@
66
66
  "res-react-intl": "3.1.2",
67
67
  "rescript": "10.1.4",
68
68
  "rescript-classnames": "6.0.0",
69
- "rescript-react-update": "5.0.0",
69
+ "rescript-react-update": "5.0.2",
70
70
  "sanitize-html": "1.27.4",
71
- "swr": "2.2.0",
71
+ "swr": "2.2.2",
72
72
  "tailwindcss": "3.3.3",
73
- "use-local-storage-state": "18.3.3"
73
+ "use-local-storage-state": "19.0.4"
74
74
  },
75
75
  "devDependencies": {
76
- "@babel/core": "7.22.9",
76
+ "@babel/core": "7.22.17",
77
77
  "@jihchi/vite-plugin-rescript": "5.3.0",
78
78
  "@mdx-js/mdx": "2.3.0",
79
79
  "@mdx-js/react": "2.3.0",
80
80
  "@mdx-js/rollup": "2.3.0",
81
81
  "@originjs/vite-plugin-commonjs": "1.0.3",
82
- "@vitejs/plugin-react": "4.0.3",
82
+ "@vitejs/plugin-react": "4.0.4",
83
83
  "babel-loader": "8.2.5",
84
84
  "highlight.js": "11.8.0",
85
85
  "husky": "8.0.3",
@@ -90,8 +90,8 @@
90
90
  "rehype-autolink-headings": "^6.1.1",
91
91
  "rehype-highlight": "^6.0.0",
92
92
  "rehype-slug": "^5.1.0",
93
- "sass": "1.64.1",
94
- "vite": "4.4.7"
93
+ "sass": "1.66.1",
94
+ "vite": "4.4.9"
95
95
  },
96
96
  "packageManager": "yarn@3.3.1"
97
97
  }
@@ -34,10 +34,10 @@ module App = {
34
34
 
35
35
  module TopNavigationBar = {
36
36
  @react.component
37
- let make = (~toggleMenu, ~username=?, ~logoSrc=?, ~onLogoClick, ~logout=?) => {
37
+ let make = (~toggleMenu, ~username=?, ~logoSrc=?, ~onLogoClick, ~logout=?, ~environment=?) => {
38
38
  <div
39
39
  className="bg-white h-16 border-b flex items-center px-1 justify-between fixed top-0 left-0 w-full z-40 print:hidden">
40
- <div className="flex items-center px-1">
40
+ <div className="flex items-center px-1 gap-1">
41
41
  <button
42
42
  onClick=toggleMenu className="text-neutral-800 hover:bg-neutral-300 rounded-full p-2">
43
43
  <ReactIcons.MdMenu size=32 />
@@ -55,6 +55,11 @@ module App = {
55
55
  className="w-16 ml-4"
56
56
  />
57
57
  </a>
58
+ {environment->Option.mapWithDefault(React.null, environment => {
59
+ <p className="text-neutral-600 font-semibold text-lg font-display">
60
+ {environment->React.string}
61
+ </p>
62
+ })}
58
63
  </div>
59
64
  {switch (username, logout) {
60
65
  | (Some(username), Some(logout)) =>
@@ -146,6 +151,7 @@ module App = {
146
151
  ~onLogoClick,
147
152
  ~bottom=?,
148
153
  ~logoSrc=?,
154
+ ~environment=?,
149
155
  ) => {
150
156
  let {isLg} = Toolkit__Hooks.useMediaQuery()
151
157
  let (isNavOpen, setOpen) = React.useState(() =>
@@ -173,7 +179,7 @@ module App = {
173
179
 
174
180
  <NavOpenContext.Provider value={isNavOpen}>
175
181
  <div>
176
- <TopNavigationBar ?logoSrc ?username ?logout toggleMenu onLogoClick />
182
+ <TopNavigationBar ?environment ?logoSrc ?username ?logout toggleMenu onLogoClick />
177
183
  <div className="flex">
178
184
  <LeftNavigationBar isNavOpen ?bottom hideMenu openMenu>
179
185
  {sideNavRender}