@colisweb/rescript-toolkit 2.61.0 → 2.62.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
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
include:
|
|
2
|
-
- "https://colisweb-idl.gitlab.io/colisweb-open-source/ci-common/
|
|
2
|
+
- "https://colisweb-idl.gitlab.io/colisweb-open-source/ci-common/v16.1.8/templates/scala.yml"
|
|
3
|
+
|
|
4
|
+
variables:
|
|
5
|
+
GIT_COMMIT_FILES: ""
|
|
3
6
|
|
|
4
7
|
# -----------------------------------------------
|
|
5
8
|
# Test
|
package/locale/fr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
open ReachUi
|
|
2
|
-
|
|
3
1
|
module Container = {
|
|
4
2
|
@react.component
|
|
5
3
|
let make = (~children) =>
|
|
@@ -41,7 +39,7 @@ module App = {
|
|
|
41
39
|
|
|
42
40
|
module TopNavigationBar = {
|
|
43
41
|
@react.component
|
|
44
|
-
let make = (~toggleMenu, ~username, ~onLogoClick, ~logout
|
|
42
|
+
let make = (~toggleMenu, ~username, ~onLogoClick, ~logout) => {
|
|
45
43
|
<div
|
|
46
44
|
className="bg-white h-16 border-b flex items-center px-1 justify-between fixed top-0 left-0 w-full z-40">
|
|
47
45
|
<div className="flex items-center px-1">
|
|
@@ -59,23 +57,24 @@ module App = {
|
|
|
59
57
|
<img src="/assets/logo.svg" alt="Colisweb" className="w-16 ml-4" />
|
|
60
58
|
</a>
|
|
61
59
|
</div>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
60
|
+
<Toolkit__Ui_Dropdown
|
|
61
|
+
buttonClassName="border-none focus:!shadow-none active:!shadow-none"
|
|
62
|
+
dropdownClassName={"w-40 -mt-1 !shadow-[0_0_8px_rgba(44,44,44,0.20)]"}
|
|
63
|
+
label={<div className="flex items-center gap-2 text-neutral-800">
|
|
64
|
+
<span className="font-semibold truncate max-w-[150px]"> {username->React.string} </span>
|
|
65
|
+
<div>
|
|
66
|
+
<BsReactIcons.MdAccountCircle size=28 />
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<BsReactIcons.MdKeyboardArrowDown size=18 />
|
|
70
|
+
</div>
|
|
71
|
+
</div>}>
|
|
72
|
+
<button
|
|
73
|
+
className="py-1 text-base text-neutral-700 font-semibold block w-full hover:bg-neutral-200"
|
|
74
|
+
onClick={_ => logout()}>
|
|
75
|
+
<ReactIntl.FormattedMessage defaultMessage="Déconnexion" />
|
|
76
|
+
</button>
|
|
77
|
+
</Toolkit__Ui_Dropdown>
|
|
79
78
|
</div>
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -106,7 +105,7 @@ module App = {
|
|
|
106
105
|
"lg:flex border-r px-2 py-3 fixed flex-col bg-white justify-between transition-all duration-300 ease-in-out z-40",
|
|
107
106
|
isNavOpen ? "w-64 overflow-y-auto" : "w-16 hidden sidenav--closed",
|
|
108
107
|
])}>
|
|
109
|
-
{children({onLinkClick
|
|
108
|
+
{children({onLinkClick, isNavOpen, openMenu})}
|
|
110
109
|
{bottom->Option.mapWithDefault(React.null, content =>
|
|
111
110
|
<div className={!isNavOpen ? "overflow-hidden" : ""}>
|
|
112
111
|
<div
|
|
@@ -138,7 +137,6 @@ module App = {
|
|
|
138
137
|
~username,
|
|
139
138
|
~sideNavRender,
|
|
140
139
|
~logout,
|
|
141
|
-
~logoutLabel,
|
|
142
140
|
~onLogoClick,
|
|
143
141
|
~bottom=?,
|
|
144
142
|
) => {
|
|
@@ -168,7 +166,7 @@ module App = {
|
|
|
168
166
|
|
|
169
167
|
<NavOpenContext.Provider value={isNavOpen}>
|
|
170
168
|
<div>
|
|
171
|
-
<TopNavigationBar username logout
|
|
169
|
+
<TopNavigationBar username logout toggleMenu onLogoClick />
|
|
172
170
|
<div className="flex">
|
|
173
171
|
<LeftNavigationBar isNavOpen ?bottom hideMenu openMenu>
|
|
174
172
|
{sideNavRender}
|
|
@@ -4,7 +4,7 @@ module Menu = {
|
|
|
4
4
|
type renderProps = {isOpen: bool}
|
|
5
5
|
|
|
6
6
|
@module("@reach/menu-button") @react.component
|
|
7
|
-
external make: (~children:
|
|
7
|
+
external make: (~children: React.element) => React.element = "Menu"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
module MenuButton = {
|