@colisweb/rescript-toolkit 2.61.1 → 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/v14.3.2/templates/colisweb.yml"
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
@@ -54,6 +54,11 @@
54
54
  "defaultMessage": "Lundi",
55
55
  "message": "Lundi"
56
56
  },
57
+ {
58
+ "id": "_a7e73ea4",
59
+ "defaultMessage": "Déconnexion",
60
+ "message": "Déconnexion"
61
+ },
57
62
  {
58
63
  "id": "_aaa4996e",
59
64
  "defaultMessage": "Dimanche",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.61.1",
3
+ "version": "2.62.0",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build -with-deps",
@@ -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, ~logoutLabel) => {
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,25 +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
- <Menu>
63
- <MenuButton>
64
- <div className="flex items-center flex-col-gap-2 text-neutral-800">
65
- <span className="font-semibold"> {username->React.string} </span>
66
- <div>
67
- <BsReactIcons.MdAccountCircle size=28 />
68
- </div>
69
- <div>
70
- <BsReactIcons.MdKeyboardArrowDown size=18 />
71
- </div>
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 />
72
67
  </div>
73
- </MenuButton>
74
- <MenuList
75
- className="focus:outline-none focus:shadow-none bg-white z-50 shadow-lg rounded border py-2 ml-2 mt-2 w-48">
76
- <MenuItem className="text-lg py-2 px-4 flex items-center" onSelect=logout>
77
- logoutLabel
78
- </MenuItem>
79
- </MenuList>
80
- </Menu>
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>
81
78
  </div>
82
79
  }
83
80
  }
@@ -140,7 +137,6 @@ module App = {
140
137
  ~username,
141
138
  ~sideNavRender,
142
139
  ~logout,
143
- ~logoutLabel,
144
140
  ~onLogoClick,
145
141
  ~bottom=?,
146
142
  ) => {
@@ -170,7 +166,7 @@ module App = {
170
166
 
171
167
  <NavOpenContext.Provider value={isNavOpen}>
172
168
  <div>
173
- <TopNavigationBar username logout logoutLabel toggleMenu onLogoClick />
169
+ <TopNavigationBar username logout toggleMenu onLogoClick />
174
170
  <div className="flex">
175
171
  <LeftNavigationBar isNavOpen ?bottom hideMenu openMenu>
176
172
  {sideNavRender}