allaw-ui 0.0.324 → 0.0.326

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": 1,
11
- "version": "Version 1.1",
10
+ "minorVersion": 2,
11
+ "version": "Version 1.2",
12
12
  "fontId": "allaw-font",
13
13
  "psName": "allaw-font",
14
14
  "subFamily": "Regular",
@@ -97,4 +97,9 @@
97
97
  <glyph unicode="&#xe947;" glyph-name="micOutline" data-tags="micOutline" d="M485.803 925.909c-59.872-10.823-107.673-53.325-125.927-109.19l-0.324-1.146c-8.021-25.387-8.192-30.464-7.552-232.747 0.555-177.963 0.811-191.061 3.712-202.197 15.36-58.411 56.363-101.888 111.019-117.76 13.452-4.073 28.912-6.417 44.92-6.417 68.519 0 127.005 42.956 149.998 103.406l0.368 1.102c9.899 26.795 9.344 14.933 9.984 221.867 0.427 131.712 0 194.688-1.28 204.587-4.676 36.561-21.192 68.599-45.518 92.793l-0.007 0.007c-11.818 12.248-25.672 22.435-41.034 30.034l-0.865 0.387c-22.101 11.221-39.509 15.445-66.176 16.171-2.731 0.117-5.935 0.184-9.154 0.184-7.805 0-15.518-0.392-23.121-1.158l0.958 0.078zM541.099 859.264c30.336-8.832 59.051-40.491 64.768-71.424 2.219-11.989 2.304-378.837 0.128-390.443-7.233-33.917-31.28-60.917-62.805-72.192l-0.683-0.213c-9.235-2.77-19.848-4.364-30.833-4.364-10.544 0-20.745 1.469-30.409 4.213l0.783-0.19c-22.528 7.083-45.483 27.136-56.235 49.109-9.685 19.84-9.387 12.715-9.387 216.875 0 117.248 0.64 191.445 1.707 197.205 4.053 21.973 21.717 47.317 42.667 61.269 21.888 14.549 52.053 18.347 80.299 10.155zM239.488 506.837c-4.424-2.828-8.117-6.385-11.010-10.541l-0.083-0.126c-3.925-6.272-3.968-6.997-3.925-55.851 0.043-50.944 1.28-65.536 7.808-92.16 23.787-94.697 91.918-169.597 180.483-202.36l2.002-0.648c15.486-5.566 33.995-10.372 53.054-13.556l1.943-0.268 9.813-1.152v-98.475l-139.648-0.981-6.528-5.291c-9.344-7.552-13.013-14.677-13.013-25.173 0-13.312 8.064-25.6 19.797-29.995 3.243-1.237 57.984-1.835 171.989-1.835 138.155 0 168.149 0.427 172.672 2.347 13.013 5.589 21.12 21.803 17.963 35.968-1.963 8.832-4.864 13.184-12.715 19.157l-6.315 4.821-139.349 0.981v98.475l9.813 1.152c21.002 3.452 39.511 8.258 57.325 14.539l-2.328-0.715c80.558 29.644 143.020 91.883 172.319 170.297l0.652 1.991c14.464 40.107 17.28 60.203 17.323 122.88 0.043 48.939 0 49.579-3.925 55.893-12.331 19.84-42.88 19.84-55.211 0-3.883-6.229-4.011-7.723-4.949-58.453-0.768-40.32-1.664-55.125-3.968-65.707-8.661-39.723-25.131-73.173-50.389-102.4-74.027-85.76-199.211-102.485-294.272-39.339-38.315 25.472-71.765 69.163-86.229 112.725-9.899 29.781-10.965 38.4-12.032 94.72-0.939 50.731-1.067 52.224-4.949 58.453-6.014 9.068-16.177 14.964-27.718 14.964-6.032 0-11.687-1.611-16.56-4.426l0.16 0.085z" />
98
98
  <glyph unicode="&#xe948;" glyph-name="presIcon" data-tags="presIcon" d="M89.344 862.805c-14.295-3.097-24.847-15.637-24.847-30.642 0-6.201 1.802-11.981 4.911-16.844l-0.075 0.126c7.552-12.117 14.421-14.891 38.571-15.573l20.011-0.597 0.512-234.923c0.469-220.331 0.725-235.605 3.584-245.205 12.421-42.857 44.917-76.141 86.365-89.427l0.931-0.258c10.624-3.456 16.213-4.011 50.048-4.651 27.776-0.512 37.888-1.237 37.333-2.688-9.984-26.923-50.688-154.027-50.645-158.251 0.085-13.568 10.752-27.051 24.363-30.763 12.843-3.499 28.971 3.157 34.773 14.379 1.536 2.987 6.016 15.019 9.941 26.752l7.125 21.333h359.424l7.979-23.424c8.405-24.704 11.819-30.080 22.613-35.627 3.914-1.937 8.522-3.070 13.395-3.070 9.089 0 17.258 3.942 22.889 10.209l0.025 0.028c5.268 5.959 8.719 13.635 9.42 22.091l0.009 0.139c0 2.091-46.123 144.299-50.56 155.861-0.725 1.877 6.059 2.432 37.205 3.029 33.749 0.64 39.467 1.195 50.048 4.608 42.343 13.628 74.81 46.897 87.062 88.795l0.234 0.933c2.859 9.6 3.115 24.875 3.584 245.205l0.512 234.923 20.011 0.597c24.149 0.683 31.019 3.456 38.571 15.573 3.064 4.726 4.885 10.505 4.885 16.709 0 11.627-6.398 21.761-15.865 27.071l-0.156 0.081-7.424 4.267-420.693 0.256c-231.381 0.128-423.125-0.299-426.069-1.024zM718.507 663.808c10.251-5.505 17.102-16.151 17.102-28.398 0-5.913-1.598-11.453-4.385-16.212l0.082 0.152c-3.371-5.717-8.405-9.856-23.467-19.243-52.139-32.512-94.037-70.912-132.736-121.557-16.427-21.547-22.101-25.728-34.773-25.728-13.525 0-18.731 3.84-56.363 41.216l-35.968 35.755-54.741-54.528c-35.627-35.499-56.875-55.381-60.928-57.088-3.763-1.728-8.164-2.736-12.801-2.736-9.509 0-18.028 4.238-23.772 10.929l-0.035 0.042c-5.589 6.357-9.771 17.792-8.405 22.955 0.427 1.579 1.28 5.205 1.92 8.021 0.811 3.755 19.328 23.424 70.571 74.795 38.187 38.315 71.723 70.869 74.496 72.363 6.784 3.584 20.864 3.413 28.245-0.384 3.243-1.664 21.291-18.261 40.107-36.864l34.133-33.835 8.533 10.539c13.696 16.981 51.371 53.845 71.637 70.059 29.995 24.021 69.632 50.005 80 52.48 1.972 0.392 4.239 0.616 6.558 0.616 5.443 0 10.598-1.234 15.201-3.438l-0.212 0.092zM659.072 193.749c5.461-16.427 9.941-30.805 9.941-32 0-1.749-31.232-2.176-157.739-2.176h-157.739l10.112 30.293c5.547 16.64 10.453 31.275 10.923 32.427 0.64 1.707 29.056 2.048 137.643 1.707l136.875-0.427 9.984-29.824z" />
99
99
  <glyph unicode="&#xe949;" glyph-name="presIconOutline" data-tags="presIconOutline" d="M88.875 863.189c-7.467-1.408-17.067-8.875-20.779-16.128-2.193-4.311-3.478-9.402-3.478-14.793 0-11.633 5.984-21.869 15.042-27.796l0.127-0.078c5.589-3.456 8.96-4.053 27.264-4.565l20.864-0.597 0.939-471.552 4.053-11.947c8.661-25.685 22.4-46.336 41.045-61.739 14.421-11.947 25.003-17.92 41.941-23.808 13.056-4.565 15.317-4.779 52.608-5.419 28.459-0.469 38.741-1.195 38.187-2.645-10.539-28.459-50.688-154.112-50.688-158.72 0-13.141 10.837-26.581 24.405-30.293 12.843-3.499 28.971 3.157 34.773 14.379 1.536 2.987 6.016 15.019 9.941 26.752l7.125 21.333h359.509l7.125-21.333c3.925-11.733 8.405-23.765 9.941-26.752 5.803-11.221 21.931-17.877 34.773-14.379 13.568 3.712 24.405 17.152 24.405 30.293 0 4.608-40.149 130.261-50.688 158.72-0.555 1.451 9.728 2.176 38.187 2.645 37.248 0.64 39.552 0.896 52.608 5.376 39.723 13.781 69.077 43.989 83.029 85.589l4.011 11.947 0.939 471.552 20.864 0.597c18.304 0.512 21.675 1.109 27.264 4.565 9.175 5.743 15.186 15.795 15.186 27.251 0 11.736-6.309 21.998-15.721 27.58l-0.148 0.081-7.424 4.267-421.547 0.213c-231.851 0.085-423.381-0.171-425.685-0.597zM830.72 567.040l-0.427-232.533-4.395-9.387c-9.042-17.976-25.456-31.113-45.165-35.542l-0.446-0.084c-12.843-2.731-523.733-2.731-536.576 0-20.154 4.513-36.569 17.651-45.436 35.243l-0.175 0.383-4.395 9.387-0.427 232.533-0.469 232.533h638.379l-0.469-232.533zM697.899 666.411c-10.923-1.835-51.968-28.715-85.205-55.723-18.219-14.805-54.485-50.688-67.371-66.688l-8.533-10.539-34.133 33.835c-18.816 18.603-36.864 35.2-40.107 36.864-4.31 1.864-9.328 2.948-14.6 2.948-5.233 0-10.216-1.068-14.744-2.998l0.246 0.093c-6.571-3.328-132.309-127.701-139.349-137.899-3.424-5.43-5.456-12.037-5.456-19.118 0-3.555 0.512-6.991 1.467-10.237l-0.065 0.256c4.139-12.587 21.931-23.339 34.645-20.949 10.453 1.92 19.968 10.197 72.064 62.336l51.157 51.243 35.883-35.584c19.712-19.541 38.443-36.864 41.515-38.443 4.167-1.809 9.021-2.862 14.121-2.862 5.363 0 10.454 1.164 15.034 3.253l-0.227-0.093c4.267 2.176 11.093 9.472 20.48 21.931 36.456 48.658 80.549 89.3 130.896 120.893l2.010 1.177c20.736 12.928 25.899 18.645 27.477 30.464 1.365 10.069-0.853 18.261-6.656 24.875-5.668 7.128-14.34 11.657-24.070 11.657-2.296 0-4.532-0.252-6.684-0.73l0.204 0.038zM659.072 193.749c5.461-16.427 9.941-30.805 9.941-32 0-1.749-31.104-2.176-157.013-2.176-126.677 0-157.013 0.427-157.013 2.176 0 1.707 15.573 49.835 19.584 60.544 0.64 1.707 29.056 2.048 137.643 1.707l136.875-0.427 9.984-29.824z" />
100
+ <glyph unicode="&#xe94a;" d="M1011.798 438.421c0 41.953-3.404 72.567-10.772 104.315h-479.060v-189.354h281.197c-5.667-47.057-36.282-117.924-104.315-165.544l-0.954-6.339 151.47-117.342 10.494-1.047c96.377 89.010 151.939 219.972 151.939 375.312z" />
101
+ <glyph unicode="&#xe94b;" d="M521.966-60.482c137.763 0 253.417 45.357 337.893 123.591l-161.010 124.729c-43.086-30.048-100.915-51.024-176.882-51.024-134.93 0-249.45 89.006-290.273 212.031l-5.984-0.508-157.501-121.891-2.060-5.726c83.905-166.677 256.254-281.201 455.817-281.201z" />
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
+ <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
+ <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" />
100
105
  </font></defs></svg>
Binary file
Binary file
@@ -0,0 +1,84 @@
1
+ @import "../../../styles/colors.css";
2
+
3
+ .oauth-provider-button {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: 15px;
8
+ cursor: pointer;
9
+ min-width: 210px;
10
+ border-radius: 10px;
11
+ padding: 6px;
12
+ }
13
+
14
+ .oauth-provider-button:hover {
15
+ opacity: 0.8;
16
+ }
17
+
18
+ .oauth-provider-button:active {
19
+ opacity: 1;
20
+ }
21
+
22
+ .oauth-provider-button.google {
23
+ width: 100%;
24
+ background: #ffffff;
25
+ box-shadow:
26
+ 0px 2px 3px 0px #0000002b,
27
+ 0px 0px 3px 0px #00000015;
28
+ }
29
+
30
+ .oauth-provider-button.google .label {
31
+ font-family: Roboto;
32
+ font-weight: 500;
33
+ text-align: left;
34
+ color: #0000008a;
35
+ white-space: nowrap;
36
+ overflow: hidden;
37
+ text-overflow: ellipsis;
38
+ }
39
+
40
+ .oauth-provider-button.apple {
41
+ background: #000000;
42
+ width: 100%;
43
+ }
44
+
45
+ .oauth-provider-button.apple .label {
46
+ font-family: "SF Pro Display", sans-serif;
47
+ font-weight: 500;
48
+ text-align: left;
49
+ color: #ffffff;
50
+ letter-spacing: 0.005em;
51
+ white-space: nowrap;
52
+ overflow: hidden;
53
+ text-overflow: ellipsis;
54
+ }
55
+
56
+ .allaw-icon-google {
57
+ display: flex;
58
+ }
59
+
60
+ .allaw-icon-apple {
61
+ display: flex;
62
+ color: #ffffff;
63
+ padding-bottom: 2px;
64
+ }
65
+
66
+ .allaw-icon-google .path1:before {
67
+ content: "\e94a";
68
+ color: rgb(66, 133, 244);
69
+ }
70
+ .allaw-icon-google .path2:before {
71
+ content: "\e94b";
72
+ margin-left: -1em;
73
+ color: rgb(52, 168, 83);
74
+ }
75
+ .allaw-icon-google .path3:before {
76
+ content: "\e94c";
77
+ margin-left: -1em;
78
+ color: rgb(251, 188, 5);
79
+ }
80
+ .allaw-icon-google .path4:before {
81
+ content: "\e94d";
82
+ margin-left: -1em;
83
+ color: rgb(235, 67, 53);
84
+ }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./OAuthProviderButton.css";
3
+ import "../../../styles/global.css";
4
+ export interface OAuthProviderButtonProps {
5
+ provider: "google" | "apple";
6
+ type: "login" | "signup";
7
+ url: string;
8
+ size: 14 | 16 | 18 | 20 | 22 | 24;
9
+ }
10
+ declare const OAuthProviderButton: React.FC<OAuthProviderButtonProps>;
11
+ export default OAuthProviderButton;
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+ import "./OAuthProviderButton.css";
3
+ import "../../../styles/global.css";
4
+ var OAuthProviderButton = function (_a) {
5
+ var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size;
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
+ }
17
+ };
18
+ var renderIcon = function () {
19
+ var iconSizeGoogle = size * 0.8;
20
+ var iconSizeApple = size * 1.2;
21
+ if (provider === "google") {
22
+ return (React.createElement("span", { className: "allaw-icon-google", style: { fontSize: "".concat(iconSizeGoogle, "px") } },
23
+ React.createElement("span", { className: "path1" }),
24
+ React.createElement("span", { className: "path2" }),
25
+ React.createElement("span", { className: "path3" }),
26
+ React.createElement("span", { className: "path4" })));
27
+ }
28
+ else {
29
+ return (React.createElement("i", { className: "allaw-icon-apple", style: { fontSize: "".concat(iconSizeApple, "px") } }));
30
+ }
31
+ };
32
+ var handleClick = function () {
33
+ window.location.href = url;
34
+ };
35
+ var getMaxWidth = function () {
36
+ switch (size) {
37
+ case 14:
38
+ return "200px";
39
+ case 16:
40
+ return "300px";
41
+ case 18:
42
+ return "320px";
43
+ case 20:
44
+ return "370px";
45
+ case 22:
46
+ return "380px";
47
+ case 24:
48
+ return "400px";
49
+ default:
50
+ return "400px";
51
+ }
52
+ };
53
+ return (React.createElement("button", { className: "oauth-provider-button ".concat(provider), onClick: handleClick, style: { height: "".concat(size * 2.55, "px"), maxWidth: getMaxWidth() } },
54
+ renderIcon(),
55
+ React.createElement("span", { className: "label", style: { fontSize: "".concat(size, "px") } }, getLabel())));
56
+ };
57
+ export default OAuthProviderButton;
@@ -7,6 +7,7 @@ export { default as PrimaryButton } from "./PrimaryButton";
7
7
  export { default as SecondaryButton } from "./SecondaryButton";
8
8
  export { default as TabNavigation } from "./TabNavigation";
9
9
  export { default as TertiaryButton } from "./TertiaryButton";
10
+ export { default as OAuthProviderButton } from "./OAuthProviderButton";
10
11
  export type { FavoriteToggleProps } from "./FavoriteToggle";
11
12
  export type { FilterButtonProps } from "./FilterButton";
12
13
  export type { GhostButtonProps } from "./GhostButton";
@@ -16,3 +17,4 @@ export type { PrimaryButtonProps } from "./PrimaryButton";
16
17
  export type { SecondaryButtonProps } from "./SecondaryButton";
17
18
  export type { TabNavigationProps } from "./TabNavigation";
18
19
  export type { TertiaryButtonProps } from "./TertiaryButton";
20
+ export type { OAuthProviderButtonProps } from "./OAuthProviderButton";
@@ -7,3 +7,4 @@ export { default as PrimaryButton } from "./PrimaryButton";
7
7
  export { default as SecondaryButton } from "./SecondaryButton";
8
8
  export { default as TabNavigation } from "./TabNavigation";
9
9
  export { default as TertiaryButton } from "./TertiaryButton";
10
+ export { default as OAuthProviderButton } from "./OAuthProviderButton";
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { default as PrimaryButton } from "./components/atoms/buttons/PrimaryButt
8
8
  export { default as SecondaryButton } from "./components/atoms/buttons/SecondaryButton";
9
9
  export { default as TabNavigation } from "./components/atoms/buttons/TabNavigation";
10
10
  export { default as TertiaryButton } from "./components/atoms/buttons/TertiaryButton";
11
+ export { default as OAuthProviderButton } from "./components/atoms/buttons/OAuthProviderButton";
11
12
  export { default as Checkbox } from "./components/atoms/checkboxes/Checkbox";
12
13
  export { default as Input } from "./components/atoms/inputs/Input";
13
14
  export type { InputProps, InputRef } from "./components/atoms/inputs/Input";
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export { default as PrimaryButton } from "./components/atoms/buttons/PrimaryButt
10
10
  export { default as SecondaryButton } from "./components/atoms/buttons/SecondaryButton";
11
11
  export { default as TabNavigation } from "./components/atoms/buttons/TabNavigation";
12
12
  export { default as TertiaryButton } from "./components/atoms/buttons/TertiaryButton";
13
+ export { default as OAuthProviderButton } from "./components/atoms/buttons/OAuthProviderButton";
13
14
  // Checkboxes
14
15
  export { default as Checkbox } from "./components/atoms/checkboxes/Checkbox";
15
16
  // Inputs
@@ -1,9 +1,18 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
2
2
  @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
3
3
  @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800;900&display=swap");
4
+ @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
5
+
4
6
  @import "~typeface-open-sans/index.css";
5
7
  @import "./colors.css";
6
8
  @import "./icons.css";
7
9
  @import "./ui-variables/border-radius.css";
8
10
  @import "./ui-variables/stroke.css";
9
11
  @import "./ui-variables/shadows.css";
12
+
13
+ @font-face {
14
+ font-family: "SF Pro Display";
15
+ src: url("/fonts/sf-pro-display-medium.woff2") format("woff2");
16
+ font-weight: 500;
17
+ font-style: normal;
18
+ }
@@ -354,3 +354,27 @@ li {
354
354
  .allaw-icon-star-unfill:before {
355
355
  content: "\e914";
356
356
  }
357
+
358
+ .allaw-icon-google .path1:before {
359
+ content: "\e94a";
360
+ color: rgb(66, 133, 244);
361
+ }
362
+ .allaw-icon-google .path2:before {
363
+ content: "\e94b";
364
+ margin-left: -1em;
365
+ color: rgb(52, 168, 83);
366
+ }
367
+ .allaw-icon-google .path3:before {
368
+ content: "\e94c";
369
+ margin-left: -1em;
370
+ color: rgb(251, 188, 5);
371
+ }
372
+ .allaw-icon-google .path4:before {
373
+ content: "\e94d";
374
+ margin-left: -1em;
375
+ color: rgb(235, 67, 53);
376
+ }
377
+
378
+ .allaw-icon-apple:before {
379
+ content: "\e94e";
380
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "0.0.324",
3
+ "version": "0.0.326",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",