allaw-ui 0.0.329 → 0.0.330

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.
Binary file
@@ -7,8 +7,8 @@
7
7
  {
8
8
  "fontFamily": "allaw-font",
9
9
  "majorVersion": 1,
10
- "minorVersion": 2,
11
- "version": "Version 1.2",
10
+ "minorVersion": 3,
11
+ "version": "Version 1.3",
12
12
  "fontId": "allaw-font",
13
13
  "psName": "allaw-font",
14
14
  "subFamily": "Regular",
@@ -102,4 +102,5 @@
102
102
  <glyph unicode="&#xe94c;" d="M231.694 348.844c-10.772 31.748-17.005 65.767-17.005 100.915 0 35.152 6.234 69.167 16.439 100.915l-0.285 6.762-159.474 123.849-5.218-2.482c-34.581-69.167-54.424-146.838-54.424-229.044s19.843-159.873 54.424-229.040l165.544 128.125z" />
103
103
  <glyph unicode="&#xe94d;" d="M521.966 762.708c95.81 0 160.44-41.386 197.292-75.971l144.001 140.601c-88.439 82.205-203.53 132.663-341.293 132.663-199.563 0-371.911-114.52-455.817-281.197l164.977-128.129c41.39 123.025 155.91 212.034 290.839 212.034z" />
104
104
  <glyph unicode="&#xe94e;" glyph-name="apple" data-tags="apple" d="M798.293 128c-35.413-52.907-72.96-104.533-130.133-105.387-57.173-1.28-75.52 33.707-140.373 33.707-65.28 0-85.333-32.853-139.521-34.987-55.893-2.133-98.133 56.32-133.973 107.947-72.96 105.387-128.853 299.52-53.76 430.080 37.12 64.853 103.68 105.813 175.787 107.093 54.615 0.853 106.668-37.12 140.375-37.12 33.28 0 96.427 45.653 162.56 38.827 27.733-1.28 105.387-11.093 155.307-84.48-3.84-2.56-92.587-54.613-91.733-162.56 1.28-128.853 113.067-171.947 114.347-172.373-1.28-2.987-17.92-61.44-58.88-120.747zM554.667 810.667c31.147 35.413 82.773 62.293 125.44 64 5.547-49.92-14.507-100.267-44.373-136.107-29.44-36.267-78.080-64.427-125.867-60.587-6.4 49.067 17.493 100.267 44.8 132.693z" />
105
+ <glyph unicode="&#xe94f;" glyph-name="linkedin" data-tags="linkedin" d="M1024-64h-204.8v358.349c0 98.304-43.366 153.139-121.139 153.139-84.634 0-134.861-57.139-134.861-153.139v-358.349h-204.8v665.6h204.8v-74.854c0 0 64.256 112.742 209.050 112.742 144.845 0 251.75-88.371 251.75-271.258v-432.23zM125.030 708.045c-69.069 0-125.030 56.422-125.030 126.003 0 69.53 55.962 125.952 125.030 125.952 69.018 0 124.979-56.422 124.979-125.952 0.051-69.581-55.962-126.003-124.979-126.003v0zM0-64h256v665.6h-256v-665.6z" />
105
106
  </font></defs></svg>
Binary file
Binary file
@@ -42,6 +42,11 @@
42
42
  width: 100%;
43
43
  }
44
44
 
45
+ .oauth-provider-button.linkedin {
46
+ background: #0a66c2;
47
+ width: 100%;
48
+ }
49
+
45
50
  .oauth-provider-button.apple .label {
46
51
  font-family: "SF Pro Display", sans-serif;
47
52
  font-weight: 500;
@@ -53,6 +58,16 @@
53
58
  text-overflow: ellipsis;
54
59
  }
55
60
 
61
+ .oauth-provider-button.linkedin .label {
62
+ font-family: "Source Sans Pro", sans-serif;
63
+ font-weight: 500;
64
+ text-align: left;
65
+ color: #ffffff;
66
+ white-space: nowrap;
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ }
70
+
56
71
  .allaw-icon-google {
57
72
  display: flex;
58
73
  }
@@ -63,6 +78,12 @@
63
78
  padding-bottom: 2px;
64
79
  }
65
80
 
81
+ .allaw-icon-linkedin {
82
+ display: flex;
83
+ color: #0a66c2;
84
+ padding-bottom: 0px;
85
+ }
86
+
66
87
  .allaw-icon-google .path1:before {
67
88
  content: "\e94a";
68
89
  color: rgb(66, 133, 244);
@@ -82,3 +103,13 @@
82
103
  margin-left: -1em;
83
104
  color: rgb(235, 67, 53);
84
105
  }
106
+
107
+ .linkedin-icon-container {
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: center;
111
+ width: 24px;
112
+ height: 24px;
113
+ border-radius: 8px;
114
+ background: #ffffff;
115
+ }
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import "./OAuthProviderButton.css";
3
3
  import "../../../styles/global.css";
4
4
  export interface OAuthProviderButtonProps {
5
- provider: "google" | "apple";
5
+ provider: "google" | "apple" | "linkedin";
6
6
  type: "login" | "signup";
7
7
  url: string;
8
8
  size: 14 | 16 | 18 | 20 | 22 | 24;
@@ -4,29 +4,54 @@ import "../../../styles/global.css";
4
4
  var OAuthProviderButton = function (_a) {
5
5
  var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size, onClick = _a.onClick;
6
6
  var getLabel = function () {
7
- if (provider === "google") {
8
- return type === "login"
9
- ? "Continuer avec Google"
10
- : "S'inscrire avec Google";
11
- }
12
- else {
13
- return type === "login"
14
- ? "Continuer avec Apple"
15
- : "S'inscrire avec Apple";
16
- }
7
+ var _a;
8
+ var labels = {
9
+ google: {
10
+ login: "Continuer avec Google",
11
+ signup: "S'inscrire avec Google",
12
+ },
13
+ apple: {
14
+ login: "Continuer avec Apple",
15
+ signup: "S'inscrire avec Apple",
16
+ },
17
+ linkedin: {
18
+ login: "Continuer avec LinkedIn",
19
+ signup: "S'inscrire avec LinkedIn",
20
+ },
21
+ };
22
+ return ((_a = labels[provider]) === null || _a === void 0 ? void 0 : _a[type]) || "";
17
23
  };
18
24
  var renderIcon = function () {
19
- var iconSizeGoogle = size * 0.8;
20
- var iconSizeApple = size * 1.2;
25
+ var iconSizes = {
26
+ google: size * 0.8,
27
+ apple: size * 1.2,
28
+ linkedin: size * 0.8,
29
+ };
30
+ var iconClasses = {
31
+ google: "allaw-icon-google",
32
+ apple: "allaw-icon-apple",
33
+ linkedin: "allaw-icon-linkedin",
34
+ };
35
+ var iconSize = iconSizes[provider];
36
+ var iconClass = iconClasses[provider];
21
37
  if (provider === "google") {
22
- return (React.createElement("span", { className: "allaw-icon-google", style: { fontSize: "".concat(iconSizeGoogle, "px") } },
38
+ return (React.createElement("span", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } },
23
39
  React.createElement("span", { className: "path1" }),
24
40
  React.createElement("span", { className: "path2" }),
25
41
  React.createElement("span", { className: "path3" }),
26
42
  React.createElement("span", { className: "path4" })));
27
43
  }
44
+ else if (provider === "linkedin") {
45
+ var containerSize = size * 1.4; // Adjust this multiplier as needed
46
+ return (React.createElement("div", { className: "linkedin-icon-container", style: {
47
+ fontSize: "".concat(iconSize, "px"),
48
+ width: "".concat(containerSize, "px"),
49
+ height: "".concat(containerSize, "px"),
50
+ } },
51
+ React.createElement("i", { className: iconClass })));
52
+ }
28
53
  else {
29
- return (React.createElement("i", { className: "allaw-icon-apple", style: { fontSize: "".concat(iconSizeApple, "px") } }));
54
+ return (React.createElement("i", { className: iconClass, style: { fontSize: "".concat(iconSize, "px") } }));
30
55
  }
31
56
  };
32
57
  var handleClick = function () {
@@ -16,3 +16,10 @@
16
16
  font-weight: 500;
17
17
  font-style: normal;
18
18
  }
19
+
20
+ @font-face {
21
+ font-family: "Source Sans Pro";
22
+ src: url("/fonts/source-sans-pro-regular.woff2") format("woff2");
23
+ font-weight: 500;
24
+ font-style: normal;
25
+ }
@@ -378,3 +378,11 @@ li {
378
378
  .allaw-icon-apple:before {
379
379
  content: "\e94e";
380
380
  }
381
+
382
+ .allaw-icon-linkedin:before {
383
+ content: "\e94e";
384
+ }
385
+
386
+ .allaw-icon-linkedin:before {
387
+ content: "\e94f";
388
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "0.0.329",
3
+ "version": "0.0.330",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",